I have problem to understand proof of the following theorem: If $f$ is analytic in an open disk $U$, then $\int_{\gamma}f(z)dz=0$ for every closed curve $\gamma$ in $U$.
Proof: We consider the disk $U$ centered in 0 and the point $z=x+iy$. Furthermore let $\gamma$ be the arc that is horizonzal form $(0,0)$ to $(x,0)$, and vertical from $(x,0)$ to $(x,y)$. We define now $$F(z)= \int_{\gamma}f(z)dz$$ We get $$\frac{\partial F}{\partial y}=if(z)$$ Now why is this true? I don't see how to proof this statement. Can someone pls helps me? Thanks!
$$\displaystyle \frac{\partial F}{\partial y}(z) = \lim_{h\rightarrow 0} \frac{F(x,y+h)-F(x,y)}{h} = \lim_{h\rightarrow 0} \frac{1}h \int_{\gamma^\star} f(w) \, dw$$ where $\gamma^\star$ is a vertical path from $(x,y)$ to $(x,y+h)$.
Since $f$ is continuous at $z$
$$f(w) = f(z) + \psi(w)$$ where $\psi(w) \rightarrow 0$ as $w\rightarrow z$
$$\int_{\gamma^\star} f(w) \, dw = \int_{\gamma^\star}f(z) \, dw+\int_{\gamma^\star} \psi(w)\, dw $$
The second integral goes to zero and $$\displaystyle \frac{\partial F}{\partial y}(z) = f(z) \lim_{h \rightarrow 0} \frac{1}{h} \int_{\gamma^\star} dw = if(z).$$
(Compare Stein & Shakarchi pp. 38, 39.)