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!

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$.
