# Why these line integrals have the same value?

I'm posting with my phone so I cannot using latex. I will be thankful if somebody correct my post.

I want to integrate $x^2-iy^2$ on the complex plane with

(a) closed unit circle

(b) closed unit square $(+1+i, 1-i, -1+i, -1-i)$

By my calculation, the answers are same; zero. But the integrand is not analytic so I cannot use Cauchy integral theorem. Then how can I explain this situation?

-
If you cannot apply the theorem, this does not mean that the zero cannot arise as a result. Simply you cannot predict the result. –  enzotib Sep 15 '12 at 14:22
In fact, the standard parameterization of the circle gives integral 0. But parameterizing each side of the square by x or y, as appropriate, gives sum of integrals on the sides to be 4 i. –  murray Sep 15 '12 at 14:26
Morera's theorem says that a function $f$ is analytic iff all integrals on ALL closed piecewise differentiable curves vanish. There isn't anything inherently interesting about this particular function you have as you can find plenty of closed contours which will not give you zero.