Skip to content
Tutorials Center
My learning

Topics

Lesson 26 of 39 · Multiple Integrals

Triple Integrals, Cylindrical and Spherical Coordinates

Integrate over solids with triple integrals, and choose cylindrical or spherical coordinates for cylinders, cones and balls. Includes volume and mass examples.

A double integral handles flat regions. To add up a quantity spread through a solid, such as mass with varying density, you need a triple integral:

Text
∭_E f(x, y, z) dV

With f = 1 it gives the volume of the solid E. With f as a density it gives the mass. Computationally, a triple integral is three single integrals in a row, with limits that depend on the variables outside them. This lesson shows how, and then introduces two coordinate systems that make round solids easy.

Rectangular coordinates

For a box [a, b] × [c, d] × [p, q], Fubini's theorem lets you integrate in any order. For a general solid, describe it as the region between two surfaces over a base region D in the xy-plane:

Text
E = { (x, y, z) : (x, y) in D,  u₁(x, y) ≤ z ≤ u₂(x, y) }

and write

Text
∭_E f dV = ∬_D ( ∫_{u₁(x,y)}^{u₂(x,y)} f dz ) dA

The inner integral is over z. The outer double integral over D is done as in earlier lessons.

Cylindrical coordinates

Cylindrical coordinates keep z and replace (x, y) by polar coordinates (r, θ):

Text
x = r cos θ,   y = r sin θ,   z = z
dV = r dz dr dθ

Use them when the solid has an axis of symmetry along the z-axis: cylinders, cones, paraboloids.

Example. A solid cylinder has radius 2 and height 3 (0 ≤ z ≤ 3), and density ρ(x, y, z) = z (heavier toward the top). Its mass is

Text
M = ∫₀^{2π} ∫₀² ∫₀³ z · r dz dr dθ
  = (∫₀^{2π} dθ)(∫₀² r dr)(∫₀³ z dz)
  = 2π · 2 · 9/2 = 18π
Python Mass of a cylinder with variable density

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Spherical coordinates

Spherical coordinates describe a point by its distance ρ (rho) from the origin, the polar angle φ (phi) measured down from the positive z-axis, and the azimuthal angle θ around the z-axis:

Text
x = ρ sin φ cos θ
y = ρ sin φ sin θ
z = ρ cos φ
dV = ρ² sin φ dρ dφ dθ

with ρ ≥ 0, 0 ≤ φ ≤ π, 0 ≤ θ ≤ 2π. (Physics texts often swap the roles of θ and φ; check which convention a source uses.) Note that x² + y² + z² = ρ².

Use spherical coordinates for balls, spherical shells and cones with the vertex at the origin.

Example: volume of a ball of radius R.

Text
V = ∫₀^{2π} ∫₀^π ∫₀^R ρ² sin φ dρ dφ dθ
  = 2π · 2 · R³/3 = 4πR³/3

because ∫₀^π sin φ dφ = 2.

flowchart LR
    A["Solid has a z-axis symmetry<br/>or is a cylinder"] --> C["Cylindrical: dV = r dz dr dθ"]
    B["Solid is a ball, shell<br/>or cone at the origin"] --> D["Spherical: dV = ρ² sin φ dρ dφ dθ"]
    E["Box or flat faces"] --> F["Rectangular: dV = dx dy dz"]

Match the coordinates to the shape of the solid.

Example: an ice cream cone

Find the volume of the solid above the cone z = √(x² + y²) and inside the unit sphere x² + y² + z² = 1.

The cone makes a fixed angle with the z-axis: on it z = r, so tan φ = r/z = 1 and φ = π/4. The solid is 0 ≤ ρ ≤ 1, 0 ≤ φ ≤ π/4, 0 ≤ θ ≤ 2π:

Text
V = ∫₀^{2π} ∫₀^{π/4} ∫₀¹ ρ² sin φ dρ dφ dθ
  = 2π · (1/3) · (1 - cos(π/4))
  = (2π/3)(1 - √2/2) = π(2 - √2)/3
Python Cone-in-sphere volume: exact and by Monte Carlo

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The random estimate is only approximate, but it should agree with the exact value to about two decimals.

Choosing limits step by step

  1. Sketch the solid (and its shadow in the xy-plane).
  2. Choose the coordinate system that makes the boundary simple.
  3. Write each boundary surface in those coordinates.
  4. Find the ranges: innermost variable between two surfaces, then the next, and so on.
  5. Include the correct volume factor: 1, r, or ρ² sin φ.

A common cross-check is to set f = 1 and compare the result with a known volume such as a ball, cylinder or cone. If the check fails, the limits or the Jacobian factor are wrong.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is the volume element dV in cylindrical coordinates?

    Cylindrical coordinates use polar coordinates in the xy-plane, so the factor r appears, as in dA = r dr dθ.
  2. 2. What is the volume element in spherical coordinates (ρ, φ, θ), with φ measured from the z-axis?

    The spherical volume element is ρ² sin φ dρ dφ dθ.
  3. 3. The cylinder of radius 2, height 3 with density z has mass:

    M = 2π · ∫₀² r dr · ∫₀³ z dz = 2π · 2 · 9/2 = 18π.
  4. 4. For a ball of radius R, ∫₀^π sin φ dφ equals:

    ∫₀^π sin φ dφ = [-cos φ]₀^π = 1 + 1 = 2, which gives V = 2π · 2 · R³/3 = 4πR³/3.

Summary

  • A triple integral adds a quantity over a solid; with f = 1 it is volume.
  • Rectangular: dV = dx dy dz; cylindrical: dV = r dz dr dθ; spherical: dV = ρ² sin φ dρ dφ dθ.
  • Use cylindrical coordinates for axial symmetry, spherical for balls and cones at the origin.
  • Check any setup by computing a volume you already know.

Next: Change of Variables and the Jacobian