Fubini's Theorem contradiction Why does the fact that
$\int_0^1\int_0^1 \frac{x^2-y^2}{(x^2+y^2)^2} \,dy \,dx = \frac{\pi}{4}$ and $ \int_0^1\int_0^1 \frac{x^2-y^2}{(x^2+y^2)^2} \,dx \,dy = -\frac{\pi}{4}$ doesn't contradict Fubini's Theorem? Does the tangent function have something to do with that matter?
 A: Fubini's theorem says that if $\displaystyle \int_{X \times Y} \vert f(x,y) \vert d(x,y) < \infty$ then $$\int_X \left( \int_Y f(x,y) dy \right) dx = \int_Y \left( \int_X f(x,y) dx \right) dy = \int_{X \times Y} f(x,y) d(x,y)$$
But here, $\displaystyle \int_{X \times Y} \vert f(x,y) \vert d(x,y) = \infty$ so we should not expect the integrals to be equal.
Specifically, 
$$\begin{align*} \int_{I \times I} \left\vert \frac{x^2-y^2}{(x^2+y^2)^2} \right\vert d(x,y) &\ge \int_0^1 \left(\int_0^ x\frac{x^2-y^2}{(x^2+y^2)^2} dy \right) dx\\ &=\int_0^1 \left[ \frac{y}{x^2+y^2} \right]_{y=0}^x dx\\ &= \int_0^1 \frac{1}{2x} dx = + \infty. \end{align*}$$
A: Fubini's theorem has hypotheses, and those hypotheses are not satisfied in that example.
Why not? That depends on which version of Fubini's theorem you're talking about, the theorem in measure theory (which was actually proved by Fubini) or the  theorem from calculus that's often called "Fubini's theorem"... In either case, look up the theorem and read it carefully.
A: $$
\int_0^1 \int_0^1 \left| \frac{x^2-y^2}{(x^2+y^2)^2} \right| \,dx\,dy = +\infty
\text{; therefore Fubini's theorem is not applicable.}
$$
Fubini's theorem deals with equality of three integrals:
\begin{align}
& \iint\limits_{[a,b]\,\times\,[c,d]} f(x,y) \, d(x,y), & & \text{a double integral,} \\[12pt]
& \int_a^b \left( \int_c^d f(x,y)\, dy \right) \, dx & & \text{not a double integral,} \\
& & & \text{but an iterated integral,} \\[12pt]
& \int_c^d \left( \int_a^b f(x,y) \, dx \right) \, dy & & \text{also an iterated integral.}
\end{align}
Fubini's theorem says these are equal if $f(x,y)$ is “integrable”, and “integrable” means this:
$$
f \text{ is integrable if }  \iint\limits_{[a,b]\,\times\,[c,d]} |f(x,y)| \, d(x,y) < +\infty.
$$
The double integral is defined using $2$-dimensional Lebesgue measure in the plane.
The two iterated integrals are defind using $1$-dimensional Lebesgue measure in the line.
A: This $$\int_0^1\int_0^1 \frac{x^2-y^2}{(x^2+y^2)^2} \,dy \,dx$$ is an improper integral which diverges to $\infty $ and there is no conflicts with Fubini's theorem. 
The tangent has no role in it.
The problem is with the $(x^2+y^2)^2$ in the denominator.  
