Solving multiple integrals I need to integrate $\displaystyle f(x,y)=\frac{x^2-y^2}{(x^2+y^2)^2}$ on $R=[0,1]\times [0,1]$
If I take $u=x^2+y^2,$ then $\int_0^1\int_{y^2}^{1+y^2}\frac{u-2y^2}{u^2}du$. I do not know how to proceed from here. Any help would be appreciated!
Thanks in advance!
 A: We must have
$$
\int_0^1 \left( \int_0^1 \frac{x^2-y^2}{(x^2+y^2)^2} \,dx\right) \,dy = - \int_0^1 \left( \int_0^1 \frac{x^2-y^2}{(x^2+y^2)^2} \,dy\right) \,dx
$$
since the difference between the two expressions is really only a reversal in the order of subtraction.
Now to the inner integral:
\begin{align}
& \int_0^1 \frac{x^2-y^2}{(x^2+y^2)^2}\,dx = \int_0^{\arctan(1/y)} \frac{y^2\tan^2\theta - y^2}{(y^2\tan^2\theta + y^2)^2} (y\sec^2\theta\,d\theta) \\[10pt]
= {} & \int_0^{\arctan(1/y)} \frac{y^2\tan^2\theta - y^2}{(y^2\sec^2\theta)^2} (y\sec^2\theta\,d\theta) = \int_0^{\arctan(1/y)} \frac{\tan^2\theta - 1}{y\sec^2\theta} \,d\theta \\[10pt]
= {} & \frac 1 y \int_0^{\arctan(1/y)} (\sin^2\theta-\cos^2\theta) \, d\theta = \frac 1 y \int_0^{\arctan(1/y)} -\cos(2\theta)\,d\theta \\[10pt]
= {} & 
\frac 1 y \left[ \frac{-\sin(2\theta)} 2 \right]_0^{\arctan(1/y)} = \frac 1 y \left( -2\sin\left(\arctan\frac 1 y\right) \cos\left( \arctan \frac 1 y \right) \right) \\[10pt]
= {} & \frac 1 y \left( \frac {-1} {\sqrt{1+y^2}} \cdot \frac y {\sqrt{1+y^2}}  \right) = \frac {-1} {1+y^2}.
\end{align}
The outer integral is then
$$
\int_0^1 \frac{-dy}{1+y^2} = \frac {-\pi} 4.
$$
Hence when we integrate in the other order we get $+\pi/4$.
By Fubini's theorem, these two iterated integrals can differ in value only if we fail to have absolute convergence, i.e. the double integral (as opposed to the iterated integrals) of the absolute value is infinite:
$$
\iint_{[0,1]\times[0,1]} \left| \frac{x^2 -y^2}{(x^2+y^2)^2} \right| \, d(x,y) = \infty.
$$
Notice that we used these trigonometric identities:
$$
\sin \arctan \frac 1 y = \frac 1 {\sqrt{1+y^2}} \text{ and } \cos \arctan \frac 1 y = \frac y {\sqrt{1+y^2}}.
$$
These can be shown as follows:
$$
\text{If }\tan\theta = \frac{\text{opposite}}{\text{adjacent}} = \frac 1 y \text{ then } \sin\theta = \frac{\text{opposite}}{\text{hypotenuse}} = \frac 1 {\sqrt{1+y^2}},
$$
where the length of the hypotenuse is found via the Pythagorean theorem, and the identity for cosine is done similarly.
A: Here is a quick way to evaluate the iterated integrals.  Note that we have the identity
$$\frac{x^2-y^2}{(x^2+y^2)^2}=-\frac{\partial^2}{\partial x\partial y}\arctan(y/x)$$
Then, we have
$$\begin{align}
\int_0^1 \left(\int_0^1 \frac{x^2-y^2}{(x^2+y^2)^2}\,dx\right)\,dy&=-\int_0^1 \left(\int_0^1 \frac{\partial^2}{\partial x\partial y}\arctan(y/x)\,dx\right)\,dy\\\\
&=-\int_0^1 \frac{1}{1+y^2}\,dy\\\\
&=-\pi/4
\end{align}$$
If we change the order of integration, then we have
$$\begin{align}
\int_0^1 \left(\int_0^1 \frac{x^2-y^2}{(x^2+y^2)^2}\,dy\right)\,dx&=-\int_0^1 \left(\int_0^1 \frac{\partial^2}{\partial x\partial y}\arctan(y/x)\,dy\right)\,dx\\\\
&=-\int_0^1 \frac{-1}{1+x^2}\,dx\\\\
&=+\pi/4
\end{align}$$
Since the iterated integrals are unequal, then the integral over $[0,1]\times[0,1]$ fails to converge absolutely (See Fubini's Theorem).
A: Here is a simple way to see this integral doesn't exist using polar coordinates.
Define standard polar coordinates by $r$ and $\phi$, with the transformation:
$$x=r\cos \phi$$
$$y=r\sin \phi$$
Plugging this in and using the Jacobian of the transformation (i.e. the area element), your integral becomes:
$$ \iint \frac{\cos^2 \phi - \sin^2 \phi}{r } \mathrm{d}r \,\mathrm{d}\phi$$
Now, in principle you would have to find an expression for the unit rectangle in polar coordinates, which is a bit of a pain. Luckily, the non-existence of the integral can already be shown by integrating over only a quarter of the unit circle, i.e.:
$$\int_0^{\pi / 4} \int_0^1 \frac{\cos^2 \phi - \sin^2 \phi}{r } \mathrm{d}r \,\mathrm{d}\phi = \int_0^{\pi / 4} \ln r \bigg|_0^1 = -\infty $$
