# Double Integral of piece wise function?

Let $I=[0,1]\times[0,1]$ and let $$f(x)= \begin{cases} 0, & \text{if (x,y)=(0,0)}\\ \frac{x^2-y^2}{(x^2+y^2)^2}, & \text { if (x,y)\not=(0,0)}\\ \end{cases}$$ Need to show that $$\int^1_0\int^1_0 f(x,y)dxdy=\int_0^1\int_0^1 f(x,y)dydx.$$ I cant seem to integrate $$\int_0^1\frac{x^2-y^2}{(x^2+y^2)^2}dx.$$ I am thinking that I could use polar coordinates maybe by $r^2=x^2+y^2$.

-
for your first question, if your function is nonegative, you can change the order of integration at will. You don't even to need to know if the integral converges or not. Google Fubini's Theorem. The second part of $f(x)$ simplifies to $1/(x^2+y^2)$. Did you enter it right? Finally, is $f$ a function of one or of two variables? –  Stefan Smith Apr 21 '13 at 21:35
Check out the wikipedia page on Fubini's theorem: en.wikipedia.org/wiki/Fubini's_theorem Your integral evaluates to $\pi/4$ in one order of integration and $-\pi/4$ in the other. ???Need to show that "$\not=$"??? –  Bill Cook Apr 22 '13 at 1:56

Use a trig substitution: $x=y \tan{t}$. Then the inner integral becomes
$$-\frac1y \int_0^{\arctan{(1/y)}} dx \: \cos{2 t} = -\frac{1}{1+y^2}$$
Note that the current $f$ is anti-symmetric about $y=x$. Fubini doesn't apply since $f$ is not locally integrable at $0$. Indeed, the iterated integrals will be off by a factor of $-1$.