A very first theorem that is proved in the first course of Complex Analysis would be the Gousart Theorem. Here it is:
Theorem (Goursat). Let $f:U\rightarrow\mathbb{C}$ be an analytic function. Then the integral $\displaystyle\int_{\partial R}f(z)dz=0$, where $R$ is a rectangle given by {$z=x+iy : a\leq x\leq b$ and $ c\leq y\leq d$}.
A lot of books give a rather complicated proof using quite a lot of estimation. I am just wondering whether the following proof, which looks completely natural for me, makes sense.
Proof. Let $f(z)=u(x,y)+iv(x,y)$.
$\displaystyle\int_{\partial R}f(z)dz=\int_{L_1}f(z)dz+\int_{L_2}f(z)dz+\int_{L_3}f(z)dz+\int_{L_4}f(z)dz$, where $L_1,L_2,L_3,L_4$ are the four sides of the rectangle.
One can show that by explicit calculations that $\displaystyle \int_{L_1}f(z)dz+\int_{L_2}f(z)dz+\int_{L_3}f(z)dz+\int_{L_4}f(z)dz =I_1+iI_2$, where
$I_1=\displaystyle\int_{a}^b u(x,c)-u(x,d)dx-\int_{c}^d v(b,y)-v(a,y)dy$ and $I_2=\displaystyle\int_{a}^b v(x,c)-u(x,d)dx+\int_{c}^d u(b,y)-u(a,y)dy$.
By Fundamental Theorem of Calculus and Fubini's Theorem, we have
$I_1=\displaystyle\int_{a}^b\int_{c}^{d} -\dfrac{\partial u}{\partial y}-\dfrac{\partial v}{\partial x}dydx$ and $I_2=\displaystyle\int_{a}^b\int_{c}^{d} -\dfrac{\partial v}{\partial y}+\dfrac{\partial u}{\partial x}dydx$
Since $f$ is analytic, it satisfies the Cauchy-Riemann Equations: $-\dfrac{\partial u}{\partial y}-\dfrac{\partial v}{\partial x}=-\dfrac{\partial v}{\partial y}+\dfrac{\partial u}{\partial x}=0$
So $I_1=I_2=0$. We are done.
I am just wondering whether this proof is valid. But I have never seen any classics on Complex Analysis adopting this proof.