# Simplifying an integral by changing the order of integration

Question: Consider a triple integral of the following form

\int_{x=0}^1 \int_{y=0}^{1} \int_{z=0}^{1} f(x,y,z)dzdydx.

Because of the specific $f(\cdot,\cdot,\cdot)$ function I am dealing with, I would like to convert the above integral into the following form

\int_{x=0}^1 \int_{y=0}^{x} \int_{z=0}^{y} g(x,y,z)dzdydx,

where $g(\cdot,\cdot,\cdot)$ is an appropriately defined function. This form is easier to work with because the integrands are nicely ordered as $x\ge y \ge z.$

Example: I am able to do a similar trick for a double integral. Consider

\int_{x=0}^1 \int_{y=0}^{1} f(x,y)dydx.

This integral is equivalent to the sum of two integrals:

\int_{x=0}^1 \int_{y=0}^{1} f(x,y)dydx=\int_{x=0}^1 \int_{y=0}^{x} f(x,y)dydx+\int_{x=0}^1 \int_{y=x}^{1} f(x,y)dydx.

By changing the order of the integration in the last integral above, we obtain

\int_{x=0}^1 \int_{y=x}^{1} f(x,y)dydx = \int_{y=0}^1 \int_{x=0}^{y} f(x,y)dxdy.

Renaming $x$ as $y$ and vice-versa on the integral in the right hand side, we obtain

\int_{x=0}^1 \int_{y=0}^{x} h(x,y)dydx

for an appropriate $h(x,y).$
Thus, the original integral is given as
\begin{align}
\int_{x=0}^1 \int_{y=0}^{1} f(x,y)dydx &=\int_{x=0}^1 \int_{y=0}^{x} f(x,y)dydx+\int_{x=0}^1 \int_{y=0}^{x} h(x,y)dydx\\ &= \int_{x=0}^1 \int_{y=0}^{x} \left[ f(x,y)+h(x,y) \right] dydx.
\end{align}

#### Solutions Collecting From Web of "Simplifying an integral by changing the order of integration"

We iteratively apply the two-dimensional transformation. In order to do so we recall the slightly more generalized formula
\begin{align*}
\int_{x=0}^z\int_{y=0}^zf(x,y)\,dx\,dy
=\int_{x=0}^z\int_{y=0}^xf(x,y)\,dy\,dx+\int_{y=0}^z\int_{x=0}^yf(x,y)\,dx\,dy\tag{1}
\end{align*}

We obtain
\begin{align*}
\int_{x=0}^1&\left(\int_{y=0}^1\int_{z=0}^1f(x,y,z)\,dz\,dy\right)\,dx\\
&=\int_{x=0}^1\left(\int_{y=0}^1\int_{z=0}^yf(x,y,z)\,dz\,dy\right)\,dx\\
&=\int_{x=0}^1\int_{y=0}^1g(x,y)\,dy\,dx
+\int_{x=0}^1\int_{z=0}^1h(x,z)\,dz\,dx\tag{3}\\
&=\int_{x=0}^1\int_{y=0}^xg(x,y)\,dy\,dx
+\int_{y=0}^1\color{blue}{\int_{x=0}^yg(x,y)\,dx}\,dy\\
+\int_{z=0}^1\color{red}{\int_{x=0}^zh(x,z)\,dx}\,dz\tag{4}\\
&=\int_{x=0}^1\int_{y=0}^x\int_{z=0}^yf(x,y,z)\,dz\,dy\,dx\\
&=\int_{x=0}^1\int_{y=0}^x\int_{z=0}^yf(x,y,z)\,dz\,dy\,dx\\
\end{align*}
and we are done.

Comment:

• In (2) we apply (1) to the bracketed double integral on the left-hand side.

• In (3) write $g(x,y)=\int_{z=0}^yf(x,y,z)\,dz$ and $h(x,z)=\int_{y=0}^zf(x,y,z)\,dy$

• In (4) we apply again (1) twice, once for the double integral with integrand $g(x,y)$ and once for the double integral with integrand $h(x,z)$.

• In (5) we substitute back for $g(x,y)$ and $h(x,z)$ and observe the bracketed double-integrals need one more transformation according to (1)

• In (6) we finally do this last transformation to the bracketed double integrals.