<s>[INST] Calculus Question - change order of integration Can We always change the order of integration in double integrals ?
 [/INST] Here is a counterexample that shows the value might not coincide.
Consider the function 
$$
\frac{x^2-y^2}{(x^2+y^2)^2}
$$
A $y$-primitive for this on $[1,\infty)$ is
$$
\frac{y}{x^2+y^2}
$$
which simplifies to $$-\frac{1}{1+x^2},$$ when evaluated from $1$ to $\infty$.
Knowing this, and the fact that $$\int \frac{1}{1+x^2}=\arctan(x)+C,$$ we get
$$
\int_1^\infty \int_1^\infty \frac{x^2-y^2}{(x^2+y^2)^2} dydx=\int_1^\infty -\frac{1}{1+x^2}=-\frac{\pi}{4}.
$$
Now changing the order, we get
$$
\int_1^\infty \int_1^\infty \frac{x^2-y^2}{(x^2+y^2)^2} dxdy=-\int_1^\infty \int_1^\infty \frac{-x^2+y^2}{(x^2+y^2)^2} dxdy=\int_1^\infty \frac{1}{1+y^2}=\frac{\pi}{4}.
$$
There are theorem that can garantee the change will provide the same answer, namely Fubini's. As Glebovg pointed out, you can find this example and some other theorems here.
</s>