Triple Integrals
Extending integration to three dimensions - mass, volume, and iterated integrals - Kaplan §4.4
Prereq: §4.3 Double Integrals
To find the mass of an oddly-shaped solid, we pack it with tiny boxes and add up their contributions. How precise can we get?
From Flat to Solid
Double integrals let us integrate over flat regions - adding up values over area. But what if the region itself is three-dimensional? Picture a solid block of metal whose density varies from point to point. We want total mass, and the function $f(x,y,z)$ now depends on three variables.
The strategy is exactly what worked before, just one dimension higher. We subdivide our solid region $R$ into tiny rectangular boxes (parallelepipeds) using planes parallel to the coordinate planes. Number them $1$ to $n$, each with volume $\Delta_i V$. Pick a sample point $(x_i^*, y_i^*, z_i^*)$ in each box, evaluate $f$ there, and form the sum:
$$\sum_{i=1}^{n} f(x_i^*, y_i^*, z_i^*)\,\Delta_i V$$
What should we expect as the boxes shrink? If $f$ is continuous, the sampling errors in each box go to zero, and the sum converges. The mesh $h$ is the maximum diagonal of any sub-box, and we define:
Let's explore this concretely. We'll subdivide the unit cube $[0,1]^3$ into $n^3$ sub-boxes and evaluate $f(x,y,z) = x + y + z$ at each center. Before you touch the slider, make a prediction: the function ranges from $0$ (at the origin) to $3$ (at $(1,1,1)$). By symmetry, the average value should be... what? If you guessed $3/2$ - halfway between the min and max - you'd be right (the function is linear, so the average really is the midpoint). So $\iiint (x+y+z)\,dV = 3/2 \times 1 = 3/2$. Now watch how fast even a crude grid gets close:
Even with $n = 3$ (just 27 boxes), the approximation is already decent. By $n = 8$, the sum is within a fraction of a percent of $3/2 = 1.5$. The convergence story is the same as for double integrals - boundary effects wash out, the interior sum dominates.
Setting Up the Iterated Integral
Knowing the triple integral exists is one thing. To actually compute it, we need to reduce it to three nested single integrals - and that means figuring out the limits of integration.
The key idea is slicing, just as with double integrals. For the order $dz\,dy\,dx$:
- $x$ ranges over the full extent of $R$: from the smallest to the largest $x$-value in the solid.
- Fix $x$ and look at the cross-section - a 2D region in the $yz$-plane. Within that cross-section, $y$ ranges from $y_1(x)$ to $y_2(x)$.
- Fix both $x$ and $y$ - now we're on a vertical line through the solid. $z$ ranges from $z_1(x,y)$ to $z_2(x,y)$.
Let's make this concrete with the tetrahedron having vertices at $(0,0,0)$, $(1,0,0)$, $(0,2,0)$, and $(0,0,3)$. Its faces satisfy $\frac{x}{1} + \frac{y}{2} + \frac{z}{3} \le 1$, or equivalently $z \le 3\!\left(1 - x - \frac{y}{2}\right)$.
Before looking at the visualization, think about this: if we slice the tetrahedron with a plane $x = $ const, what shape do we get? The constraint becomes $\frac{y}{2} + \frac{z}{3} \le 1 - x$, which is... a triangle in the $yz$-plane! At $x = 0$, it's the biggest triangle ($y$ up to $2$, $z$ up to $3$). At $x = 1$, the triangle has shrunk to a single point. The cross-section shrinks linearly as $x$ increases.
Drag the slider to verify this intuition:
The limits emerge naturally from the geometry:
- $x$: from $0$ to $1$ (full extent of the tetrahedron along the $x$-axis)
- For a fixed $x$: $y$ from $0$ to $2(1-x)$ (the cross-section in $yz$ is a triangle)
- For fixed $x,y$: $z$ from $0$ to $3(1-x-y/2)$ (top surface of the tetrahedron)
So the triple integral over this tetrahedron becomes:
Common mistake: Writing the $y$-limits as constants (like $0$ to $2$) instead of functions of $x$. The cross-section changes shape as $x$ varies - that dependence is the whole point of the outer integrals. Similarly, the $z$-limits depend on both $x$ and $y$. Forgetting these dependencies gives the wrong region.
A Worked Example
Let's compute Kaplan's example step by step. The region is:
$$R: \quad 0 \le x \le 1, \quad 0 \le y \le x^2, \quad 0 \le z \le x+y$$
and the integrand is $f(x,y,z) = 2x - y - z$. The limits are already given in perfect iterated form, so we just need to integrate from the inside out.
Before diving in, let's get a rough sense of the answer. The region is small - $x$ only goes to 1, $y$ only up to $x^2 \le 1$, $z$ up to $x + y \le 2$. The integrand $2x - y - z$ is positive for small $y$ and $z$ but can go negative. Since the region is concentrated near the origin where $2x$ dominates, we'd expect a small positive number. Let's see.
Step 1: Inner integral (integrate in $z$)
Hold $x$ and $y$ fixed. $z$ runs from $0$ to $x+y$:
$$\int_0^{x+y}(2x - y - z)\,dz = \left[(2x-y)z - \frac{z^2}{2}\right]_0^{x+y}$$ $$= (2x-y)(x+y) - \frac{(x+y)^2}{2}$$Expanding: $(2x-y)(x+y) = 2x^2 + 2xy - xy - y^2 = 2x^2 + xy - y^2$.
And $(x+y)^2/2 = (x^2 + 2xy + y^2)/2$.
So the inner integral gives:
$$2x^2 + xy - y^2 - \frac{x^2 + 2xy + y^2}{2} = \frac{3x^2}{2} - \frac{3y^2}{2} = \frac{3}{2}(x^2 - y^2)$$Step 2: Middle integral (integrate in $y$)
Now $y$ runs from $0$ to $x^2$:
$$\int_0^{x^2}\frac{3}{2}(x^2 - y^2)\,dy = \frac{3}{2}\left[x^2 y - \frac{y^3}{3}\right]_0^{x^2}$$ $$= \frac{3}{2}\left(x^4 - \frac{x^6}{3}\right) = \frac{3}{2}\,x^4 - \frac{x^6}{2}$$Step 3: Outer integral (integrate in $x$)
Finally, $x$ runs from $0$ to $1$:
$$\int_0^1\left(\frac{3}{2}\,x^4 - \frac{x^6}{2}\right)dx = \frac{3}{2}\cdot\frac{x^5}{5}\Big|_0^1 - \frac{1}{2}\cdot\frac{x^7}{7}\Big|_0^1 = \frac{3}{10} - \frac{1}{14}$$ $$= \frac{21}{70} - \frac{5}{70} = \frac{16}{70} = \frac{8}{35}$$A small positive number, just as we predicted - the positive contributions from $2x$ slightly outweigh the negative contributions from $-y - z$.
The pattern is always the same: integrate from the inside out, treating the outer variables as constants at each stage. Each integral peels off one variable and its limits, leaving a simpler expression for the next integral.
Common mistake: Losing track of which variables are "constants" at each stage. When computing the inner $z$-integral, both $x$ and $y$ are fixed. When computing the middle $y$-integral, $x$ is fixed but $y$ is the variable. Writing it out fully at each step (as we did above) prevents sign errors and dropped terms.
Physical Applications
Imagine holding a solid object - say, a chunk of iron ore with impurities that make its density vary from point to point. You want to know its total mass. With a triple integral, the answer is beautifully simple:
This is exactly what our Riemann sum was doing: chopping the solid into tiny boxes, multiplying each box's volume by its density, and adding up. The integral is the limit of that process.
What about volume itself? That's even simpler - just set $\rho \equiv 1$. Then $\iiint_R dV = V$. This is actually a great sanity check: if you've set up limits for a tetrahedron, compute $\iiint_R dV$ first and verify you get the correct volume before tackling a harder integrand.
Now suppose you want to balance this solid on the tip of a needle. Where's the balance point? That's the center of mass $(\bar{x}, \bar{y}, \bar{z})$. The idea: weight each position by how much mass is there, then divide by total mass.
For a uniform solid ($\rho = $ const), the center of mass depends only on the shape, not on what the object is made of. Where do you think the center of mass of a uniform tetrahedron lies? It turns out to be the average of the four vertices - the centroid. We could verify this by computing the triple integral, and it would work out exactly.
Finally, moments of inertia measure how hard it is to spin the object around an axis. If you've ever noticed that a hollow cylinder rolls differently than a solid one down a ramp - that's moment of inertia at work. The further mass is from the rotation axis, the more it resists rotation:
The factor $y^2 + z^2$ is the squared distance from the $x$-axis. Similarly, $I_y = \iiint_R(x^2+z^2)\rho\,dV$ for the $y$-axis and $I_z = \iiint_R(x^2+y^2)\rho\,dV$ for the $z$-axis.
Notice the beautiful pattern running through all of these. Every physical quantity is a triple integral of the form:
(weighting function) $\times$ (density) $\times$ $dV$
Mass uses weight $1$. Center of mass uses the coordinate ($x$, $y$, or $z$). Moment of inertia uses distance${}^2$ from the axis. Once you see the pattern, you'll never need to memorize these formulas - you can reconstruct them from the physics.
The Mean Value Theorem
We've been computing exact integrals. But sometimes we just need a quick estimate, or we want to reason about an integral without evaluating it. The Mean Value Theorem gives us that tool.
If $f$ is continuous on a closed bounded region $R$ with volume $V$, then somewhere inside $R$ - at some point $(x_1, y_1, z_1)$ - $f$ exactly equals its average:
Rearranging gives the average value:
Think of it with the density analogy: $\bar{f}$ is the uniform density that, spread across the entire solid, would give the same total mass as the actual varying density. The MVT guarantees the real density matches this uniform value somewhere inside.
This "average value times volume" idea is more powerful than it looks. It lets us estimate integrals by estimating the average (often from physical reasoning), and it's the key to "differentiating with respect to volume" - shrinking $R$ to a tiny region around a point and recovering $f$ there, just as the 1D Fundamental Theorem recovers $f(x)$ from $\frac{d}{dx}\int_a^x f\,dt$.
Practice Problems - §4.4
From Kaplan, problems after §4.5.
The integrand factors as $(u^2 v^2)(w)$ and the region is a product (disk $\times$ interval), so:
$$\left(\iint_{u^2+v^2 \le 1} u^2 v^2\,du\,dv\right) \cdot \int_0^1 w\,dw.$$With $u = r\cos\theta$, $v = r\sin\theta$, $du\,dv = r\,dr\,d\theta$ and $u^2 v^2 = r^4 \cos^2\theta \sin^2\theta = \tfrac{r^4}{4}\sin^2(2\theta)$:
$$\iint = \int_0^{2\pi}\!\int_0^1 \tfrac{r^4}{4}\sin^2(2\theta)\cdot r\,dr\,d\theta = \tfrac{1}{4}\cdot \int_0^1 r^5\,dr \cdot \int_0^{2\pi}\sin^2(2\theta)\,d\theta = \tfrac{1}{4}\cdot\tfrac{1}{6}\cdot\pi = \tfrac{\pi}{24}.$$The plane through $(1,0,0)$, $(0,2,0)$, $(0,0,3)$ is $\dfrac{x}{1} + \dfrac{y}{2} + \dfrac{z}{3} = 1$, or $6x + 3y + 2z = 6$. The tetrahedron is the region $x,y,z \ge 0$ with this inequality $\le 6$.
Fix $x \in [0,1]$, then $y \in [0, 2(1-x)]$, then $z \in [0, 3(1 - x - y/2)]$:
$$\int_0^1\!\int_0^{2(1-x)}\!\!\int_0^{3(1-x-y/2)} (x+z)\,dz\,dy\,dx.$$Let $h = 3(1 - x - y/2)$. Then $\int_0^h (x + z)\,dz = xh + \tfrac{h^2}{2}$.
Substituting and integrating over $y$ then $x$ (a routine if tedious computation) gives the answer $\tfrac{1}{2}$. The volume of the tetrahedron is $\tfrac{1}{6}\cdot 1\cdot 2\cdot 3 = 1$, so this is consistent with the average $(x+z)$ over the tetrahedron being roughly $1/2$ - both $x$ and $z$ vary from 0 to their max, with $\bar x \approx 1/4$, $\bar z \approx 3/4$.
By the symmetry of the cube under permutation of $(x,y,z)$, each of $\iiint x\,dV$, $\iiint y\,dV$, $\iiint z\,dV$ has the same value. Compute one:
$$\iiint_R x\,dV = \int_0^1 x\,dx \cdot \int_0^1 dy \cdot \int_0^1 dz = \tfrac{1}{2}\cdot 1\cdot 1 = \tfrac{1}{2}.$$Symmetry recognition is the single biggest time-saver on cube/sphere/cylinder triples. Always look for it before writing iterated bounds.
At height $z \in [0,1]$, the cross-section is a square with side length $2(1-z)$, so $-{(1-z)} \le x, y \le 1-z$.
For fixed $z$, let $a = 1 - z$. The inner double integral splits:
$$\int_{-a}^a\!\int_{-a}^a (x^2 + z^2)\,dx\,dy = \int_{-a}^a x^2\,dx\cdot 2a + 4a^2\cdot z^2 = 2a\cdot\tfrac{2a^3}{3} + 4a^2 z^2 = \tfrac{4a^4}{3} + 4a^2 z^2.$$With $a = 1 - z$:
$$\int_0^1 \left[\tfrac{4(1-z)^4}{3} + 4(1-z)^2 z^2\right] dz = \tfrac{4}{3}\cdot\tfrac{1}{5} + 4\cdot\tfrac{1}{30} = \tfrac{4}{15} + \tfrac{2}{15} = \tfrac{6}{15} = \tfrac{2}{5}.$$(Used $\int_0^1 (1-z)^4\,dz = 1/5$ and $\int_0^1 (1-z)^2 z^2\,dz = B(3,3) = 1/30$, the Beta integral.)