Multivariable CalculusTriple Integrals and Change of Variables3 of 4
Triple Integrals and Change of Variables · 3
Triple Integrals in Spherical Coordinates
When we integrate over a sphere or a cone, rectangular coordinates leave us with nested square roots, so we measure outward from the origin using spherical coordinates.
1
Spherical coordinates and the vertical triangle
Suppose we want to find the mass of a solid ball whose density increases with distance from its center.
Spherical coordinates and the vertical triangle
Instead of walking along an x,y,z grid, spherical coordinates (ρ,θ,φ) locate a point by its straight-line distance ρ from the origin, its horizontal spin θ from the positive x-axis (0≤θ≤2π), and its tilt angle φ down from the positive z-axis (0≤φ≤π). The tilt φ stops at π (straight down the negative z-axis) because spinning θ all the way around already reaches the other side of the z-axis.
Every conversion between rectangular and spherical coordinates comes straight from this single vertical right triangle, where the vertical height z is adjacent to φ and the horizontal radius r is opposite φ:
z=ρcosφ,r=ρsinφ
Replacing r in the polar formulas x=rcosθ and y=rsinθ gives the full set of conversions:
x=ρsinφcosθ,y=ρsinφsinθ,z=ρcosφ,x2+y2+z2=ρ2
As φ tilts from 0 to π, those two legs z=ρcosφ and r=ρsinφ track the point's height and horizontal radius from the top of the z-axis to the bottom.
Tilting the ray from top to bottom reaches every height, and the height always lies along the vertical axis next to the tilt angle, with the horizontal radius opposite it.
2
Volume of a spherical brick
To set up a triple integral in spherical coordinates, we need the volume dV of one tiny spherical brick formed by small changes dρ,dφ, and dθ.
Volume of a spherical brick
Because dφ and dθ are angles in radians rather than lengths, we turn them into edge lengths using arc length=radius×angle. Tilting a ray of radius ρ through dφ traces an arc of length ρdφ, and spinning around the z-axis in a horizontal circle of radius r=ρsinφ through dθ traces an arc of length ρsinφdθ. Multiplying the three perpendicular edge lengths gives the volume of one brick:
At a fixed distance ρ, the edges dρ and ρdφ stay the same size from pole to pole, but the horizontal circle of radius r=ρsinφ is widest at the equator (φ=π/2) and shrinks toward zero near the poles, making the spin edge ρsinφdθ shrink with it.
As you slide a spherical brick from pole to pole, its radial thickness and tilt arc stay the same, while its horizontal spin edge stretches widest at the equator and shrinks toward zero near the poles.
3
Sweeping out bounds and integrating over a sphere
Now we want to find the volume ∭1dV of a solid ball of radius R, and then find the total mass ∭x2+y2+z2dV of a ball of radius 2 whose density at each point equals its distance δ(x,y,z)=x2+y2+z2 from the center.
Sweeping out bounds and integrating over a sphere
For a full ball of radius R, a ray from the origin runs from ρ=0 to ρ=R, tilts from the north pole φ=0 to the south pole φ=π, and spins around the z-axis from θ=0 to θ=2π, giving the volume formula for a sphere:
For the ball of radius 2 with variable density, we use those same spherical bounds with R=2 and rewrite the density in terms of ρ.
Text solution
Convert the density and dV to spherical coordinatesSince the distance from the origin is x2+y2+z2=ρ and a ball of radius 2 has constant bounds 0≤ρ≤2,0≤φ≤π, and 0≤θ≤2π, we multiply the density ρ by the brick volume ρ2sinφdρdφdθ.
Integrate ρ3 from 0 to 2Holding φ and θ fixed, we evaluate the inner ρ integral first.
∫02ρ3dρ=[4ρ4]02=416−0=4
Integrate 4sinφ from 0 to πSubstituting 4 into the middle integral sweeps the ray into a vertical half-disk.
∫0π4sinφdφ=4[−cosφ]0π=4(1−(−1))=8
Integrate 8 from 0 to 2πSpinning the slice all the way around the z-axis multiplies 8 by 2π.
∫02π8dθ=[8θ]02π=16π
So the total mass of the ball of radius 2 is 16π.
4
Integrating over a cone capped by a sphere
When we only want part of a sphere, the tilt angle φ stops before π. Suppose we want to evaluate ∭EzdV over the solid bounded below by the cone z=x2+y2 and capped on top by the sphere x2+y2+z2=9.
Integrating over a cone capped by a sphere
x
y
z
z=x2+y2
x2+y2+z2=9
f(x,y,z)=z
z
Text solution
Find the cone angle and set up the spherical integralBecause x2+y2=r, the cone z=x2+y2 is where the vertical leg z equals the horizontal leg r, fixing the cone wall at φ=π/4, while z=ρcosφ and the sphere x2+y2+z2=9 fixes the outer cap at ρ=3.
Integrate from 0 to 2π over θSince no θ appears inside, spinning through a full turn multiplies by 2π.
∫02π1681dθ=1681⋅2π=881π
So the integral of z over the sphere-capped cone is 881π.
5
Flat boundaries where ρ depends on φ
What if the outer surface isn't a sphere? Suppose we want to set up the volume integral ∭E1dV for the same cone φ=π/4, but now capped by a flat horizontal top at height z=3.
Flat boundaries where ρ depends on φ
x
y
z
φ=4π
z=3
Text solution
Solve the flat plane equation for ρSubstituting z=ρcosφ into the plane z=3 gives the distance ρ from the origin to the flat top at any tilt angle φ.
ρcosφρ=3=cosφ3
Write the triple integral with ρ running from 0 to 3/cosφThe ray starts at the origin ρ=0 and exits the flat top at ρ=3/cosφ, while the cone angle 0≤φ≤π/4 and full spin 0≤θ≤2π stay the same.
Volume=∫02π∫0π/4∫03/cosφρ2sinφdρdφdθ
So replacing a spherical cap with a flat top changes the upper ρ bound from 3 to 3/cosφ.
Because the vertical height z=ρcosφ stays fixed at 3 along the flat top, tilting φ away from the z-axis makes the hypotenuse ρ=3/cosφ reach past the sphere ρ=3.
Because the flat top stays at the same height, tilting the ray outward forces it to stretch longer to reach the top.
6
Converting a rectangular integral to spherical coordinates
A spherical problem often starts written in x,y, and z with square roots in both the bounds and the integrand. Suppose we want to evaluate
∫02∫04−x2∫x2+y28−x2−y2x2+y2+z2dzdydx
Converting a rectangular integral to spherical coordinates
∫02∫04−x2∫x2+y28−x2−y2x2+y2+z2dzdydx=?
x
y
z
z=x2+y2
φ=4π
z=8−x2−y2
ρ=8
x
y
2
2
0≤x≤2
0≤θ≤2π
0≤y≤4−x2
Text solution
Use the z-bounds to find ρ and φThe lower bound z=x2+y2 is the cone φ=π/4, and squaring the upper bound z=8−x2−y2 gives the upper hemisphere x2+y2+z2=8, so ρ runs from 0 to 8 and φ tilts from 0 to π/4.
0≤ρ≤8,0≤φ≤4π
Use the x- and y-bounds in the xy-plane to find θBecause 0≤y≤4−x2 and 0≤x≤2 keep both x and y positive inside the circle x2+y2=4, the base covers only the first quadrant, so θ spins from 0 to π/2.
So the value of the rectangular triple integral is 4π(2−2).
Key concepts
Use spherical coordinates when the solid is shaped around a central point, such as spheres like x2+y2+z2=9 or cones like z=x2+y2, or when the integrand contains x2+y2+z2. Do not switch to spherical coordinates just because a shape is round: if the side wall is a vertical cylinder like x2+y2=4 between flat planes z=0 and z=3, cylindrical coordinates keep the bounds constant (0≤r≤2,0≤z≤3), whereas spherical coordinates would force ρ to switch between the flat top 3/cosφ and the cylinder wall 2/sinφ. And if the region is a flat-walled box, stay in rectangular coordinates.
Everything in spherical coordinates comes from two small pictures:
The vertical right triangle
with hypotenuse ρ and top angle φ gives the height z=ρcosφ and horizontal radius r=ρsinφ (so x=ρsinφcosθ,y=ρsinφsinθ, and x2+y2+z2=ρ2).
The spherical brick
has edge lengths dρ,ρdφ, and ρsinφdθ, so dV=ρ2sinφdρdφdθ goes into every integral.
To find the bounds, build the shape from the inside out:
Shoot a ray (ρ)
Find where a ray from the origin enters and exits. A sphere x2+y2+z2=9 gives a constant exit ρ=3, while a flat top z=3 gives ρcosφ=3⟹ρ=3/cosφ.
Tilt into a slice (φ)
Tilt down from the positive z-axis (φ=0). A cone z=x2+y2 has z=r, fixing the tilt angle at φ=π/4; the horizontal xy-plane z=0 is φ=π/2; the negative z-axis is φ=π.
Spin into the solid (θ)
Check the shadow in the xy-plane. A full circle spins from 0 to 2π, while bounds like 0≤x≤2 and 0≤y≤4−x2 cover only the first quadrant, 0≤θ≤π/2.
7
Practice
1
Evaluate ∭B(x2+y2+z2)dV over the solid ball B given by x2+y2+z2≤4.
Watch out: two common slips are using 4 instead of 4=2 as the upper bound for ρ, which gives 54096π, or forgetting to multiply the integrand ρ2 by the volume factor ρ2sinφ in dV, which leaves ρ2sinφ and gives 332π.Watch out: two common slips are using 4 instead of 4=2 as the upper bound for ρ, which gives 54096π, or forgetting to multiply the integrand ρ2 by the volume factor ρ2sinφ in dV, which leaves ρ2sinφ and gives 332π.
Rewrite x2+y2+z2 in terms of ρ first, and remember that dV brings its own ρ2sinφ.
In spherical coordinates, the integrand is x2+y2+z2=ρ2, and the ball x2+y2+z2≤4 has radius ρ=2.(Watch out: two common slips are using 4 instead of 4=2 as the upper bound for ρ, which gives 54096π, or forgetting to multiply the integrand ρ2 by the volume factor ρ2sinφ in dV, which leaves ρ2sinφ and gives 332π.)
Evaluate ∭EzdV, where E is the upper hemispherical shell between the spheres x2+y2+z2=1 and x2+y2+z2=4 with z≥0.
Watch out: starting ρ at 0 instead of the inner sphere ρ=1 gives ∫02ρ3dρ=4 and a wrong answer of 4π; tilting φ all the way to π instead of stopping at the xy-plane φ=π/2 cancels the top and bottom halves to 0.Watch out: starting ρ at 0 instead of the inner sphere ρ=1 gives ∫02ρ3dρ=4 and a wrong answer of 4π; tilting φ all the way to π instead of stopping at the xy-plane φ=π/2 cancels the top and bottom halves to 0.
When you shoot a ray from the origin, where does it enter the shell and where does it exit? And what angle φ corresponds to the horizontal floor z=0?
A ray from the origin enters the inner sphere at ρ=1 and exits the outer sphere at ρ=2. Because z≥0 is only the upper half of space, φ tilts from the positive z-axis (φ=0) down to the xy-plane (φ=π/2). (Watch out: starting ρ at 0 instead of the inner sphere ρ=1 gives ∫02ρ3dρ=4 and a wrong answer of 4π; tilting φ all the way to π instead of stopping at the xy-plane φ=π/2 cancels the top and bottom halves to 0.)
Find the volume of the solid that lies inside the sphere x2+y2+z2=9, below the cone z=x2+y2, and above the xy-plane z=0.
Watch out: integrating φ from 0 to π/4 out of habit finds the volume above the cone instead of below it, giving 9π(2−2).
Sketch a vertical slice first: the solid is below the cone φ=π/4 and above the xy-plane φ=π/2, so between which two angles does φ tilt?
The sphere x2+y2+z2=9 sets 0≤ρ≤3. Because the region lies below the cone z=x2+y2 (φ=π/4) and above the xy-plane z=0 (φ=π/2), the tilt angle φ runs from π/4 to π/2.(Watch out: integrating φ from 0 to π/4 out of habit finds the volume above the cone instead of below it, giving 9π(2−2).)
Evaluate ∭EzdV over the solid E bounded below by the cone z=x2+y2 and above by the flat plane z=2.
Watch out: treating the flat top z=2 as a constant spherical bound ρ=2 instead of ρ=2/cosφ misses the outer edge of the cone and gives 2π.
Rewrite the flat top z=2 in spherical coordinates to find where the ray ρ exits at each tilt angle φ.
On the flat plane z=2, we have ρcosφ=2, so the ray exits at ρ=2/cosφ, while the cone z=x2+y2 gives 0≤φ≤π/4.(Watch out: treating the flat top z=2 as a constant spherical bound ρ=2 instead of ρ=2/cosφ misses the outer edge of the cone and gives 2π.)
Evaluate ∫−11∫01−x2∫x2+y22−x2−y2x2+y2+z2dzdydx by converting to spherical coordinates.
Watch out: assuming a full turn 0≤θ≤2π doubles the answer to π(2−2), while using 0≤θ≤π/2 without checking that x starts at −1 halves the answer to 4π(2−2).Watch out: assuming a full turn 0≤θ≤2π doubles the answer to π(2−2), while using 0≤θ≤π/2 without checking that x starts at −1 halves the answer to 4π(2−2).
Sketch the xy-region from −1≤x≤1 and 0≤y≤1−x2 before choosing the bounds for θ.
The inner z-bounds run from the cone z=x2+y2 (φ=π/4) to the upper hemisphere z=2−x2−y2, where x2+y2+z2=2 (ρ=2). In the xy-plane, 0≤y≤1−x2 and −1≤x≤1 describe the upper half of the disk x2+y2≤1 where y≥0, so θ runs from 0 to π.(Watch out: assuming a full turn 0≤θ≤2π doubles the answer to π(2−2), while using 0≤θ≤π/2 without checking that x starts at −1 halves the answer to 4π(2−2).)