Triple Integrals in Spherical Coordinates
Triple integrals in spherical coordinates describe each point by its distance ρ from the origin and two angles, θ and φ. You write x = ρ sin φ cos θ, y = ρ sin φ sin θ and z = ρ cos φ, and replace dV with ρ² sin φ dρ dφ dθ. Balls, spherical shells and cones then get constant limits.
Before this lesson: Triple Integrals and Triple Integrals in Cylindrical Coordinates
What spherical coordinates are
A point P has three spherical coordinates. ρ (rho) is the distance from the origin to P. θ is the same angle as in cylindrical coordinates, measured on the floor from the positive x-axis. φ (phi) is the angle from the positive z-axis down to the segment OP.
The right triangle in the picture gives the formulas. The height of P is z = ρ cos φ. The shadow has length r = ρ sin φ, and polar coordinates on the floor turn that into x and y. We always have ρ ≥ 0 and 0 ≤ φ ≤ π: φ = 0 points straight up, φ = π/2 is the floor, and φ = π points straight down.
Simple shapes have simple equations. The sphere x² + y² + z² = 9 is ρ = 3. The cone z = √(x² + y²) is φ = π/4. The upper half of space is 0 ≤ φ ≤ π/2.
Triple integral in spherical coordinates formula
x = \rho\sin\varphi\cos\theta, \quad y = \rho\sin\varphi\sin\theta, \quad z = \rho\cos\varphi, \quad x^2 + y^2 + z^2 = \rho^2
\iiint_E f(x, y, z)\,dV = \int_{\alpha}^{\beta} \int_{c}^{d} \int_{a}^{b} f(\rho\sin\varphi\cos\theta, \rho\sin\varphi\sin\theta, \rho\cos\varphi)\,\rho^2\sin\varphi\,d\rho\,d\varphi\,d\thetaA small spherical box has sides dρ, ρ dφ and ρ sin φ dθ. Their product gives the volume element dV = ρ² sin φ dρ dφ dθ.
- Describe the solid with limits on ρ, φ and θ. Spheres give ρ limits, cones give φ limits and half-planes give θ limits.
- Rewrite the integrand: x² + y² + z² = ρ² and z = ρ cos φ.
- Multiply by ρ² sin φ.
- Integrate in ρ, then φ, then θ. With constant limits, you can split the integral into a product of three single integrals.
Triple integrals in spherical coordinates examples
Example 1: Volume of a ball
Use spherical coordinates to find the volume of a ball of radius 3.
0 \le \rho \le 3, \quad 0 \le \varphi \le \pi, \quad 0 \le \theta \le 2\pi
Describe the ball: every direction, out to distance 3.
V = \int_0^{2\pi} \int_0^{\pi} \int_0^3 \rho^2\sin\varphi\,d\rho\,d\varphi\,d\thetaSet up the volume: integrate 1 times ρ² sin φ.
\int_0^3 \rho^2\sin\varphi\,d\rho = \sin\varphi\Big[\dfrac{\rho^3}{3}\Big]_0^3Integrate in ρ. Treat sin φ as a constant.
= 9\sin\varphi
Substitute: 27/3 = 9.
\int_0^{\pi} 9\sin\varphi\,d\varphi = 9\Big[-\cos\varphi\Big]_0^{\pi}Integrate in φ.
= 9(1 + 1) = 18
Substitute: −cos π = 1 and −cos 0 = −1, so 1 − (−1) = 2.
V = \int_0^{2\pi} 18\,d\theta = 36\piIntegrate in θ: multiply by 2π.
Answer: 36π ≈ 113.10. This matches the formula (4/3)π(3)³ = 36π.
Example 2: Integrating the squared distance
Evaluate \iiint_B (x^2 + y^2 + z^2)\,dV, where B is the ball of radius 2 centered at the origin.
(x^2 + y^2 + z^2)\,dV = \rho^2 \cdot \rho^2\sin\varphi\,d\rho\,d\varphi\,d\theta
Convert the integrand and include ρ² sin φ.
= \rho^4\sin\varphi\,d\rho\,d\varphi\,d\theta
Multiply the powers of ρ.
\int_0^2 \rho^4\,d\rho = \dfrac{32}{5}Integrate in ρ: [ρ⁵/5] from 0 to 2.
\int_0^{\pi} \sin\varphi\,d\varphi = 2Integrate in φ, as in Example 1.
\int_0^{2\pi} d\theta = 2\piIntegrate in θ.
\dfrac{32}{5} \cdot 2 \cdot 2\pi = \dfrac{128\pi}{5}All limits are constants, so multiply the three results.
Answer: 128π/5 ≈ 80.42.
Example 3: An ice cream cone
Find the volume of the solid inside the sphere x² + y² + z² = 4 and above the cone z = √(x² + y²).
\rho = 2
The sphere has radius 2.
\rho\cos\varphi = \rho\sin\varphi
Write the cone in spherical form: z = ρ cos φ and √(x² + y²) = ρ sin φ.
\tan\varphi = 1 \Rightarrow \varphi = \dfrac{\pi}{4}Divide both sides by ρ cos φ.
V = \int_0^{2\pi} \int_0^{\pi/4} \int_0^2 \rho^2\sin\varphi\,d\rho\,d\varphi\,d\thetaAbove the cone means 0 ≤ φ ≤ π/4.
\int_0^2 \rho^2\sin\varphi\,d\rho = \dfrac{8}{3}\sin\varphiIntegrate in ρ.
\int_0^{\pi/4} \dfrac{8}{3}\sin\varphi\,d\varphi = \dfrac{8}{3}\Big[-\cos\varphi\Big]_0^{\pi/4}Integrate in φ.
= \dfrac{8}{3}\Big(1 - \dfrac{\sqrt{2}}{2}\Big)Substitute: −cos(π/4) + cos 0 = 1 − √2/2.
V = 2\pi \cdot \dfrac{8}{3}\Big(1 - \dfrac{\sqrt{2}}{2}\Big)Integrate in θ: multiply by 2π.
= \dfrac{16\pi}{3} - \dfrac{8\sqrt{2}\,\pi}{3}Distribute.
\approx 4.907
Evaluate.
Answer: (16π − 8√2 π)/3 ≈ 4.91.
Example 4: A function over a hemisphere
Evaluate \iiint_H z\,dV, where H is the upper half of the ball of radius 1.
0 \le \rho \le 1, \quad 0 \le \varphi \le \dfrac{\pi}{2}, \quad 0 \le \theta \le 2\piUpper half: φ stops at the floor.
z\,dV = \rho\cos\varphi \cdot \rho^2\sin\varphi\,d\rho\,d\varphi\,d\theta
Convert z and include ρ² sin φ.
\int_0^1 \rho^3\,d\rho = \dfrac{1}{4}Integrate the ρ factor.
\int_0^{\pi/2} \sin\varphi\cos\varphi\,d\varphi = \Big[\dfrac{\sin^2\varphi}{2}\Big]_0^{\pi/2}Integrate the φ factor with u-substitution, u = sin φ.
= \dfrac{1}{2}Substitute: sin(π/2) = 1 and sin 0 = 0.
\int_0^{2\pi} d\theta = 2\piIntegrate the θ factor.
\dfrac{1}{4} \cdot \dfrac{1}{2} \cdot 2\pi = \dfrac{\pi}{4}Multiply the three results.
Answer: π/4 ≈ 0.785. Dividing by the volume 2π/3 of the hemisphere gives its balance height, 3/8, as in center of mass problems.
Example 5: Mass of a display ball
A museum display ball has radius 10 cm. It is densest at the center: its density is δ = 9 − 0.5ρ grams per cubic centimeter, where ρ is the distance from the center. Find its mass.
m = \int_0^{2\pi} \int_0^{\pi} \int_0^{10} (9 - 0.5\rho)\rho^2\sin\varphi\,d\rho\,d\varphi\,d\thetaMass = density integrated over the ball.
(9 - 0.5\rho)\rho^2 = 9\rho^2 - 0.5\rho^3
Distribute the ρ².
\int_0^{10} (9\rho^2 - 0.5\rho^3)\,d\rho = \Big[3\rho^3 - \dfrac{\rho^4}{8}\Big]_0^{10}Integrate in ρ.
= 3000 - 1250
Substitute ρ = 10. The value at ρ = 0 is 0.
= 1750
Subtract.
1750 \int_0^{\pi} \sin\varphi\,d\varphi = 3500Integrate in φ: the integral is 2.
m = 2\pi \cdot 3500
Integrate in θ: multiply by 2π.
= 7000\pi \approx 21{,}991Simplify and evaluate.
Answer: about 21,991 g, or about 22.0 kg. As a check, the density runs from 9 at the center down to 4 at the surface, and the average is 7000π ÷ (4000π/3) = 5.25 g/cm³. That is closer to 4 than to 9, because most of a ball’s volume lies near its surface.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Leaving out ρ² sin φ | Writing only dρ dφ dθ in Example 1 and getting 6π² | Always use dV = ρ² sin φ dρ dφ dθ. |
| Letting φ run to 2π | Using 0 ≤ φ ≤ 2π for a ball | φ goes from 0 to π. Only θ makes a full turn. |
| Swapping the roles of φ and θ | Writing z = ρ cos θ | φ is measured from the z-axis, so z = ρ cos φ. |
| Wrong cone angle | Using φ = π/3 for z = √(x² + y²) | Set ρ cos φ = ρ sin φ to get tan φ = 1, so φ = π/4. |
| Using the cylindrical r for ρ | Writing x² + y² + z² = r² | In spherical coordinates, x² + y² + z² = ρ² and x² + y² = ρ² sin² φ. |
Related methods
Converting points
From spherical to rectangular, use the three formulas above. From rectangular to spherical, use ρ = √(x² + y² + z²), cos φ = z/ρ, and the same θ as in polar coordinates. For example, (ρ, θ, φ) = (2, 0, π/2) is the point (2, 0, 0) on the x-axis.
Spherical or cylindrical?
Choose spherical coordinates when the solid is part of a ball or a cone with its tip at the origin, or when the integrand contains x² + y² + z². Choose cylindrical coordinates when the solid is round about the z-axis but has flat tops or paraboloids.
Other changes of variables
Cylindrical and spherical coordinates are two cases of a general change of variables. The extra factors r and ρ² sin φ are Jacobians, the topic of the next lesson.
Practice problems
- Evaluate \int_0^{2\pi} \int_0^{\pi} \int_0^1 \rho^2\sin\varphi\,d\rho\,d\varphi\,d\theta. What does it measure?
- Evaluate \iiint_B \sqrt{x^2 + y^2 + z^2}\,dV, where B is the ball of radius 2 centered at the origin.
- Find the volume of the upper half of the ball of radius 3.
- Find the volume of the spherical shell between the spheres ρ = 1 and ρ = 2.
- Evaluate \iiint_E z\,dV, where E lies inside the sphere ρ = 2 and above the cone φ = π/3.
- Evaluate \iiint_B e^{(x^2 + y^2 + z^2)^{3/2}}\,dV, where B is the ball of radius 1.
- Find the volume of the part of the ball of radius 4 that lies in the first octant.
- Convert the spherical point (ρ, θ, φ) = (4, π/2, π/6) to rectangular coordinates.
- Convert the point (x, y, z) = (1, 1, √2) to spherical coordinates.
- A dome is a concrete half-shell. Its inner radius is 9 m and its outer radius is 10 m. Find the volume of concrete.
Show answers
1.
\int_0^1 \rho^2\,d\rho = \dfrac{1}{3}Integrate the ρ factor.
\int_0^{\pi} \sin\varphi\,d\varphi = 2Integrate the φ factor.
\dfrac{1}{3} \cdot 2 \cdot 2\pi = \dfrac{4\pi}{3}Multiply by the θ factor, 2π.
Answer: 4π/3 ≈ 4.19, the volume of a ball of radius 1.
2.
\sqrt{x^2 + y^2 + z^2}\,dV = \rho \cdot \rho^2\sin\varphi\,d\rho\,d\varphi\,d\thetaConvert the integrand and include ρ² sin φ.
\int_0^2 \rho^3\,d\rho = 4
Integrate the ρ factor: [ρ⁴/4] from 0 to 2.
4 \cdot 2 \cdot 2\pi = 16\pi
Multiply by the φ factor 2 and the θ factor 2π.
Answer: 16π ≈ 50.27
3.
\int_0^3 \rho^2\,d\rho = 9
Integrate the ρ factor.
\int_0^{\pi/2} \sin\varphi\,d\varphi = 1Upper half: φ runs from 0 to π/2.
9 \cdot 1 \cdot 2\pi = 18\pi
Multiply by the θ factor.
Answer: 18π ≈ 56.55, half of the ball in Example 1.
4.
\int_1^2 \rho^2\,d\rho = \dfrac{8 - 1}{3} = \dfrac{7}{3}Integrate the ρ factor from 1 to 2.
\dfrac{7}{3} \cdot 2 \cdot 2\pi = \dfrac{28\pi}{3}Multiply by the φ and θ factors.
Answer: 28π/3 ≈ 29.32
5.
z\,dV = \rho^3\cos\varphi\sin\varphi\,d\rho\,d\varphi\,d\theta
Convert z = ρ cos φ and include ρ² sin φ.
\int_0^2 \rho^3\,d\rho = 4
Integrate the ρ factor.
\int_0^{\pi/3} \sin\varphi\cos\varphi\,d\varphi = \dfrac{\sin^2(\pi/3)}{2} = \dfrac{3}{8}Integrate the φ factor with u = sin φ: (√3/2)²/2 = 3/8.
4 \cdot \dfrac{3}{8} \cdot 2\pi = 3\piMultiply by the θ factor.
Answer: 3π ≈ 9.42
6.
e^{(x^2 + y^2 + z^2)^{3/2}} = e^{\rho^3}Convert: (ρ²)^(3/2) = ρ³.
\int_0^1 e^{\rho^3}\rho^2\,d\rho = \Big[\dfrac{e^{\rho^3}}{3}\Big]_0^1 = \dfrac{e - 1}{3}Integrate the ρ factor with u = ρ³, du = 3ρ² dρ.
\dfrac{e - 1}{3} \cdot 2 \cdot 2\pi = \dfrac{4\pi(e - 1)}{3}Multiply by the φ factor 2 and the θ factor 2π.
Answer: 4π(e − 1)/3 ≈ 7.20
7.
0 \le \varphi \le \dfrac{\pi}{2}, \quad 0 \le \theta \le \dfrac{\pi}{2}The first octant: above the floor and a quarter turn.
\int_0^4 \rho^2\,d\rho = \dfrac{64}{3}Integrate the ρ factor.
\dfrac{64}{3} \cdot 1 \cdot \dfrac{\pi}{2} = \dfrac{32\pi}{3}The φ factor is 1 and the θ factor is π/2.
Answer: 32π/3 ≈ 33.51, one eighth of the ball.
8.
x = 4\sin\dfrac{\pi}{6}\cos\dfrac{\pi}{2} = 4 \cdot \dfrac{1}{2} \cdot 0 = 0Use x = ρ sin φ cos θ.
y = 4\sin\dfrac{\pi}{6}\sin\dfrac{\pi}{2} = 4 \cdot \dfrac{1}{2} \cdot 1 = 2Use y = ρ sin φ sin θ.
z = 4\cos\dfrac{\pi}{6} = 4 \cdot \dfrac{\sqrt{3}}{2} = 2\sqrt{3}Use z = ρ cos φ.
Answer: (0, 2, 2√3)
9.
\rho = \sqrt{1 + 1 + 2} = 2Find the distance from the origin.
\cos\varphi = \dfrac{\sqrt{2}}{2} \Rightarrow \varphi = \dfrac{\pi}{4}Use cos φ = z/ρ = √2/2.
\tan\theta = \dfrac{1}{1} \Rightarrow \theta = \dfrac{\pi}{4}The floor point (1, 1) is in Quadrant I.
Answer: (ρ, θ, φ) = (2, π/4, π/4)
10.
V = \int_0^{2\pi} \int_0^{\pi/2} \int_9^{10} \rho^2\sin\varphi\,d\rho\,d\varphi\,d\thetaHalf-shell: ρ from 9 to 10, upper half.
\int_9^{10} \rho^2\,d\rho = \dfrac{1000 - 729}{3} = \dfrac{271}{3}Integrate the ρ factor.
\dfrac{271}{3} \cdot 1 \cdot 2\pi = \dfrac{542\pi}{3} \approx 567.6The φ factor is 1 and the θ factor is 2π.
Answer: about 567.6 m³ of concrete
Triple integrals in spherical coordinates FAQ
Why is dV equal to ρ² sin φ dρ dφ dθ?
A small spherical box has edges dρ, ρ dφ and ρ sin φ dθ. The last edge is an arc of a circle of radius ρ sin φ, the distance to the z-axis. Multiplying the three edges gives ρ² sin φ dρ dφ dθ.
What are the limits for a sphere in spherical coordinates?
For a ball of radius a centered at the origin, use 0 ≤ ρ ≤ a, 0 ≤ φ ≤ π and 0 ≤ θ ≤ 2π. For the upper half, stop φ at π/2.
Why does φ only go from 0 to π?
φ = 0 points straight up and φ = π points straight down. Together with a full turn in θ, that already reaches every direction.
When should I use spherical coordinates?
Use them for balls, spherical shells and cones with their tip at the origin, or when the integrand contains x² + y² + z².
Summary
- Spherical coordinates: x = ρ sin φ cos θ, y = ρ sin φ sin θ, z = ρ cos φ.
- ρ is the distance from the origin, φ runs from 0 to π down from the z-axis, and θ runs around the z-axis.
- The volume element is dV = ρ² sin φ dρ dφ dθ.
- Spheres are ρ = a, and cones are φ = constant.
- With constant limits, split the integral into a product of three single integrals.
Previous lesson: Triple Integrals in Cylindrical Coordinates
Next lesson: Jacobians and Change of Variables
Back to the Calculus 3 Index