Simplifying an integral by changing the order of integration Question: Consider a triple integral of the following form
\begin{equation}
\int_{x=0}^1 \int_{y=0}^{1} \int_{z=0}^{1} f(x,y,z)dzdydx.
\end{equation}
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
\begin{equation}
\int_{x=0}^1 \int_{y=0}^{x} \int_{z=0}^{y} g(x,y,z)dzdydx,
\end{equation}
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 
\begin{equation}
\int_{x=0}^1 \int_{y=0}^{1} f(x,y)dydx.
\end{equation}
This integral is equivalent to the sum of two integrals:
\begin{equation}
\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.
\end{equation}
By changing the order of the integration in the last integral above, we obtain
\begin{equation}
\int_{x=0}^1 \int_{y=x}^{1} f(x,y)dydx = \int_{y=0}^1 \int_{x=0}^{y} f(x,y)dxdy.
\end{equation}
Renaming $x$ as $y$ and vice-versa on the integral in the right hand side, we obtain
\begin{equation}
\int_{x=0}^1 \int_{y=0}^{x} h(x,y)dydx
\end{equation}
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}
 A: 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\\
&\qquad+\int_{x=0}^1\left(\int_{z=0}^1\int_{y=0}^zf(x,y,z)\,dy\,dz\right)\,dx\tag{2}\\
&=\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\\
&\qquad+\int_{x=0}^1\int_{z=0}^xh(x,z)\,dz\,dx
+\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\\
&\qquad+\int_{y=0}^1\left(\color{blue}{\int_{x=0}^y\int_{z=0}^yf(x,y,z)\,dz\,dx}\right)\,dy\\
&\qquad+\int_{x=0}^1\int_{z=0}^x\int_{y=0}^zf(x,y,z)\,dy\,dz\,dx\\
&\qquad+\int_{z=0}^1\left(\color{red}{\int_{x=0}^z\int_{y=0}^zf(x,y,z)\,dy\,dx}\right)\,dz\tag{5}\\
&=\int_{x=0}^1\int_{y=0}^x\int_{z=0}^yf(x,y,z)\,dz\,dy\,dx\\
&\qquad+\int_{y=0}^1\left(\color{blue}{\int_{x=0}^y\int_{z=0}^xf(x,y,z)\,dz\,dx}\right)\,dy\\
&\qquad+\int_{y=0}^1\left(\color{blue}{\int_{z=0}^y\int_{x=0}^zf(x,y,z)\,dx\,dz}\right)\,dy\\
&\qquad+\int_{x=0}^1\int_{z=0}^x\int_{y=0}^zf(x,y,z)\,dy\,dz\,dx\\
&\qquad+\int_{z=0}^1\left(\color{red}{\int_{x=0}^z\int_{y=0}^xf(x,y,z)\,dy\,dx}\right)\,dz\\
&\qquad+\int_{z=0}^1\left(\color{red}{\int_{y=0}^z\int_{x=0}^yf(x,y,z)\,dx\,dy}\right)\,dz\tag{6}
\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.
