Question
Consider the function $$f(x,y) = \frac{xy(x^2-y^2)}{(x^2+y^2)^3}$$
Using the substitution $u=x^2+y^2$ and $du=2y dy$, the following integral becomes
$$\int_0^2 \int_0^1 f(x,y) dy dx = \frac{1}{5}$$ Using the substitution $u=x^2+y^2$ and $du=2x dy$, the following integral becomes
$$\int_0^1 \int_0^2 f(x,y) dy dx = -\frac{1}{20}$$ Why the iterated integration are giving different results? In other words, why Fubini theorem fails for this integral?
Is it because both $\int^\infty dy \int^\infty|f(x,y)| dx$, $\int^\infty dx \int^\infty|f(x,y)| dy $ doesn't converge? If so how do I calcualte the integral (it is so hard to calculate it)?
Let's go back to calculus I. Suppose you wish to compute
$$ \int_a ^b f(x) \ dx $$
by means of a change of variable $x = g(u)$. Then you'd write $dx = g'(u) \ du$ and (assuming $g$ is one-to-one), the integral becomes
$$ \int_{g^{-1}(a)} ^{g^{-1}(b)} f(g(u)) g'(u) \ du $$
and you proceed as normal.
For functions of several variables, you do something similar, but a full change of variables requires as many variables as there are present in the integral.
My comment said to consider $(u, v) = (x^2 + y^2, x^2 - y^2)$. Why? The objects on the right of the equals sign here appear in the integrand, and just placing $u = x^2 + y^2$ doesn't quite do a change of variables justice, as you need to map $(x, y)$ into $(u, v)$. What you've done was map $(x, y)$ into $(u, y)$, which doesn't really work.
I've mentioned a Jacobian in the comment. This is a scaling factor that is present in a coordinate change. A definition is that if $(x_1, x_2, \ldots, x_n) = (f_1(u), f_2(u), \ldots, f_n(u))$ where $u = (u_1, \ldots, u_n)$ is the coordinate system you're moving into, then the Jacobian $J$ is
$$ J = \left| \frac{\partial (x_1, \ldots, x_n)}{\partial (u_1, \ldots, u_n)} \right| = \det \left( \frac{\partial x_i}{\partial u_j} \right) $$
where the matrix in question is built by taking the derivative of $x_i$ with respect to $u_j$.
Usually the absolute value is taken, so the new volume measure with this change is $dx = |J| \ du$.
Try to follow along here and compute the integral. I have a feeling it should converge once the right substitution is made.