Prove that $ \intop_{\gamma}fdz=0 $ for a complex function Let $ f: \mathbb{C} \to \mathbb{C} $ be holomorphic and $ C_{\mathbb{C}}^{1} $ function. Let $ \gamma $ be a paramaterization of rectangle boundary (with clockwise direction). Prove that $$ \intop_{\gamma}f\left(z\right)dz=0 $$
Using Green's theorem.
I know that I should write $ f\left(x,y\right)=u\left(x,y\right)+iv\left(x,y\right) $ and then probably after Using Green's theorem, Cauchy Riemmman equation would give me that the integral vanish, but Im not sure how to get there. if $\gamma $ is the rectangle boundary, and say $ z(t), a\leq t\leq b $ is the paramaterization, then by definition $$ \intop_{\gamma}f\left(z\right)dz=\intop_{a}^{b}f\left(z\left(t\right)\right)z'\left(t\right)dt $$
Now we can write $ z\left(t\right)=x\left(t\right)+iy\left(t\right) $ and $ f\left(x,y\right)=u\left(x,y\right)+iv\left(x,y\right) $ which will lead us to $$ \intop_{a}^{b}f\left(z\left(t\right)\right)z'\left(t\right)dt=\intop_{a}^{b}[u\left(x\left(t\right),y\left(t\right)\right)+iv\left(x\left(t\right),y\left(t\right)\right)][x'\left(t\right)+iy'\left(t\right)]dt $$
$$ =\intop_{a}^{b}u\left(x\left(t\right),y\left(t\right)\right)x'\left(t\right)-v\left(x\left(t\right),y\left(t\right)\right)y'\left(t\right)dt+i\intop_{a}^{b}u\left(x\left(t\right),y\left(t\right)\right)y'\left(t\right)+v\left(x\left(t\right),y\left(t\right)\right)x'\left(t\right)dt $$
$$ =\intop_{\gamma}u\left(x,y\right)dx-v\left(x,y\right)dy+i\intop_{\gamma}u\left(x,y\right)dy+v\left(x,y\right)dx $$
And using Green's theorem:
$$ =\intop_{R}\left(\frac{d}{dx}u\left(x,y\right)+\frac{d}{dy}v\left(x,y\right)\right)dxdy+i\intop_{R}\left(\frac{d}{dx}v\left(x,y\right)-\frac{d}{dy}u\left(x,y\right)\right)dxdy $$
By Cauchy-Riemman we have
$$ \frac{d}{dx}u\left(x,y\right)=\frac{d}{dy}v\left(x,y\right),\thinspace\thinspace\thinspace\thinspace\frac{d}{dy}u\left(x,y\right)=-\frac{d}{dx}v\left(x,y\right) $$
Which would be exactly what I need if it were multiplied by $-1$. So where is my mistake?
If you have simpler way, I'd love to see it.
Note that this is just the beggining of the complex analysis course that Im taking, so we are not allowed to use the fact that holomorphic function is analytic.

The error comes from using Green's theorem incorrectly. It should be
$$
\int_\gamma Adx + Bdy = \int_R \left(\frac{\partial}{\partial x}B - \frac{\partial}{\partial y}A\right)dxdy.
$$
Applying this to your formula, you should obtain
\begin{align}
\intop_{\gamma}u\left(x,y\right)dx-v\left(x,y\right)dy =\intop_{R}\left(-\frac{d}{dx}v\left(x,y\right)-\frac{d}{dx}u\left(x,y\right)\right)dxdy\\
i\intop_{\gamma}u\left(x,y\right)dy+v\left(x,y\right)dx = i\intop_{R}\left(\frac{d}{dx}u\left(x,y\right)-\frac{d}{dy}v\left(x,y\right)\right)dxdy.
\end{align}
