I want to evaluate $\frac{1}{2\pi}\oint_C\dfrac{-y\,dx+x\,dy}{x^2+y^2}$ clockwise around the square with vertices $(-1,-1)$, $(-1,1)$, $(1,1)$ and $(1,-1).$
Obviously $C$ is closed. So if we use Green's theorem for $\vec{F}=(\frac{-y}{x^2+y^2},\,\frac{x}{x^2+y^2})$, we would have: $$\frac{\partial{F_2}}{\partial{x}}-\frac{\partial{F_1}}{\partial{y}}$$ $$=\frac{y^2-x^2}{(x^2+y^2)^2}-\frac{y^2-x^2}{(x^2+y^2)^2}=0$$ So by Green's theorem, integral should be zero. But if we do the integral on four line segments, we will see that it's equal to $-1$. Why is that and where am I wrong?