When can't you change the order of integration?
Apparently there are integrals which you can express as $\int_A \int_B f(x, y) \mathop{}\!\mathrm{d}x \mathop{}\!\mathrm{d}y$ but not $\int_C \int_D f(x, y) \mathop{}\!\mathrm{d}y \mathop{}\!\mathrm{d}x$. When would this be the case? Is it to do with their limits not being invertible functions?
$\endgroup$ 21 Answer
$\begingroup$There are pathological examples when the integral of the absolute value of $f$ over the whole space diverges. For instance, the example given in this question: if $$ f(x,y) = \begin{cases} e^{y-x}, & x > y \geq 0 \\ -e^{x-y}, & 0 \leq x \leq y \end{cases}$$ then $$ \int_0^\infty \left( \int_0^\infty f(x,y) \, dx \right) dy = 1$$ but $$ \int_0^\infty \left( \int_0^\infty f(x,y) \, dy \right) dx = -1.$$ The theorem used to determine whether you can switch the order of integration is Fubini's Theorem, which gives the condition that $\int_X\lvert f\rvert$ must converge, where $X$ is the whole space (in this case, $\mathbb{R}^2$).
$\endgroup$ 3