Unit 4, lesson 30

Triple Integrals in Spherical Coordinates

How spherical coordinates with the polar angle measured from the positive z-axis describe balls, cones, caps and shifted spheres, and why the volume element is ρ² sin φ dρ dφ dθ.

  • Theory part 59
  • Practice part 60
  • Triple Integrals

Latitude and longitude locate any spot on the earth with two angles, and adding the distance from the center locates any point in space. Solids centered at a point, like a ball, a shell, or a scoop of ice cream on a cone, have one simple description in these coordinates. The price is a volume factor, and the most common mistakes come from mixing up which angle is which.

Key terms

The polar angle from the positive z-axis

Definition In a right-handed coordinate system, a point P=(x,y,z)P = (x, y, z) has spherical coordinates (ρ,θ,ϕ)(\rho, \theta, \phi), where ρ=x2+y2+z2\rho = \sqrt{x^2 + y^2 + z^2} is the distance from the origin, θ\theta is the same angle as in cylindrical coordinates, measured counterclockwise from the positive xx-axis in the xyxy-plane, and ϕ\phi is the angle between the positive zz-axis and the segment from the origin to PP. The conventions are

ρ≥0,0≤θ<2π,0≤ϕ≤π,\rho \ge 0, \quad 0 \le \theta < 2\pi, \quad 0 \le \phi \le \pi,

and the conversion is

x=ρsin⁡ϕcos⁡θ,y=ρsin⁡ϕsin⁡θ,z=ρcos⁡ϕ.\begin{gathered} x = \rho \sin \phi \cos \theta, \\[0.4em] y = \rho \sin \phi \sin \theta, \\[0.4em] z = \rho \cos \phi. \end{gathered}

The distance to the zz-axis is r=ρsin⁡ϕr = \rho \sin \phi, which is never negative because sin⁡ϕ≥0\sin \phi \ge 0 on [0,π][0, \pi]. Some books swap the names θ\theta and ϕ\phi, so always check the convention.

In plain words Stand at the origin. Turn by θ\theta around the vertical axis, tip down from straight up by ϕ\phi, then walk out a distance ρ\rho. An angle ϕ=0\phi = 0 points up, ϕ=π2\phi = \frac{\pi}{2} is horizontal and ϕ=π\phi = \pi points down.

Example For the point (1,1,2)(1, 1, \sqrt{2}), the distance is ρ=1+1+2=2\rho = \sqrt{1 + 1 + 2} = 2. Then cos⁡ϕ=22\cos \phi = \frac{\sqrt{2}}{2}, so ϕ=π4\phi = \frac{\pi}{4}, and the shadow (1,1)(1, 1) gives θ=π4\theta = \frac{\pi}{4}. Check with x=2sin⁡π4cos⁡π4=1x = 2 \sin \frac{\pi}{4} \cos \frac{\pi}{4} = 1.

The volume element ρ² sin φ

Definition The map (ρ,ϕ,θ)↦(x,y,z)(\rho, \phi, \theta) \mapsto (x, y, z) has Jacobian determinant

∂(x,y,z)∂(ρ,ϕ,θ)=ρ2sin⁡ϕ,\frac{\partial(x, y, z)}{\partial(\rho, \phi, \theta)} = \rho^2 \sin \phi,

which is ≥0\ge 0 for 0≤ϕ≤π0 \le \phi \le \pi. Let EE be the solid given by

α≤θ≤β,c≤ϕ≤d,g1(θ,ϕ)≤ρ≤g2(θ,ϕ),\begin{gathered} \alpha \le \theta \le \beta, \qquad c \le \phi \le d, \\[0.4em] g_1(\theta, \phi) \le \rho \le g_2(\theta, \phi), \end{gathered}

with 0≤β−α≤2π0 \le \beta - \alpha \le 2\pi, 0≤c≤d≤π0 \le c \le d \le \pi and g1g_1, g2g_2 continuous with 0≤g1≤g20 \le g_1 \le g_2. If ff is continuous on EE, then

∭Ef dV=∫αβ∫cd∫g1g2f ρ2sin⁡ϕ dρ dϕ dθ,\begin{aligned} &\iiint_E f \, dV \\[0.4em] &= \int_\alpha^\beta \int_c^d \int_{g_1}^{g_2} f \, \rho^2 \sin \phi \, d\rho \, d\phi \, d\theta, \end{aligned}

with ff evaluated at (ρsin⁡ϕcos⁡θ,ρsin⁡ϕsin⁡θ,ρcos⁡ϕ)(\rho \sin \phi \cos \theta, \rho \sin \phi \sin \theta, \rho \cos \phi). The map fails to be one-to-one only where ρ=0\rho = 0, where sin⁡ϕ=0\sin \phi = 0, and, when β−α=2π\beta - \alpha = 2\pi, on the half-plane where θ=α\theta = \alpha and θ=β\theta = \beta meet. Those sets have zero volume, so they do not affect the integral.

In plain words A tiny spherical box has one side Δρ\Delta \rho along the ray, one side ρ Δϕ\rho \, \Delta \phi along a meridian, and one side ρsin⁡ϕ Δθ\rho \sin \phi \, \Delta \theta around a circle of latitude of radius ρsin⁡ϕ\rho \sin \phi. Multiplying gives ρ2sin⁡ϕ Δρ Δϕ Δθ\rho^2 \sin \phi \, \Delta \rho \, \Delta \phi \, \Delta \theta. Boxes near the poles are thin, and the sin⁡ϕ\sin \phi accounts for that.

Example The ball of radius 22 is 0≤ρ≤20 \le \rho \le 2, 0≤ϕ≤π0 \le \phi \le \pi, 0≤θ≤2π0 \le \theta \le 2\pi. Including θ=2π\theta = 2\pi repeats only a half-plane, which has zero volume. The three integrals separate, so

V=∫02πdθ∫0πsin⁡ϕ dϕ∫02ρ2 dρ=2π⋅2⋅83=32π3,\begin{aligned} V &= \int_0^{2\pi} d\theta \int_0^\pi \sin \phi \, d\phi \int_0^2 \rho^2 \, d\rho \\[0.4em] &= 2\pi \cdot 2 \cdot \frac{8}{3} = \frac{32\pi}{3}, \end{aligned}

which matches 43π⋅23\frac{4}{3}\pi \cdot 2^3.

Spherical regions

Definition The coordinate surfaces are the sphere ρ=a\rho = a for a>0a > 0, the half-plane θ=c\theta = c bounded by the zz-axis, and the surface ϕ=c\phi = c. For 0<c<π20 < c < \frac{\pi}{2} it is the upper nappe of a cone with vertex at the origin, opening upward around the positive zz-axis. For c=π2c = \frac{\pi}{2} it is the xyxy-plane, for π2<c<π\frac{\pi}{2} < c < \pi it is the lower nappe of a cone opening downward, and c=0c = 0 or c=πc = \pi gives the nonnegative or nonpositive zz-axis. Typical spherical regions are the ball ρ≤a\rho \le a, the shell a≤ρ≤ba \le \rho \le b, the solid cone ϕ≤c\phi \le c cut off by a sphere, and the ball x2+y2+(z−a)2≤a2x^2 + y^2 + (z - a)^2 \le a^2 with a>0a > 0, which touches the origin. Substituting the conversion formulas into its inequality gives ρ2≤2aρcos⁡ϕ\rho^2 \le 2a\rho \cos \phi, that is

0≤ρ≤2acos⁡ϕ,0≤ϕ≤π2.0 \le \rho \le 2a \cos \phi, \qquad 0 \le \phi \le \frac{\pi}{2}.

In plain words Spherical coordinates work best when the solid is cut out by spheres through or around the origin and by cones with vertex at the origin.

Example For the shifted ball x2+y2+(z−1)2≤1x^2 + y^2 + (z - 1)^2 \le 1, every ray from the origin with ϕ≤π2\phi \le \frac{\pi}{2} starts at the origin, which lies on the sphere, runs through the ball and leaves it at ρ=2cos⁡ϕ\rho = 2 \cos \phi. Rays with ϕ>π2\phi > \frac{\pi}{2} point below the xyxy-plane and miss the ball. Nothing depends on θ\theta, so the θ\theta integral gives 2π2\pi and

V=2π∫0π/2∫02cos⁡ϕρ2sin⁡ϕ dρ dϕ=2π∫0π/283cos⁡3ϕsin⁡ϕ dϕ=2π⋅83⋅14=4π3,\begin{aligned} V &= 2\pi \int_0^{\pi/2} \int_0^{2 \cos \phi} \rho^2 \sin \phi \, d\rho \, d\phi \\[0.4em] &= 2\pi \int_0^{\pi/2} \frac{8}{3} \cos^3 \phi \sin \phi \, d\phi \\[0.4em] &= 2\pi \cdot \frac{8}{3} \cdot \frac{1}{4} = \frac{4\pi}{3}, \end{aligned}

the volume of a ball of radius 11, as it should be.

Radial and angular bounds

Definition To set up bounds in the order dρ dϕ dθd\rho \, d\phi \, d\theta, first find the range of directions, the values of θ\theta and ϕ\phi for which the ray from the origin meets the solid. Then for each such direction find where the ray enters and leaves the solid. Those two values of ρ\rho are the radial bounds, and they may depend on ϕ\phi and θ\theta. Every point of the solid must be covered exactly once. A plane z=hz = h with h>0h > 0 becomes ρ=hsec⁡ϕ\rho = h \sec \phi for 0≤ϕ<π20 \le \phi < \frac{\pi}{2}.

In plain words Shine a flashlight from the origin. The angles say which directions hit the solid, and the radial bounds say where along each beam the solid begins and ends.

Example The cap of the ball ρ≤2\rho \le 2 above the plane z=1z = 1 is reached by rays with ϕ≤π3\phi \le \frac{\pi}{3}, since the plane meets the sphere where cos⁡ϕ=12\cos \phi = \frac{1}{2}. Along such a ray the solid starts at the plane, ρ=sec⁡ϕ\rho = \sec \phi, and ends at the sphere, ρ=2\rho = 2. The θ\theta integral again gives 2π2\pi, so

V=2π∫0π/3∫sec⁡ϕ2ρ2sin⁡ϕ dρ dϕ=2π3∫0π/3(8−sec⁡3ϕ)sin⁡ϕ dϕ=2π3(4−32)=5π3.\begin{aligned} V &= 2\pi \int_0^{\pi/3} \int_{\sec \phi}^{2} \rho^2 \sin \phi \, d\rho \, d\phi \\[0.4em] &= \frac{2\pi}{3} \int_0^{\pi/3} \left( 8 - \sec^3 \phi \right) \sin \phi \, d\phi \\[0.4em] &= \frac{2\pi}{3} \left( 4 - \frac{3}{2} \right) = \frac{5\pi}{3}. \end{aligned}

The geometric cap formula, height h=1h = 1 and sphere radius R=2R = 2, agrees.

πh2(3R−h)3=π⋅1⋅53=5π3.\frac{\pi h^2 (3R - h)}{3} = \frac{\pi \cdot 1 \cdot 5}{3} = \frac{5\pi}{3}.

Symmetry

Definition If a solid EE and a continuous density δ\delta are unchanged by rotation about the zz-axis, then δ\delta does not depend on θ\theta, the θ\theta integral contributes 2π2\pi, and the center of mass lies on the zz-axis. If EE is symmetric under (x,y,z)↦(x,y,−z)(x, y, z) \mapsto (x, y, -z), which is ϕ↦π−ϕ\phi \mapsto \pi - \phi, and f(x,y,−z)=−f(x,y,z)f(x, y, -z) = -f(x, y, z), then ∭Ef dV=0\iiint_E f \, dV = 0. For a ball centered at the origin and an integrand that depends only on ρ\rho, both angular integrals give the total 4π4\pi.

In plain words Round solids let you skip whole integrals. Use symmetry to find the center of mass coordinates that must be zero, then compute only the one that is left.

Example The solid hemisphere x2+y2+z2≤a2x^2 + y^2 + z^2 \le a^2, z≥0z \ge 0, with constant density, is 0≤ρ≤a0 \le \rho \le a, 0≤ϕ≤π20 \le \phi \le \frac{\pi}{2}. By symmetry xˉ=yˉ=0\bar{x} = \bar{y} = 0. Its volume is 23πa3\frac{2}{3}\pi a^3. The integrand for MxyM_{xy} is z=ρcos⁡ϕz = \rho \cos \phi times the volume factor ρ2sin⁡ϕ\rho^2 \sin \phi, so

Mxy=2π∫0π/2∫0aρ3cos⁡ϕsin⁡ϕ dρ dϕ=2π⋅12⋅a44=πa44,\begin{aligned} &M_{xy} \\[0.4em] &= 2\pi \int_0^{\pi/2} \int_0^a \rho^3 \cos \phi \sin \phi \, d\rho \, d\phi \\[0.4em] &= 2\pi \cdot \frac{1}{2} \cdot \frac{a^4}{4} = \frac{\pi a^4}{4}, \end{aligned}

so zˉ=πa4/42πa3/3=3a8\bar{z} = \frac{\pi a^4 / 4}{2\pi a^3 / 3} = \frac{3a}{8}. The balance point sits a bit below halfway up, since the hemisphere is wider at the bottom.

Check yourself

  1. A ball of radius 22 has density δ=x2+y2+z2\delta = \sqrt{x^2 + y^2 + z^2}. Find its mass.
Show the answer

The density is ρ\rho itself, and the angular integrals give 4π4\pi, so

m=4π∫02ρ3 dρ=16π.m = 4\pi \int_0^2 \rho^3 \, d\rho = 16\pi.
  1. Find the average distance from the center of a ball of radius aa to its points.
Show the answer

The integral of ρ\rho over the ball is 4π⋅a44=πa44\pi \cdot \frac{a^4}{4} = \pi a^4. Dividing by the volume 43πa3\frac{4}{3}\pi a^3 gives 3a4\frac{3a}{4}. Most of the volume is near the surface, so the average is well past a2\frac{a}{2}.

  1. Find the volume of the solid inside the sphere x2+y2+z2=9x^2 + y^2 + z^2 = 9 and inside the cone z=3(x2+y2)z = \sqrt{3(x^2 + y^2)}.
Show the answer

On the cone, tan⁡ϕ=rz=13\tan \phi = \frac{r}{z} = \frac{1}{\sqrt{3}}, so ϕ=π6\phi = \frac{\pi}{6}. The solid is 0≤ρ≤30 \le \rho \le 3, 0≤ϕ≤π60 \le \phi \le \frac{\pi}{6}, and

V=2π(1−cos⁡π6)⋅273=9π(2−3).\begin{aligned} V &= 2\pi \left( 1 - \cos \frac{\pi}{6} \right) \cdot \frac{27}{3} \\[0.4em] &= 9\pi \left( 2 - \sqrt{3} \right). \end{aligned}

How this lesson connects

It also uses Spherical coordinate conversion and Triple integrals and elementary trigonometric substitution.