Analytic $F(z)$ has $f(z)$ as derivative $\implies$ $\int_\gamma f(z)\ dz = 0$ for $\gamma$ a closed curve Hypothesis: Suppose that $F(z)$ has $f(z)$ as a derivative.  Suppose further that $F(z)$ is analytic.  Now consider the complex line integral

$$
\tag{1}
\int_\gamma f(z)\ dz
$$

Question: Does this imply that $(1)$ is equal to zero if $\gamma$ is a closed curve?  If so, why?

Attempt:


There is a theorem that says that for $\gamma$ a closed curve, we have that

$$
\int_\gamma p\ dx + q\ dy = 0 \iff p\ dx + q\ dy \text{ is an exact differential}
$$
Then $f(z)\ dz = f(z)\ dx + i f(z)\ dy$ implies that

$$
f(z)\ dz = f(z)\ dx + i f(z)\ dy = \underbrace{{\partial F \over \partial x}\ dx + i \left(- i{\partial F \over \partial y}\right)\ dy}_{\text{applying CR-equations to $F(z)$}} = {\partial F \over \partial x}\ dx + \left({\partial F \over \partial y}\right)\ dy
$$
Then $f(z)\ dz = dF = {\partial F \over \partial x}dx + {\partial F \over \partial y} dy$
so that $f(z)\ dz$ is an exact differential as desired.
Then via $(1)$ we have that

$$
\int_\gamma f(z)\ dz = 0
$$

as desired.


Is my proof correct?
Perhaps simpler is, assuming the domain of $\gamma $ is $[a,b]$,

$$\int _\gamma f=\int \limits _a^b f\left(\gamma (t)\right)\gamma '(t)\,\mathrm dt=\int \limits_a^b (F\circ \gamma)'(t)\,\mathrm dt=F\left(\gamma (b)\right)-F(\gamma(a))=0.$$
Or you can write $\gamma=\gamma _1+\gamma_2$ and if $\gamma$ is a closed curve suppose that $\gamma_1$ is going anti-clockwise and $\gamma_2$ clockwise. Now we must use the independency of paths which states that the integral of an analytic function on any two curves from a point $a$ to a point $b$ is the same.

Thus $\int_{\gamma_1}f=\int_{-\gamma_2} f$ and $\int_{\gamma} f=\int_{\gamma_1} f+\int_{\gamma_2} f=0$.