Triple Integrals in Cylindrical Coordinates
Cylindrical coordinates are polar coordinates in the -plane with the height kept as it is. They turn solids with an axis of symmetry (cylinders, cones, paraboloids, pipes, drill holes) into boxes in , and make their triple integrals short. The key fact is the volume element .
The survey course introduces double and triple integrals in Double and Triple Integrals.
Polar double integrals come first: Double Integrals in Polar Coordinates.
The coordinate system
A point has cylindrical coordinates , where are the polar coordinates of its shadow in the -plane and is its height:
| Equation | Surface |
|---|---|
| circular cylinder of radius around the -axis | |
| half-plane through the -axis | |
| horizontal plane | |
| cone | |
| paraboloid | |
| cylinder |
To recover from in code, use atan2(y, x), which picks the correct quadrant; atan(y/x) cannot tell from .
The volume element
A cylindrical wedge with small , , has base area (a polar rectangle: its curved sides have lengths and the radial sides ) and height , so its volume is approximately
(The factor is also the Jacobian determinant , see Change of Variables.) For a solid with a polar region , :
Tip: Forgetting the is the single most common mistake. A quick check: must give the cylinder volume .
Example: the ice-cream cone
lies above the cone and below the sphere , i.e. . They meet where , , at height . So
import sympy as sp
r, th, z = sp.symbols("r theta z", nonnegative=True)
lim = [(z, r, sp.sqrt(8 - r**2)), (r, 0, 2), (th, 0, 2 * sp.pi)]
V = sp.integrate(r, *lim)
Mz = sp.integrate(z * r, *lim)
print("volume:", sp.simplify(V), "≈", round(float(V), 4))
print("centroid height z̄:", sp.nsimplify(sp.simplify(Mz / V)), "≈", round(float(Mz / V), 4))volume: 32*pi*(-1 + sqrt(2))/3 ≈ 13.8804
centroid height z̄: 3/4 + 3*sqrt(2)/4 ≈ 1.8107
Example: an integral that wants cylindrical coordinates
The , limits describe the disk , and runs from the cone up to the plane . In cylindrical coordinates:
Moment of inertia of a cylinder
A solid cylinder of radius , height and constant density has mass . Its moment of inertia about its axis is
A thin-walled tube of the same mass has (all mass at distance ), so a solid wheel is easier to spin up than a hoop. A rotating game object's inertia tensor contains exactly these numbers.
import numpy as np
rng = np.random.default_rng(11)
R, h, rho = 0.5, 2.0, 1.0
M = rho * np.pi * R**2 * h
# Monte Carlo in cylindrical coordinates: sample r with density ∝ r (r = R·√u) so points are uniform in volume
N = 200_000
r = R * np.sqrt(rng.random(N))
I_mc = M * np.mean(r**2)
print(f"I_z exact ½MR² = {0.5 * M * R**2:.5f} Monte Carlo = {I_mc:.5f}")
# the classic mistake: r uniform in [0, R] crowds points near the axis
r_bad = R * rng.random(N)
print(f"with r uniform (wrong) = {M * np.mean(r_bad**2):.5f}")I_z exact ½MR² = 0.19635 Monte Carlo = 0.19664
with r uniform (wrong) = 0.13122
Sampling uniformly ignores the factor in : it puts as many points in the thin inner ring as in the wide outer ring, so it underestimates the inertia by a third (the expected value of becomes instead of ).
In software
- Uniform sampling of disks and cylinders. , (, uniform on ) is the standard way to pick random points in a disk for particle emitters, sampling area lights and depth-of-field lens samples; the square root is the factor of in disguise (inverse-CDF sampling of the density ).
- Physics. Inertia of wheels, shafts, capsules and cylinder colliders; buoyancy volumes of partially submerged cylinders.
- CAD/CAM and manufacturing. Volumes removed by drills and lathe cuts are solids of revolution integrated in cylindrical coordinates.
Exercises
Exercise 1: Convert
Convert the point with Cartesian coordinates to cylindrical coordinates, and describe the surface .
Answer
. is the circular cylinder .
Solution
No appears, so the surface is a vertical cylinder over that circle.
Exercise 2: Volume between paraboloids
Find the volume of the solid between and .
Answer
.
Solution
They meet where , .
Exercise 3: Mass with variable density
A cylinder , has density (heavier at the rim). Find its mass.
Answer
.
Solution
Exercise 4: Check by code
Evaluate , where is inside the cylinder , above and below the plane , both with SymPy in cylindrical coordinates and with SciPy's tplquad in Cartesian coordinates.
Answer
.
Solution
The middle term vanishes because , and the last one uses and . Both computations below agree.
import sympy as sp
import numpy as np
from scipy import integrate
r, th, z = sp.symbols("r theta z")
I = sp.integrate(z * r, (z, 0, 4 - r * sp.sin(th)), (r, 0, 2), (th, 0, 2 * sp.pi))
print(I, round(float(I), 3))
val, _ = integrate.tplquad(lambda z, y, x: z, -2, 2, lambda x: -np.sqrt(4 - x*x), lambda x: np.sqrt(4 - x*x),
lambda x, y: 0, lambda x, y: 4 - y)
print(round(val, 3))34*pi 106.814
106.814
Test yourself
What is the volume element in cylindrical coordinates?
In cylindrical coordinates, the equation describes…
- a cylinder
- a plane
- a paraboloid
- a cone
To pick uniform random points in a disk of radius , choose and …