Evaluating a Triple integral where one bound is a function of two variables Problem:
Evaluate the following triple integral:
$$ \int_1^3 \int_1^3 \int_1^{\min(8 - x - y,3)} 2 \, dz \, dy \, dx $$
Answer:
The problem is the bound $\min(8 - x - y,3)$. I would like to write it as the sum of two triple integrals with simple bounds. I could try something like:
$$ \int_1^3 \int_1^3 \int_1^{\min(8 - x - y,3)} 2 \, dz \, dy \, dx = \int_1^2 \int_1^2 \int_1^{3} 2 \, dz \, dy \, dx + \int_2^3 \int_2^3 \int_1^{8 - x - y} 2 \, dz \, dy \, dx $$
but I know that is wrong. What is the right approach to evaluate this integral?
Based upon comments I received, I am updating my post.
Using Wolfram, I find:
$$\int_1^3 \int_1^3 \int_1^{\min(8 - x - y,3)} 2 \, dz \, dy \, dx = \frac{47}{3} $$
Using Wolfram, I find:
$$ \int_2^3 \int_1^{5-x} \int_1^3 2\,dz\,dy\,dx = 2 $$
Using Wolfram, I find:
$$ \int_2^3 \int_{5-x}^3 \int_1^{8-x-y} 2\,dz\,dy\,dx = 4 $$
Since $4 + 2 = 6$ not $\frac{47}{3}$ My answer is wrong.
 A: We have 
$$\min(8 - x - y,3) = \begin{cases} 8-x-y & \text{if } x+y\ge5, \\ 3 & \text{if } x+y \le 5. \end{cases}$$
 when the triangle $x+y \leq 5 $ contains some points out of the rectangle, to fix this we have to split it into two parts: $1\leq y \leq 3 $ when $1\leq x \leq 2$ and $1 \leq y \leq 5-x$ when $2\leq x \leq 3$
So:
$$\int_1^3 \int_1^3 \displaystyle \int_1^{\min(8-x-y,3)} 2\,dz\,dy\,dx \qquad= \int_1^2 \int_1^3 \int_1^3 2\,dz\,dy\,dx \qquad + \int_2^3 \int_1^{5-x} \int_1^3 2\,dz\,dy\,dx +\int_2^3 \int_{5-x}^3 \int_1^{8-x-y} 2\,dz\,dy\,dx \qquad $$
I think that you can take it from here.
A: Draw a picture of the rectangle $1\leq x\leq 3, 1\leq y\leq 3$ and of the boundary line $8-x-y=3 \Leftrightarrow y=5-x$. Notice that below the line (and staying in the rectangle) $\min(8-x-y,3)=3$ and above the line in the rectangle $\min(8-x-y,3)=8-x-y$. Also notice that $\min(8-x-y,3)=3$ in the rectangle $1\leq x\leq 2,1\leq y\leq 3$. So, we can split it up as:
$$\int_1^2\int_1^3\int_1^32\,\mathrm{d}z\,\mathrm{d}y\,\mathrm{d}x+\int_2^3\int_1^{5-x}\int_1^32\,\mathrm{d}z\,\mathrm{d}y\,\mathrm{d}x+\int_2^3\int_{5-x}^3\int_1^{8-x-y}2\,\mathrm{d}z\,\mathrm{d}y\,\mathrm{d}x $$
A: $$
\min\{8 - x - y,3\} = \begin{cases} 8-x-y & \text{if } x+y\ge5, \\ 3 & \text{if } x+y \le 5. \end{cases}
$$
$$ {} $$
\begin{align}
& \overbrace{ \iint\limits_{\begin{smallmatrix} (x,y) \,:\, 1\,\le\,x,y\,\le 3 \\[3pt] \&\ \ x\,+\,y\,\le\, 5 \end{smallmatrix} } \left( \int_1^3 2 \, dz \right) \, d(x,y)}^\text{This one says “$\le~5$''.} {} \,\,+\,\, {} \overbrace{ \iint\limits_{\begin{smallmatrix} (x,y) \,:\, 1\,\le\,x,y\,\le 3 \\[3pt] \&\ \ x\,+\,y\,\ge\, 5 \end{smallmatrix}} \left( \int_1^{8-x-y} 2\,dz \right) \, d(x,y)}^\text{This one says “$\ge~5$''.} \\[10pt]
= {} & \int_1^3 \left( \int_1^{\min\{3,5-x\}} \left( \int_1^3 2\,dz \right) \, dy \right) \, dx + \int_1^3 \left( \int_{\min\{3,5-x\}}^3 \left( \int_1^{8-x-y} 2 \, dz \right) \, dy \right) \, dx.
\end{align}
And then
$$
\int_1^3 \left( \int_1^{\min\{3,5-x\}} \cdots \, dy \right) \,dx = \int_1^2\left( \int_1^3 \cdots \, dy \right) \, dx + \int_2^3 \left( \int_1^{5-x} \cdots \, dy \right) \, dx
$$
and
$$
\int_1^3 \left( \int_{\min\{3,5-x\}}^3 \cdots \, dy \right) \, dx =  \int_2^3 \left( \int_{5-x}^3 \cdots\,dy \right) \, dx.
$$
