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

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.

• When $x=1$ the second integral in the first triple integral has bounds $1$ and $5-x=4$. – bjorn93 Dec 30 '19 at 1:50
• Could I suggest that instead of $\displaystyle \int_1^{min(8-x-y,3)},$ you write $\displaystyle \int_1^{\min(8-x-y,3)},$ and instead of $2 dz dy dx$ you write $2\,dz\,dy\,dx. \qquad$ – Michael Hardy Dec 30 '19 at 1:53
• @MichaelHardy, Done, thank you – ahdahmanii Dec 30 '19 at 1:58
• @ahdahmanii now you go outside the bounds in the second triple integral. When $x=1$, $y$ goes from 4 to 3. – bjorn93 Dec 30 '19 at 2:08
• @bjorn93 fixed, thank you. – ahdahmanii Dec 30 '19 at 2:11

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

• How sure are you that your answer is right? – Bob Dec 30 '19 at 15:29
• @Bob It seems like my answer evaluates to what WolframAlpha gives, so I guess it's OK. – bjorn93 Dec 30 '19 at 15:38
$$\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.$$
• Well, the same issue here, right? When $x=1$ the second integral in the first triple integral has bounds $1$ and $5-x=4$. – bjorn93 Dec 30 '19 at 1:54
• As the other answer. The second integral in the first triple integral (on the last line) goes outside the bounds $1\leq y\leq 3$. When $x=1$, they are $1$ and $4$. – bjorn93 Dec 30 '19 at 2:01