Triple Integrals

Published on 2026-11-04·v1.0

Learning Objectives

  • Set up a triple integral over a box or over a solid bounded by surfaces, choosing the order of integration and writing each bound as a function of the variables outside it.
  • State the conditions under which a triple integral can be evaluated in any order, and the conditions of the change-of-variables theorem in three dimensions.
  • Compute a 3×33 \times 3 Jacobian and derive the factors rr (cylindrical) and ρ2sin⁡φ\rho^2\sin\varphi (spherical), including the range of φ\varphi that makes the factor valid.
  • Compute volume and mass, and estimate a volume by Monte Carlo sampling, noting how its error scales.

Context & Motivation

A triple integral adds up a quantity spread through a solid: the mass of a body whose density changes from point to point, the volume of a region too curved for slicing, or the position of its center of mass. With f=1f = 1 it gives volume, which is the same quantity that slicing computes in applications-area-volume-and-average-value, now without needing a cross-section formula.

The work has two parts: describing the solid, and choosing coordinates in which that description is simple. A ball is awkward in x,y,zx, y, z, since the bounds of yy depend on xx through a square root and the bounds of zz on both, but in spherical coordinates it is a box. The previous lesson, double-integrals-cartesian-and-polar, built the tools used here: iterated integrals, Fubini's theorem, and the Jacobian. This lesson extends each one by a dimension.

Core Theory

Triple integrals over boxes

For a box B=[a,b]×[c,d]×[e,f]B = [a, b] \times [c, d] \times [e, f], split it into small boxes of volume ΔV\Delta V, sample ff in each, and sum f ΔVf\,\Delta V. The limit, if it exists, is ∭Bf dV\iiint_B f\, dV, and it exists when ff is continuous on BB. Fubini's theorem then says that when ff is continuous on the closed box, the integral equals an iterated integral in any of the six orders of x,y,zx, y, z. As in two dimensions, the general version needs ∭∣f∣ dV<∞\iiint |f|\, dV < \infty, and Tonelli covers f≥0f \ge 0. A function that fails these can give different iterated values in different orders, as the example in the previous lesson shows.

Solid regions

A solid EE is of type 1 if it lies between two surfaces above a plane region DD:

E={(x,y,z):(x,y)∈D, u1(x,y)≤z≤u2(x,y)},E = \{(x, y, z) : (x, y) \in D,\ u_1(x, y) \le z \le u_2(x, y)\},

with u1,u2u_1, u_2 continuous and DD a region of type I or II. For ff continuous on EE,

∭Ef dV=∬D(∫u1(x,y)u2(x,y)f(x,y,z) dz)dA.\iiint_E f\, dV = \iint_D \left(\int_{u_1(x, y)}^{u_2(x, y)} f(x, y, z)\, dz\right) dA.

The rule for bounds is that the innermost integral may depend on the two outer variables, the middle on the outermost one, and the outermost only on constants. Two applications use this directly. The volume of EE is ∭E1 dV\iiint_E 1\, dV. For a density ρ(x,y,z)\rho(x, y, z) the mass is M=∭Eρ dVM = \iiint_E \rho\, dV, and the xx-coordinate of the center of mass is xˉ=1M∭Ex ρ dV\bar x = \frac{1}{M}\iiint_E x\,\rho\, dV, with yˉ\bar y and zˉ\bar z alike.

Change of variables in three dimensions

If T(u,v,w)=(x,y,z)T(u, v, w) = (x, y, z) maps a solid SS onto EE, the Jacobian is

∂(x,y,z)∂(u,v,w)=det⁡(xuxvxwyuyvywzuzvzw).\frac{\partial(x, y, z)}{\partial(u, v, w)} = \det\begin{pmatrix} x_u & x_v & x_w \\ y_u & y_v & y_w \\ z_u & z_v & z_w \end{pmatrix}.

Change of variables. If TT is C1C^1, one-to-one on the interior of SS, and has a nonzero Jacobian on the interior of SS, and if ff is continuous on EE, then

∭Ef dV=∭Sf(T(u,v,w)) ∣∂(x,y,z)∂(u,v,w)∣du dv dw.\iiint_E f\, dV = \iiint_S f\big(T(u, v, w)\big)\,\left\lvert \frac{\partial(x, y, z)}{\partial(u, v, w)} \right\rvert du\, dv\, dw.

The determinant is the scaling factor of volume: a small Δu×Δv×Δw\Delta u \times \Delta v \times \Delta w box is sent, to first order, to a parallelepiped spanned by the three columns of the matrix, and the volume of that parallelepiped is the absolute value of the determinant times Δu Δv Δw\Delta u\,\Delta v\,\Delta w. As in two dimensions, the exceptional points where one-to-one or nonzero fails must form a set of zero volume.

Cylindrical coordinates

Keep zz and use polar coordinates in the xyxy-plane: x=rcos⁡θx = r\cos\theta, y=rsin⁡θy = r\sin\theta, z=zz = z. The Jacobian is rr, so dV=r dz dr dθdV = r\, dz\, dr\, d\theta. The map is one-to-one for r>0r > 0 and θ∈[0,2π)\theta \in [0, 2\pi), and the Jacobian vanishes only on the axis r=0r = 0, which has zero volume. This is the choice when the solid has an axis of symmetry, as in polar-coordinates but lifted into space.

Spherical coordinates

Let ρ≥0\rho \ge 0 be the distance from the origin, φ\varphi the angle from the positive zz-axis, and θ\theta the azimuth, as in polar coordinates:

x=ρsin⁡φcos⁡θ,y=ρsin⁡φsin⁡θ,z=ρcos⁡φ.x = \rho\sin\varphi\cos\theta, \qquad y = \rho\sin\varphi\sin\theta, \qquad z = \rho\cos\varphi.

The Jacobian with respect to (ρ,φ,θ)(\rho, \varphi, \theta) is ρ2sin⁡φ\rho^2\sin\varphi, so dV=ρ2sin⁡φ dρ dφ dθdV = \rho^2\sin\varphi\, d\rho\, d\varphi\, d\theta. The convention matters: this lesson, like OpenStax, uses φ\varphi for the angle from zz, whereas many physics texts swap the names θ\theta and φ\varphi, so a formula from another source needs a check before use. The factor ρ2sin⁡φ\rho^2\sin\varphi is nonnegative only because φ∈[0,π]\varphi \in [0, \pi], and the map is one-to-one on ρ>0\rho > 0, 0<φ<π0 < \varphi < \pi, θ∈[0,2π)\theta \in [0, 2\pi). The Jacobian is zero at ρ=0\rho = 0 and on the zz-axis (sin⁡φ=0\sin\varphi = 0), a set of zero volume.

If φ\varphi is allowed to run past π\pi, the map stops being one-to-one. With φ∈[0,2π]\varphi \in [0, 2\pi] the signed factor integrates to 00 over the ball, and the absolute value covers the ball twice, giving 8πa3/38\pi a^3/3 instead of 4πa3/34\pi a^3/3.

Worked Examples

Example 1: a tetrahedron, in Cartesian coordinates

Let EE be the tetrahedron x,y,z≥0x, y, z \ge 0, x+y+z≤1x + y + z \le 1. The bounds are 0≤x≤10 \le x \le 1, 0≤y≤1−x0 \le y \le 1 - x, 0≤z≤1−x−y0 \le z \le 1 - x - y. The volume is

∫01 ⁣∫01−x ⁣∫01−x−ydz dy dx=16.\int_0^1\!\int_0^{1-x}\!\int_0^{1-x-y} dz\, dy\, dx = \frac{1}{6}.

For a density ρ=x+y+z\rho = x + y + z the mass is ∭(x+y+z) dV=18\iiint (x + y + z)\, dV = \frac{1}{8}, and integrating with xx innermost and zz outermost also gives 1/81/8, as Fubini promises. The moment ∭x ρ dV=130\iiint x\,\rho\, dV = \frac{1}{30}, so xˉ=1/301/8=415≈0.2667\bar x = \frac{1/30}{1/8} = \frac{4}{15} \approx 0.2667. With uniform density the centroid is at x=1/4x = 1/4, so the density that grows with distance from the origin pushes the center of mass outward. All values match numerical triple quadrature.

Example 2: cylindrical coordinates

Find the volume between z=x2+y2z = x^2 + y^2 and z=4−x2−y2z = 4 - x^2 - y^2. The surfaces meet where r2=4−r2r^2 = 4 - r^2, so r=2r = \sqrt 2, and

V=∫02π ⁣∫02 ⁣∫r24−r2r dz dr dθ=2π∫02(4−2r2) r dr=2π[2r2−r42]02=4π≈12.5664.V = \int_0^{2\pi}\!\int_0^{\sqrt 2}\!\int_{r^2}^{4 - r^2} r\, dz\, dr\, d\theta = 2\pi\int_0^{\sqrt 2}(4 - 2r^2)\, r\, dr = 2\pi\left[2r^2 - \frac{r^4}{2}\right]_0^{\sqrt 2} = 4\pi \approx 12.5664.

A numerical triple integral in x,y,zx, y, z gives 12.5663712.56637.

Example 3: spherical coordinates

For a ball of radius aa,

V=∫02π ⁣∫0π ⁣∫0aρ2sin⁡φ dρ dφ dθ=2π⋅2⋅a33=4πa33.V = \int_0^{2\pi}\!\int_0^{\pi}\!\int_0^{a} \rho^2\sin\varphi\, d\rho\, d\varphi\, d\theta = 2\pi\cdot 2\cdot\frac{a^3}{3} = \frac{4\pi a^3}{3}.

If the density is kρk\rho, proportional to the distance from the center, the mass is ∫02π ⁣∫0π ⁣∫0akρ⋅ρ2sin⁡φ dρ dφ dθ=kπa4\int_0^{2\pi}\!\int_0^\pi\!\int_0^a k\rho\cdot\rho^2\sin\varphi\, d\rho\, d\varphi\, d\theta = k\pi a^4.

Now the "ice cream cone": inside the unit sphere and above the cone z=x2+y2z = \sqrt{x^2 + y^2}. On the cone cos⁡φ=sin⁡φ\cos\varphi = \sin\varphi, so the cone is φ=π/4\varphi = \pi/4, and the solid is 0≤ρ≤10 \le \rho \le 1, 0≤φ≤π/40 \le \varphi \le \pi/4, 0≤θ≤2π0 \le \theta \le 2\pi:

V=2π⋅13∫0π/4sin⁡φ dφ=2π3(1−22)=π(2−2)3≈0.6134.V = 2\pi\cdot\frac{1}{3}\int_0^{\pi/4}\sin\varphi\, d\varphi = \frac{2\pi}{3}\left(1 - \frac{\sqrt 2}{2}\right) = \frac{\pi(2 - \sqrt 2)}{3} \approx 0.6134.

A Cartesian triple integral over x2+y2≤z≤1−x2−y2\sqrt{x^2 + y^2} \le z \le \sqrt{1 - x^2 - y^2} gives 0.613430.61343. Dropping the Jacobian from the ball gives ∫02π ⁣∫0π ⁣∫01dρ dφ dθ=2π2≈19.74\int_0^{2\pi}\!\int_0^\pi\!\int_0^1 d\rho\, d\varphi\, d\theta = 2\pi^2 \approx 19.74 instead of 4π/3≈4.194\pi/3 \approx 4.19 (for a=1a = 1).

Example 4: Monte Carlo volume of a ball

When a region has no convenient description, sample it. Draw NN points uniformly in the cube [−1,1]3[-1, 1]^3 (volume 8) and count the fraction p^\hat p that land inside the unit ball. Then 8p^8\hat p estimates 4π/3=4.188794\pi/3 = 4.18879. The standard error is 8p(1−p)/N8\sqrt{p(1 - p)/N} with p=π/6p = \pi/6, which is 3.9955/N3.9955/\sqrt N. One run (seed 2026) gave:

text
N estimate abs error std error 10^3 4.2640 0.0752 0.1264 10^4 4.1808 0.0080 0.0400 10^5 4.1632 0.0256 0.0126 10^6 4.1878 0.0010 0.0040

A single run fluctuates around that scale: the error at N=105N = 10^5 is two standard errors. Averaged over 300 runs (seeds 0 to 299), the root-mean-square error at N=104N = 10^4 was 0.04080.0408, close to the predicted 0.04000.0400. The error shrinks like 1/N1/\sqrt N whatever the dimension, but the constant depends on the problem. A grid with 100 points per axis needs 1003=106100^3 = 10^6 evaluations in three dimensions and 10010100^{10} in ten, while Monte Carlo can still be run in ten. There the unit ball fills only about 0.25%0.25\% of its bounding cube, and 10610^6 samples (seed 5) gave 2.512.51 against the exact π5/120=2.55\pi^5/120 = 2.55, a standard error of 0.050.05.

Common Misconceptions & Pitfalls

  • "Spherical coordinates only need dρ dφ dθd\rho\, d\varphi\, d\theta." The volume element is ρ2sin⁡φ dρ dφ dθ\rho^2\sin\varphi\, d\rho\, d\varphi\, d\theta. The ρ2\rho^2 reflects that a shell's area grows with the square of its radius, and the sin⁡φ\sin\varphi that circles of latitude shrink toward the poles. Cylindrical coordinates need the factor rr.
  • "Any angle range will do." The map must be one-to-one on the interior. φ\varphi belongs in [0,π][0, \pi] and θ\theta in a window of length 2π2\pi; a larger range double-covers the solid.
  • "Cylindrical and spherical coordinates mean the same angles everywhere." The geometric angles are the same, but the names differ among books: physics texts often call the angle from the zz-axis θ\theta and the azimuth φ\varphi. Write down which angle is which before using a table of formulas.
  • "The bounds of the outer integral can depend on the inner variables." An inner variable cannot appear in the limits of an outer integral. If a bound refers to zz, then zz must be integrated outside that integral, and the region has to be redescribed.
  • "Monte Carlo converges faster than a grid because it is random." It converges at the rate 1/N1/\sqrt N, which is slow, and its advantage is that this rate does not worsen with the dimension (the constant in front can).

Summary

A triple integral is a limit of sums over small boxes. For a continuous integrand on a closed box, Fubini lets the six orders agree, and the general theorems need absolute integrability or a nonnegative integrand. Solids of type 1 are described by a base region and two surfaces. Under a C1C^1 map that is one-to-one on the interior with a nonzero Jacobian there, the integrand picks up the absolute value of the 3×33 \times 3 determinant: rr for cylindrical coordinates and ρ2sin⁡φ\rho^2\sin\varphi for spherical coordinates, valid for φ∈[0,π]\varphi \in [0, \pi]. Volume and mass are the standard uses. When a region resists description, random sampling gives an estimate whose error falls like 1/N1/\sqrt N in any dimension.

Documentation Links