$$\def\ans#1{\bbox[border:1px solid green,6pt]{#1}}$$

# Triple Integrals

## Introduction

Triple integrals are more difficult (in fact, usually impossible) to picture than double integrals, but the principle is much the same. Instead of integrals like $\iint_R f(x,y) \ dA,$ now we'll handle integrals like $\iiint_D f(x,y,z)\ dV$ where $$D$$ is a 3-dimensional body.

#### Note:

The volume of $$D$$ is given by the triple integral $\textrm{Volume } = \iiint_D\ dz\ dy\ dx$

Again, the challenge with triple integrals really lies with finding the limits of integration; once we have those, we simply have to carry out the integration, which usually isn't too complicated.

Evaluate the following triple integral.

$\int_0^2 \int_0^3 \int_0^2\ dx\ dy\ dx$

#### Solution

\begin{align} \int_0^2 \int_0^3 \int_0^2\ dx\ dy\ dx &= \int_0^2 \int_0^3 2\ dy\ dx\\ &= \int_0^2 6\ dx = \ans{12} \end{align}

Note that this gives the volume of a $$2 \times 3 \times 2$$ cube.

Use a triple integral to find the volume of the prism $$D$$ in the first octant bounded by the planes $$y=4-2x$$ and $$z=6$$.

#### Solution

Note that this prism is

$D=\{(x,y,z)\ :\ 0 \leq x \leq 2,\ 0 \leq y \leq 4-2x,\ 0 \leq z \leq 6\}$ or $D=\{(x,y,z)\ :\ 0 \leq x \leq 2-\dfrac{1}{2}y,\ 0 \leq y \leq 4,\ 0 \leq z \leq 6\}$

We can write this integral in several ways, all of which give the same answer:

\begin{align} V &= \int_0^6 \int_0^2 \int_0^{4-2x} \ dy\ dx\ dz\\ &= \int_0^2 \int_0^{4-2x} \int_0^6 \ dx\ dy\ dx\\ &= \int_0^6 \int_0^4 \int_0^{2-y/2} \ dx\ dy\ dz\\ &= \ans{24} \end{align}

Notice that in each case, we have to make sure that we use the limits that involve one variable before we integrate with respect to that variable.

#### Try it yourself:

(click on the problem to show/hide the answer)

Find the volume of the solid in the first octant bounded by the plane $$2x+3y+6z=12$$ and the coordinate planes.
$$\displaystyle\int_0^4 \displaystyle\int_0^{6-3y/2} \displaystyle\int_0^{12-2x-3y} \ dz\ dx\ dy = \displaystyle\int_0^6 \displaystyle\int_0^{4-2x/3} \displaystyle\int_0^{12-2x-3y} \ dz\ dy\ dx = 8$$

## Simple Applications

### Mass

If the density of a body is a function of position ($$\rho=f(x,y,z)$$), then the mass of the body is the integral

$M = \iiint_D f(x,y,z)\ dV$

If the density function is given by $$\rho=2-z$$ kg/m$$^3$$ for the cube $D=\{(x,y,z)\ :\ 0 \leq x \leq 3,\ 0 \leq y \leq 2,\ 0 \leq z \leq 1\},$ find the mass of this cube.

#### Solution

\begin{align} M &= \int_0^1 \int_0^2 \int_0^3 2-z\ dx\ dy\ dz\\ &= \int_0^1 \int_0^2 6-3z\ dy\ dz\\ &= \int_0^1 12-6z\ dz\\ &= 12z-3z^2 \bigg|_0^1 = \ans{9\ kg} \end{align}

### Average Value

The average value of $$f(x,y,z)$$ is

$\overline{f} = \dfrac{1}{\textrm{volume of } D} \iiint_D f(x,y,z)\ dV$

Find the average value of $$f(x,y,z)=250 xy \sin (\pi z)$$ over the cube

$D=\{(x,y,z)\ :\ 0 \leq x \leq 2,\ 0 \leq y \leq 2,\ 0 \leq z \leq 1\}.$

#### Solution

\begin{align} \overline{f} &= \dfrac{1}{4} \int_0^1 \int_0^2 \int_0^2 250 xy \sin (\pi z) \ dx\ dy\ dz\\ &= \dfrac{1}{4} \int_0^1 \int_0^2 500 y \sin (\pi z) \ dy\ dz\\ &= \dfrac{1}{4} \int_0^1 1000 \sin (\pi z)\ dz\\ &= \dfrac{1}{4} \bigg[ -1000 \cdot \dfrac{1}{\pi} \cos (\pi z) \bigg]_0^1\\ &= \ans{\dfrac{500}{\pi}} \end{align}

#### Try it yourself:

(click on the problem to show/hide the answer)

Find the average value of $$f(x,y,z) = 128e^{-x-y-z}$$ in the cube $$D = \{(x,y,z)\ :\ 0 \leq x \leq \ln 2, 0 \leq y \leq \ln 4, 0 \leq z \leq \ln 8\}$$.
$$\dfrac{1}{(\ln 2)(\ln 4)(\ln 8)}\displaystyle\int_0^{\ln 8} \displaystyle\int_0^{\ln 4} \displaystyle\int_0^{\ln 2} 128e^{-x-y-z}\ dx\ dy\ dz = \dfrac{7}{(\ln 2)^3}$$

## Examples

Evaluate $$\displaystyle\iiint_D 2x\ dV$$, where

$D=\{(x,y,z)\ :\ 0 \leq y \leq 2,\ 0 \leq x \leq \sqrt{4-y^2},\ 0 \leq z \leq y\}.$

#### Solution

\begin{align} \int_0^2 \int_0^{\sqrt{4-y^2}} \int_0^y &2x\ dz\ dx\ dy\\ &= \int_0^2 \int_0^{\sqrt{4-y^2}} 2xy \ dx\ dy\\ &= \int_0^2 (4-y^2)y\ dy\\ &= 2y-\dfrac{1}{4}y^4 \bigg|_0^2 = \ans{4} \end{align}

Find the volume of the solid in the first octant formed when the cylinder $$z=\sin y$$ for $$0 \leq y \leq \pi$$ is sliced by the planes $$y=x$$ and $$x=0$$.

#### Solution

Note that

$D=\{(x,y,z)\ :\ 0 \leq x \leq y,\ 0 \leq y \leq \pi,\ 0 \leq z \leq \sin y\}.$

The volume, then, is given by

\begin{align} V &= \int_0^\pi \int_0^y \int_0^{\sin y} \ dz\ dx\ dy\\ &= \int_0^\pi \int_0^y \sin y\ dx\ dy\\ &= \int_0^\pi y \sin y\ dy\\ &= -y\cos y + \sin y \bigg|_0^\pi \ \ \ \textrm{ (using Integration by Parts)}\\ &= \ans{\pi} \end{align}

Find the volume of the prism in the first octant bounded by $$z=2-4x$$ and $$y=8$$.

#### Solution

Note that

$D=\{(x,y,z)\ :\ 0 \leq x \leq 1/2,\ 0 \leq y \leq 8,\ 0 \leq z \leq 2-4x\}.$

The volume, then, is given by

\begin{align} V &= \int_0^8 \int_0^{1/2} \int_0^{2-4x} \ dz\ dx\ dy\\ &= \int_0^8 \int_0^{1/2} 2-4x\ dx\ dy\\ &= \int_0^8 \bigg[ 2x-2x^2 \bigg]_0^{1/2}\ dy\\ &= \int_0^8 \dfrac{1}{2}\ dy = \ans{4} \end{align}

Find the volume of the wedge bounded by the parabolic cylinder $$y=x^2$$ and the planes $$z=3-y$$ and $$z=0$$.

#### Solution

Note that

$D=\{(x,y,z)\ :\ -\sqrt{3} \leq x \leq \sqrt{3},\ x^2 \leq y \leq 3,\ 0 \leq z \leq 3-y\}.$

The volume, then, is given by

\begin{align} V &= \int_{-\sqrt{3}}^{\sqrt{3}} \int_{x^2}^{3} \int_0^{3-y} \ dz\ dy\ dx\\ &= \int_{-\sqrt{3}}^{\sqrt{3}} \int_{x^2}^{3} 3-y\ dy\ dx\\ &= \int_{-\sqrt{3}}^{\sqrt{3}} \dfrac{9}{2}-3x^2+\dfrac{1}{2}x^4\ dx\\ &= \dfrac{9}{2}x-x^3+\dfrac{1}{10}x^5 \bigg|_{-\sqrt{3}}^{\sqrt{3}} = \ans{\dfrac{24\sqrt{3}}{5}} \end{align}

#### Try it yourself:

(click on a problem to show/hide its answer)

1. Evaluate the integral $$\displaystyle\iiint_D xy+xz+yz\ dV$$, where $$D = \{(x,y,z)\ :\ -1 \leq x \leq 1, -2 \leq y \leq 2, -1 \leq z \leq 3\}$$.
2. 0

3. Find the volume of the wedge above the xy plane formed when the cylinder $$x^2+y^2=4$$ is cut by the planes $$z=0$$ and $$z=-y$$.

4. $$\displaystyle\int_{-2}^2 \displaystyle\int_{-\sqrt{4-x^2}}^0 \displaystyle\int_0^{-y} \ dz\ dy\ dx = \dfrac{16}{3}$$

5. Find the volume of the solid bounded by the surfaces $$z=e^y$$ and $$z=1$$ over the rectangle $$\{(x,y)\ :\ 0 \leq x \leq 1, 0 \leq y \leq \ln 2\}$$.

6. $$\displaystyle\int_0^1 \displaystyle\int_0^{\ln 2} \displaystyle\int_1^{e^y} \ dz\ dy\ dx = 1-\ln 2$$

7. Find the volume of the wedge of the cylinder $$x^2+4y^2=4$$ created by the planes $$z=3-x$$ and $$z=x-3$$.

8. $$\displaystyle\int_{-1}^1 \displaystyle\int_{-\sqrt{4-4y^2}}^{\sqrt{4-4y^2}} \displaystyle\int_{x-3}^{3-x} \ dz\ dx\ dy = 12\pi$$

9. Rewrite the integral $$\displaystyle\int_0^5 \displaystyle\int_{-1}^0 \displaystyle\int_0^{4x+4}\ dy\ dx\ dz$$ in the order of $$dz\ dx\ dy$$.
10. $$\displaystyle\int_0^4 \displaystyle\int_{y/4-1}^0 \displaystyle\int_0^5 \ dz\ dx\ dy = 10$$

11. Evaluate the integral $$\displaystyle\int_0^1 \displaystyle\int_0^{\sqrt{1-x^2}} \displaystyle\int_0^{\sqrt{1-x^2}}\ dz\ dy\ dx$$.
12. $$\dfrac{2}{3}$$

13. Evaluate the integral $$\displaystyle\int_1^6 \displaystyle\int_0^{4-2y/3} \displaystyle\int_0^{12-2y-3z} \dfrac{1}{y}\ dx\ dz\ dy$$.
14. $$-45+24\ln 6$$