How do you change the order of integration without sketching? Specifically, for a double integral $$\int_a^b \int_{g_1(x)}^{g_2(x)} f(x,y) \, dy \, dx$$ how would you change the order of integration without having to sketch it out? I came across this while researching which talks about the use of the Heaviside function, however I am unsure how to apply this process to all double integrals.
Thanks!
 A: I consider it similar
to reversing the order of summation
in a double sum.
I'm going to
try to think this through
logically.
In this case,
$\int_a^b \int_{g_1(x)}^{g_2(x)} f(x,y) \, dy \, dx$,
$g_1(x) \le y \le g_2(x)$.
Therefore,
assuming that
$g_1$ and $g_2$
are strictly monotonic increasing
and therefore have an inverse,
and also satisfy
$g_1(x) \le g_2(x)$,
$x \le g_1^{(-1)}(y)$
and
$x \ge g_2^{(-1)}(y)$
so the new inner integral
will  go from
$g_2^{(-1)}(y)$
to
$g_1^{(-1)}(y)$.
Since $a \le x \le b$,
$y \le g_2(b)$
and
$y \ge g_1(a)$
so the outer integral
would go from
$g_1(a)$
to
$g_2(b)$.
So the integral would be
$\int_{g_1(a)}^{g_2(b)} \int_{g_2^{(-1)}(y)}^{g_1^{(-1)}(y)} f(x, y) \,dx\,dy$.
A: \begin{align}
& \int_a^b \int_{g_1(x)}^{g_2(x)} f(x,y) \, dy \, dx \\[10pt]
= {} & \iint\limits_{\begin{array}{c} a\,\le\,x\,\le\,b \\g_1(x) \,\le\,y\,\le\,g_2(x) \end{array}} f(x,y) \, d(x,y) \\[10pt]
= {} & \int_{\min g_1}^{\max g_2} \left(\,\, \int\limits_{x\,\in\,g_1^{-1}(-\infty,y] \,\cap\,g_2^{-1}[y,+\infty)} f(x,y) \, dx \right) \,dy
\end{align}
where $\displaystyle g_1^{-1}(-\infty,y] = \{ x : g_1(x) \le y \},$ and similarly for the other set. (This does not mean that $g_1$ or $g_2$ has an inverse function; it just means one can take the inverse image of a set under a function.)
Without more information about $g_1$ and $g_2,$ I don't think one can be more specific.
