Computing the Triple Integral in Spherical Coordinates

Why Spherical Coordinates Are Needed

When the region of integration is a spherical region such as a sphere, a hemisphere, a spherical cone or a spherical shell, or when the integrand contains x2+y2+z2x^2 + y^2 + z^2, spherical coordinates simplify the computation enormously. Spherical coordinates locate a point in space by “the distance to the origin plus two angles”, and are the natural choice for problems with spherical symmetry.

The Spherical Coordinate Transformation

The spherical coordinate transformation

The relation between the rectangular coordinates and the spherical coordinates:

{x=rsin⁡ϕcos⁡θy=rsin⁡ϕsin⁡θz=rcos⁡ϕ\begin{cases} x = r \sin\phi \cos\theta \\ y = r \sin\phi \sin\theta \\ z = r \cos\phi \end{cases}

where:

  • r≥0r \geq 0 is the radial distance (the distance from the point to the origin)
  • ϕ∈[0,π]\phi \in [0, \pi] is the angle between the line from the origin to the point and the positive zz-axis (the polar angle, also called the colatitude)
  • θ∈[0,2π)\theta \in [0, 2\pi) is the angle between the projection of the point onto the xOyxOy plane and the positive xx-axis (the azimuthal angle)

The Jacobian determinant:

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

Hence the volume element: dv=dx dy dz=r2sin⁡ϕ dr dϕ dθdv = dx\,dy\,dz = r^2 \sin\phi \, dr \, d\phi \, d\theta

The Geometric Meaning of the Angular Ranges

  • ϕ=0\phi = 0: the positive zz-axis
  • ϕ=π2\phi = \frac{\pi}{2}: the xOyxOy plane
  • ϕ=π\phi = \pi: the negative zz-axis
  • θ=0\theta = 0: the right half of the xOzxOz plane (y=0,x>0y=0, x>0)
  • θ=π2\theta = \frac{\pi}{2}: the front half of the yOzyOz plane (x=0,y>0x=0, y>0)

The Formula for the Triple Integral in Spherical Coordinates

∭Ωf(x,y,z) dv=∭Ω′f(rsin⁡ϕcos⁡θ,rsin⁡ϕsin⁡θ,rcos⁡ϕ)⋅r2sin⁡ϕ dr dϕ dθ\iiint_\Omega f(x,y,z) \, dv = \iiint_{\Omega'} f(r\sin\phi\cos\theta, r\sin\phi\sin\theta, r\cos\phi) \cdot r^2 \sin\phi \, dr \, d\phi \, d\theta

Typical Regions in Spherical Coordinates

1. A Sphere Centred at the Origin

The sphere

Ω:x2+y2+z2≤R2\Omega: x^2 + y^2 + z^2 \leq R^2

In spherical coordinates:

Ω′:0≤r≤R,0≤ϕ≤π,0≤θ≤2π\Omega': 0 \leq r \leq R, \quad 0 \leq \phi \leq \pi, \quad 0 \leq \theta \leq 2\pi

∭Ωf dv=∫02πdθ∫0πsin⁡ϕ dϕ∫0Rf(rsin⁡ϕcos⁡θ,…)r2 dr\iiint_\Omega f \, dv = \int_0^{2\pi} d\theta \int_0^\pi \sin\phi \, d\phi \int_0^R f(r\sin\phi\cos\theta, \ldots) r^2 \, dr

2. A Hemisphere

The upper hemisphere

Ω:x2+y2+z2≤R2,z≥0\Omega: x^2 + y^2 + z^2 \leq R^2, \quad z \geq 0

In spherical coordinates:

Ω′:0≤r≤R,0≤ϕ≤π2,0≤θ≤2π\Omega': 0 \leq r \leq R, \quad 0 \leq \phi \leq \frac{\pi}{2}, \quad 0 \leq \theta \leq 2\pi

3. A Spherical Sector

The spherical sector region

The region enclosed by the sphere x2+y2+z2=R2x^2+y^2+z^2 = R^2 and the cone z=x2+y2z = \sqrt{x^2+y^2} (inside the cone and inside the sphere):

The cone z=x2+y2z = \sqrt{x^2+y^2} corresponds to ϕ=π4\phi = \frac{\pi}{4} (because tan⁡ϕ=x2+y2z=1\tan\phi = \frac{\sqrt{x^2+y^2}}{z} = 1)

In spherical coordinates:

Ω′:0≤r≤R,0≤ϕ≤π4,0≤θ≤2π\Omega': 0 \leq r \leq R, \quad 0 \leq \phi \leq \frac{\pi}{4}, \quad 0 \leq \theta \leq 2\pi

4. A Sphere Whose Centre Is Not the Origin

The off-centre sphere

For the sphere x2+y2+z2≤2azx^2+y^2+z^2 \leq 2az with centre (0,0,a)(0,0,a) and radius aa:

Substituting spherical coordinates: r2≤2arcos⁡ϕ⇒r≤2acos⁡ϕr^2 \leq 2ar\cos\phi \Rightarrow r \leq 2a\cos\phi

Since r≥0r \geq 0, we need cos⁡ϕ≥0\cos\phi \geq 0, that is, 0≤ϕ≤π20 \leq \phi \leq \frac{\pi}{2}

Ω′:0≤r≤2acos⁡ϕ,0≤ϕ≤π2,0≤θ≤2π\Omega': 0 \leq r \leq 2a\cos\phi, \quad 0 \leq \phi \leq \frac{\pi}{2}, \quad 0 \leq \theta \leq 2\pi

A Summary of the Applicable Scenarios

Worked Examples

Example 1: An Integral over a Sphere

Compute ∭Ω(x2+y2+z2) dv\iiint_\Omega (x^2+y^2+z^2) \, dv, where Ω:x2+y2+z2≤R2\Omega: x^2+y^2+z^2 \leq R^2.

the triple integralspherical coordinatesa spherespherical symmetry

Approach:

A sphere together with an integrand containing x2+y2+z2x^2+y^2+z^2 — spherical coordinates are the best choice.

Steps:

  1. The spherical coordinate transformation, with the volume element r2sin⁡ϕ dr dϕ dθr^2\sin\phi \, dr \, d\phi \, d\theta
  2. The region of integration: 0≤r≤R, 0≤ϕ≤π, 0≤θ≤2π0 \leq r \leq R, \, 0 \leq \phi \leq \pi, \, 0 \leq \theta \leq 2\pi
  3. The integrand: x2+y2+z2=r2x^2+y^2+z^2 = r^2
  4. ∭Ω(x2+y2+z2)dv=∫02πdθ∫0πsin⁡ϕ dϕ∫0Rr2⋅r2 dr\iiint_\Omega (x^2+y^2+z^2) dv = \int_0^{2\pi} d\theta \int_0^\pi \sin\phi \, d\phi \int_0^R r^2 \cdot r^2 \, dr =2π⋅[−cos⁡ϕ]0π⋅[r55]0R=2π⋅2⋅R55=4πR55= 2\pi \cdot [-\cos\phi]_0^\pi \cdot \left[\frac{r^5}{5}\right]_0^R = 2\pi \cdot 2 \cdot \frac{R^5}{5} = \frac{4\pi R^5}{5}

Answer: 4πR55\frac{4\pi R^5}{5}

Example 2: A Spherical Sector Region

Compute ∭Ωz dv\iiint_\Omega z \, dv, where Ω\Omega is enclosed by x2+y2+z2≤2Rzx^2+y^2+z^2 \leq 2Rz and z≥x2+y2z \geq \sqrt{x^2+y^2}.

the triple integralspherical coordinatesa spherical sectoran off-centre sphere

Approach:

The sphere x2+y2+z2=2Rzx^2+y^2+z^2=2Rz is x2+y2+(z−R)2=R2x^2+y^2+(z-R)^2=R^2 (centre (0,0,R)(0,0,R), radius RR). The cone z=x2+y2z=\sqrt{x^2+y^2} corresponds to ϕ=π4\phi=\frac{\pi}{4}.

Steps:

  1. The spherical equation of the sphere: r2=2Rrcos⁡ϕ⇒r=2Rcos⁡ϕr^2 = 2Rr\cos\phi \Rightarrow r = 2R\cos\phi
  2. The cone: ϕ=π4\phi = \frac{\pi}{4}
  3. The region of integration: 0≤r≤2Rcos⁡ϕ, 0≤ϕ≤π4, 0≤θ≤2π0 \leq r \leq 2R\cos\phi, \, 0 \leq \phi \leq \frac{\pi}{4}, \, 0 \leq \theta \leq 2\pi
  4. The integrand: z=rcos⁡ϕz = r\cos\phi
  5. ∭Ωz dv=∫02πdθ∫0π/4dϕ∫02Rcos⁡ϕrcos⁡ϕ⋅r2sin⁡ϕ dr\iiint_\Omega z \, dv = \int_0^{2\pi} d\theta \int_0^{\pi/4} d\phi \int_0^{2R\cos\phi} r\cos\phi \cdot r^2\sin\phi \, dr =2π∫0π/4cos⁡ϕsin⁡ϕ dϕ∫02Rcos⁡ϕr3dr=2π∫0π/4cos⁡ϕsin⁡ϕ⋅(2Rcos⁡ϕ)44dϕ= 2\pi \int_0^{\pi/4} \cos\phi\sin\phi \, d\phi \int_0^{2R\cos\phi} r^3 dr = 2\pi \int_0^{\pi/4} \cos\phi\sin\phi \cdot \frac{(2R\cos\phi)^4}{4} d\phi =2π⋅4R4∫0π/4cos⁡5ϕsin⁡ϕ dϕ=8πR4⋅[−cos⁡6ϕ6]0π/4= 2\pi \cdot 4R^4 \int_0^{\pi/4} \cos^5\phi\sin\phi \, d\phi = 8\pi R^4 \cdot \left[-\frac{\cos^6\phi}{6}\right]_0^{\pi/4} =8πR4⋅16(1−18)=4πR43⋅78=7πR46= 8\pi R^4 \cdot \frac{1}{6}\left(1 - \frac{1}{8}\right) = \frac{4\pi R^4}{3} \cdot \frac{7}{8} = \frac{7\pi R^4}{6}

Answer: 7πR46\frac{7\pi R^4}{6}

Example 3: A Spherical Shell Region

Compute ∭Ω1x2+y2+z2 dv\iiint_\Omega \frac{1}{\sqrt{x^2+y^2+z^2}} \, dv, where Ω:1≤x2+y2+z2≤4\Omega: 1 \leq x^2+y^2+z^2 \leq 4.

the triple integralspherical coordinatesa spherical shellan improper integral

Approach:

In a spherical shell region the limits are constant in spherical coordinates, which makes the computation simple.

Steps:

  1. Spherical coordinates: 1≤r≤2, 0≤ϕ≤π, 0≤θ≤2π1 \leq r \leq 2, \, 0 \leq \phi \leq \pi, \, 0 \leq \theta \leq 2\pi
  2. The integrand: 1x2+y2+z2=1r\frac{1}{\sqrt{x^2+y^2+z^2}} = \frac{1}{r}
  3. ∭Ω1r⋅r2sin⁡ϕ dr dϕ dθ=∫02πdθ∫0πsin⁡ϕ dϕ∫12r dr=2π⋅2⋅[r22]12=4π⋅32=6π\iiint_\Omega \frac{1}{r} \cdot r^2\sin\phi \, dr \, d\phi \, d\theta = \int_0^{2\pi} d\theta \int_0^\pi \sin\phi \, d\phi \int_1^2 r \, dr = 2\pi \cdot 2 \cdot \left[\frac{r^2}{2}\right]_1^2 = 4\pi \cdot \frac{3}{2} = 6\pi

Answer: 6π6\pi


Exercises

Exercise 1

Compute ∭Ωx2+y2+z2 dv\iiint_\Omega \sqrt{x^2+y^2+z^2} \, dv, where Ω:x2+y2+z2≤1\Omega: x^2+y^2+z^2 \leq 1.

the triple integralspherical coordinatesthe unit ball

Approach:

The unit ball together with an integrand containing x2+y2+z2\sqrt{x^2+y^2+z^2}: spherical coordinates.

Steps:

  1. Spherical coordinates: 0≤r≤1, 0≤ϕ≤π, 0≤θ≤2π0 \leq r \leq 1, \, 0 \leq \phi \leq \pi, \, 0 \leq \theta \leq 2\pi
  2. ∭Ωr⋅r2sin⁡ϕ dr dϕ dθ=∫02πdθ∫0πsin⁡ϕ dϕ∫01r3dr=2π⋅2⋅14=π\iiint_\Omega r \cdot r^2\sin\phi \, dr \, d\phi \, d\theta = \int_0^{2\pi} d\theta \int_0^\pi \sin\phi \, d\phi \int_0^1 r^3 dr = 2\pi \cdot 2 \cdot \frac{1}{4} = \pi

Answer: π\pi

Exercise 2

Compute ∭Ωz2 dv\iiint_\Omega z^2 \, dv, where Ω:x2+y2+z2≤R2\Omega: x^2+y^2+z^2 \leq R^2.

the triple integralspherical coordinatesa spheresymmetry

Approach:

By cyclic symmetry ∭x2=∭y2=∭z2\iiint x^2 = \iiint y^2 = \iiint z^2, so you can first compute ∭(x2+y2+z2)\iiint (x^2+y^2+z^2) and then divide by 3.

Steps:

  1. By cyclic symmetry: ∭Ωx2dv=∭Ωy2dv=∭Ωz2dv\iiint_\Omega x^2 dv = \iiint_\Omega y^2 dv = \iiint_\Omega z^2 dv
  2. ∭Ω(x2+y2+z2)dv=3∭Ωz2dv\iiint_\Omega (x^2+y^2+z^2) dv = 3\iiint_\Omega z^2 dv
  3. From the example above, ∭Ω(x2+y2+z2)dv=4πR55\iiint_\Omega (x^2+y^2+z^2) dv = \frac{4\pi R^5}{5}
  4. Hence ∭Ωz2dv=13⋅4πR55=4πR515\iiint_\Omega z^2 dv = \frac{1}{3} \cdot \frac{4\pi R^5}{5} = \frac{4\pi R^5}{15}

Answer: 4πR515\frac{4\pi R^5}{15}


Summary

Symbols Used in This Article

SymbolTypePronunciation/ExplanationMeaning in This Article
rrRadial distanceradial distanceThe distance from the point to the origin, r≥0r \geq 0
ϕ\phiPolar anglepolar angleThe angle with the positive zz-axis, ϕ∈[0,π]\phi \in [0,\pi]
θ\thetaAzimuthal angleazimuthal angleThe angle with the xx-axis in the xOyxOy plane
r2sin⁡ϕ dr dϕ dθr^2 \sin\phi \, dr \, d\phi \, d\thetaSpherical volume elementspherical volume elementThe volume element in spherical coordinates

Key Terms

English termPronunciationNote
spherical coordinates/ˈsfɪrɪkəl koʊˈɔːrdɪneɪts/a coordinate system that locates a point by a radial distance and two angles
radial distance/ˈreɪdiəl ˈdɪstəns/the distance from a point to the origin
polar angle/ˈpoʊlər ˈæŋɡəl/the angle with the zz-axis (the polar angle or colatitude)
azimuthal angle/ˌæzɪˈmjuːθəl ˈæŋɡəl/the projection angle in the xOyxOy plane
sphere/sfɪr/the solid enclosed by a sphere
spherical shell/ˈsfɪrɪkəl ʃɛl/the region between two concentric spheres
spherical cone/ˈsfɪrɪkəl koʊn/the region enclosed by a sphere and a conical surface
Jacobian determinant/dʒəˈkoʊbiən dɪˈtɜːrmɪnənt/the determinant of the partial derivatives of a coordinate transformation

Found an issue with this content?

Tell us what could be improved.