OpenStax Calculus 3

Chapter 5: Multiple Integration

5.5 Triple Integrals in Cylindrical and Spherical Coordinates

Study guide for Calculus Volume 3 (Gilbert Strang, 2016 edition)

Independent study guide. Not affiliated with OpenStax or Rice University.

Big idea

Polar coordinates rescued double integrals over circular regions. The same rescue works in three dimensions, twice over, because there are two natural ways to extend the polar idea. Keep $z$ as it is and use polar coordinates in the $xy$-plane, and you get cylindrical coordinates. Measure instead the straight-line distance from the origin together with two angles, and you get spherical coordinates.

Each system trades an awkward algebraic description for a simple one. A cylinder is $r = a$ in cylindrical coordinates, which is one equation in one variable instead of $x^2+y^2 = a^2$ with a square root lurking in the limits. A sphere is $\rho = a$ in spherical coordinates, and the cone that opens at forty-five degrees is $\varphi = \tfrac{\pi}{4}$, a constant. Constant limits are the whole prize: they turn a solid with curved boundaries into a box in the new variables.

The price is the same as in polar coordinates and for the same reason. A grid in the new variables does not cut space into congruent boxes, so the volume element carries a factor that records how much a cell has been stretched. In cylindrical coordinates the cell is a polar cell extruded vertically, so it inherits the polar factor and nothing more: $dV = r\, dz\, dr\, d\theta$. In spherical coordinates a cell is stretched twice, once by distance from the origin and once by distance from the vertical axis, and the factor is $\rho^2 \sin\varphi$.

Choosing between the two systems is a question about the solid, not about the integrand, though the integrand often votes the same way. If the solid has an axis of symmetry and its cross sections perpendicular to that axis are disks or sectors, use cylindrical coordinates with that axis as the $z$-axis. If the solid is bounded by spheres centered at the origin or by cones with vertex at the origin, use spherical.

Decoder

In cylindrical coordinates the volume element is $dV = r\, dz\, dr\, d\theta$, and in spherical coordinates, with $\varphi$ measured from the positive $z$-axis, it is $dV = \rho^2 \sin\varphi\, d\rho\, d\varphi\, d\theta$.

The angle convention has to be stated because it is not universal. Throughout this section $\rho \ge 0$ is the distance from the origin, $\varphi$ is the polar angle measured down from the positive $z$-axis and runs from $0$ to $\pi$, and $\theta$ is the same azimuthal angle as in polar coordinates, running from $0$ to $2\pi$. Some references swap the names of the two angles, and the volume element then reads with the sine on the other letter. Fix the convention first and the factor follows; guess at it and every cone problem comes out wrong.

Why $\rho^2 \sin\varphi$ and not something else: hold the other two variables and vary one at a time. Moving in $\rho$ sweeps a length $d\rho$. Moving in $\varphi$ sweeps an arc of a great circle of radius $\rho$, hence a length $\rho\, d\varphi$. Moving in $\theta$ sweeps a circle of latitude, whose radius is not $\rho$ but the distance to the $z$-axis, namely $\rho \sin\varphi$, hence a length $\rho \sin\varphi\, d\theta$. The three displacements are mutually perpendicular, so the cell volume is their product.

Because $\varphi$ stays between $0$ and $\pi$, $\sin\varphi \ge 0$ and no absolute value is needed. The factor vanishes on the $z$-axis, where $\sin\varphi = 0$, and at the origin, where $\rho = 0$. Those are exactly the places where the coordinate grid degenerates, and the vanishing factor is what keeps the integral honest there.

Definitions and results

Cylindrical coordinates. With $x = r\cos\theta$, $y = r\sin\theta$ and $z = z$, the pair $(r,\theta)$ is polar in the $xy$-plane and $z$ is unchanged. So $x^2+y^2 = r^2$.

The cylindrical volume element and integral.

$$ \iiint_E f\, dV = \int_{\alpha}^{\beta} \int_{h_1(\theta)}^{h_2(\theta)} \int_{u_1(r,\theta)}^{u_2(r,\theta)} f\big( r\cos\theta,\, r\sin\theta,\, z \big)\, r\, dz\, dr\, d\theta $$

Spherical coordinates. With $\rho \ge 0$, $0 \le \varphi \le \pi$ and $0 \le \theta \le 2\pi$,

$$ x = \rho\sin\varphi\cos\theta, \qquad y = \rho\sin\varphi\sin\theta, \qquad z = \rho\cos\varphi $$

and consequently $x^2+y^2+z^2 = \rho^2$ and $r = \rho\sin\varphi$.

The spherical volume element and integral.

$$ \iiint_E f\, dV = \int_{\alpha}^{\beta} \int_{\varphi_1}^{\varphi_2} \int_{\rho_1}^{\rho_2} f\, \rho^2 \sin\varphi\, d\rho\, d\varphi\, d\theta $$

Standard surfaces in each system. A cylinder about the $z$-axis is $r = a$; a plane through the $z$-axis is $\theta = $ constant; a horizontal plane is $z = c$. A sphere centered at the origin is $\rho = a$; a cone with vertex at the origin opening upward at half-angle $\alpha$ is $\varphi = \alpha$; the $xy$-plane is $\varphi = \tfrac{\pi}{2}$.

Which system a solid wants. Cylindrical coordinates suit solids built from cylinders, paraboloids of revolution, and horizontal planes, since those read as $r = a$, $z = r^2$ and $z = c$. Spherical coordinates suit solids built from spheres centered at the origin and cones with vertex there. A solid bounded by both a sphere and a plane not through the origin is often easier in cylindrical coordinates, because the plane stays simple.

Converting a plane to spherical form. The plane $z = c$ becomes $\rho\cos\varphi = c$, so $\rho = c\sec\varphi$. A spherical setup with a flat top has that expression as an inner limit, which is a sign that cylindrical coordinates might be the better choice.

Sanity checks. With $f = 1$ the integral is a volume, so it must be positive, and it must agree with any elementary formula that applies. The ball of radius $a$ giving $\tfrac{4}{3}\pi a^3$ is the standard test of whether your volume element and limits are right.

Worked examples

A dome on a cylinder

Find the volume inside the cylinder $x^2+y^2 = 4$, above the plane $z = 0$ and below the surface $z = 8 - x^2 - y^2$. In cylindrical coordinates the top surface is $z = 8 - r^2$, which stays at height $4$ or more over the whole disk, so the solid is a cylinder with a rounded cap:

$$ \int_0^{2\pi} \int_0^2 \int_0^{8-r^2} r\, dz\, dr\, d\theta = \int_0^{2\pi} \int_0^2 \big( 8 - r^2 \big) r\, dr\, d\theta = 2\pi \left[ 4r^2 - \frac{r^4}{4} \right]_0^2 = 24\pi $$

Check by trapping it. The solid contains the cylinder of radius $2$ and height $4$, of volume $16\pi$, and is contained in the cylinder of radius $2$ and height $8$, of volume $32\pi$. The answer $24\pi$ lies between them.

The volume of a ball

Compute the volume of the ball $\rho \le a$ directly. The limits are all constants and the integrand factors, so the triple integral separates:

$$ \int_0^{2\pi} \! \int_0^{\pi} \! \int_0^a \rho^2 \sin\varphi\, d\rho\, d\varphi\, d\theta = \left( \int_0^{2\pi} \!\! d\theta \right) \left( \int_0^{\pi} \!\! \sin\varphi\, d\varphi \right) \left( \int_0^a \!\! \rho^2 d\rho \right) = 2\pi \cdot 2 \cdot \frac{a^3}{3} = \frac{4\pi a^3}{3} $$

The middle factor is where the convention earns its keep: $\int_0^{\pi} \sin\varphi\, d\varphi = 2$, and it is $2$ only because $\varphi$ sweeps the full range from the north pole to the south pole exactly once. Letting $\varphi$ run to $2\pi$ would count the ball twice and give zero, since the second half contributes a negative sine.

A radial integrand over a ball

Evaluate $\iiint_B \big( x^2+y^2+z^2 \big)\, dV$ over the ball of radius $2$. The integrand is $\rho^2$, so the full integrand including the volume element is $\rho^4 \sin\varphi$:

$$ \int_0^{2\pi} \! \int_0^{\pi} \! \int_0^2 \rho^4 \sin\varphi\, d\rho\, d\varphi\, d\theta = 2\pi \cdot 2 \cdot \frac{32}{5} = \frac{128\pi}{5} $$

That is about $80.4$. The ball has volume $\tfrac{32\pi}{3} \approx 33.5$, so the average value of $x^2+y^2+z^2$ is about $2.4$. The quantity runs from $0$ at the center to $4$ at the surface, so an average of $2.4$ is right where it should be: above the midpoint, because the outer shells hold most of the volume.

A cone capped by a sphere

Find the volume of the solid inside the sphere $\rho = 3$ and above the cone $z = \sqrt{x^2+y^2}$. That cone makes a forty-five degree angle with the axis, so in spherical form it is $\varphi = \tfrac{\pi}{4}$, and the solid is $0 \le \rho \le 3$, $0 \le \varphi \le \tfrac{\pi}{4}$, $0 \le \theta \le 2\pi$:

$$ \int_0^{2\pi} \! \int_0^{\pi/4} \! \int_0^3 \rho^2 \sin\varphi\, d\rho\, d\varphi\, d\theta = 2\pi \cdot 9 \cdot \Big[ -\cos\varphi \Big]_0^{\pi/4} = 18\pi \left( 1 - \frac{\sqrt{2}}{2} \right) $$

which is $9\pi\big(2 - \sqrt{2}\big)$, about $16.6$. Check it against the whole ball. A solid cut out by a cone from the origin captures the fraction $\tfrac{1}{2}\big(1 - \cos\tfrac{\pi}{4}\big) \approx 0.1464$ of all directions, and the ball of radius $3$ has volume $36\pi \approx 113.1$. Multiplying gives about $16.6$, which matches.

Practice

Start with cylindrical coordinates. Look for an axis of symmetry, set the region up as a polar description in $r$ and $\theta$ with $z$ running between two surfaces, and keep the single factor of $r$ in every integral.

Practice

Generated problems for this section, graded instantly.

Then spherical. Convert the bounding surfaces first, watching for spheres that become $\rho = a$ and cones that become $\varphi = $ constant, and never write the volume element without both $\rho^2$ and $\sin\varphi$.

Practice

Generated problems for this section, graded instantly.

Quiz

Five items on both volume elements, converting solids and integrands into each system, and deciding which system a given solid calls for.

Quiz

5 problems with a score at the end.