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
x\htmlClass{}{x}
y\htmlClass{}{y}
z\htmlClass{}{z}
∭δ dV\htmlClass{}{\iiint \htmlClass{lc-blue}{\delta}\, \htmlClass{lc-green}{dV}}

Instead of walking along an x,y,zx, y, z grid, spherical coordinates (ρ,θ,φ)(\rho, \theta, \varphi) locate a point by its straight-line distance ρ\rho from the origin, its horizontal spin θ\theta from the positive xx-axis (0≤θ≤2π0 \le \theta \le 2\pi), and its tilt angle φ\varphi down from the positive zz-axis (0≤φ≤π0 \le \varphi \le \pi). The tilt φ\varphi stops at π\pi (straight down the negative zz-axis) because spinning θ\theta all the way around already reaches the other side of the zz-axis.

Every conversion between rectangular and spherical coordinates comes straight from this single vertical right triangle, where the vertical height zz is adjacent to φ\varphi and the horizontal radius rr is opposite φ\varphi:

z\displaystyle z =ρcos⁡φ,r\displaystyle = \rho \cos \varphi, \qquad r =ρsin⁡φ\displaystyle = \rho \sin \varphi

Replacing rr in the polar formulas x=rcos⁡θx = r \cos \theta and y=rsin⁡θy = r \sin \theta gives the full set of conversions:

x\displaystyle x =ρsin⁡φcos⁡θ,y\displaystyle = \rho \sin \varphi \cos \theta, \qquad y =ρsin⁡φsin⁡θ,z\displaystyle = \rho \sin \varphi \sin \theta, \qquad z =ρcos⁡φ,x2+y2+z2\displaystyle = \rho \cos \varphi, \qquad x^2 + y^2 + z^2 =ρ2\displaystyle = \rho^2

As φ\varphi tilts from 00 to π\pi, those two legs z=ρcos⁡φz = \rho \cos \varphi and r=ρsin⁡φr = \rho \sin \varphi track the point's height and horizontal radius from the top of the zz-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\accum{dV} of one tiny spherical brick formed by small changes dρ\step{d\rho}, dφ\step{d\varphi}, and dθ\step{d\theta}.

Volume of a spherical brick
x\htmlClass{}{x}
y\htmlClass{}{y}
z\htmlClass{}{z}
ρ\htmlClass{}{\rho}
dρ\htmlClass{lc-pink}{d\rho}
dφ\htmlClass{lc-pink}{d\varphi}
dθ\htmlClass{lc-pink}{d\theta}

Because dφ\step{d\varphi} and dθ\step{d\theta} are angles in radians rather than lengths, we turn them into edge lengths using arc length=radius×angle\step{\text{arc length}} = \text{radius} \times \text{angle}. Tilting a ray of radius ρ\rho through dφ\step{d\varphi} traces an arc of length ρ dφ\step{\rho \, d\varphi}, and spinning around the zz-axis in a horizontal circle of radius r=ρsin⁡φr = \rho \sin \varphi through dθ\step{d\theta} traces an arc of length ρsin⁡φ dθ\step{\rho \sin \varphi \, d\theta}. Multiplying the three perpendicular edge lengths gives the volume of one brick:

dV\displaystyle \accum{dV} =dρ⏟radial thickness⋅ρ dφ⏟tilt arc⋅ρsin⁡φ dθ⏟spin arc\displaystyle = \step{\underbrace{d\rho}_{\text{radial thickness}}} \cdot \step{\underbrace{\rho \, d\varphi}_{\text{tilt arc}}} \cdot \step{\underbrace{\rho \sin \varphi \, d\theta}_{\text{spin arc}}} =ρ2sin⁡φ dρ dφ dθ\displaystyle = \accum{\rho^2 \sin \varphi \, d\rho \, d\varphi \, d\theta}

At a fixed distance ρ\rho, the edges dρ\step{d\rho} and ρ dφ\step{\rho \, d\varphi} stay the same size from pole to pole, but the horizontal circle of radius r=ρsin⁡φr = \rho \sin \varphi is widest at the equator (φ=π/2\varphi = \pi/2) and shrinks toward zero near the poles, making the spin edge ρsin⁡φ dθ\step{\rho \sin \varphi \, d\theta} 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 ∭1 dV\iiint \integrand{1} \, \accum{dV} of a solid ball of radius RR, and then find the total mass ∭x2+y2+z2 dV\iiint \integrand{\sqrt{x^2 + y^2 + z^2}} \, \accum{dV} of a ball of radius 22 whose density at each point equals its distance δ(x,y,z)=x2+y2+z2\integrand{\delta(x, y, z) = \sqrt{x^2 + y^2 + z^2}} from the center.

Sweeping out bounds and integrating over a sphere
x\htmlClass{}{x}
y\htmlClass{}{y}
z\htmlClass{}{z}
∫□□ ∫□□ ∫□□  ρ2sin⁡φ dρ dφ dθ\htmlClass{}{\int_{\htmlClass{lc-mute}{\square}}^{\htmlClass{lc-mute}{\square}}\,\int_{\htmlClass{lc-mute}{\square}}^{\htmlClass{lc-mute}{\square}}\,\int_{\htmlClass{lc-mute}{\square}}^{\htmlClass{lc-mute}{\square}}\; \htmlClass{lc-green}{\rho^2 \sin \varphi \, d\rho \, d\varphi \, d\theta}}

For a full ball of radius RR, a ray from the origin runs from ρ=0\rho = 0 to ρ=R\rho = R, tilts from the north pole φ=0\varphi = 0 to the south pole φ=π\varphi = \pi, and spins around the zz-axis from θ=0\theta = 0 to θ=2π\theta = 2\pi, giving the volume formula for a sphere:

Volume\displaystyle \accum{\text{Volume}} =∫02π∫0π∫0Rρ2sin⁡φ dρ dφ dθ\displaystyle = \int_0^{2\pi} \int_0^\pi \int_0^R \accum{\rho^2 \sin \varphi \, d\rho \, d\varphi \, d\theta} =(R33)(2)(2π)\displaystyle = \left(\frac{R^3}{3}\right)(2)(2\pi) =43πR3\displaystyle = \accum{\frac{4}{3}\pi R^3}

For the ball of radius 22 with variable density, we use those same spherical bounds with R=2R = 2 and rewrite the density in terms of ρ\rho.

Text solution
Convert the density and dV\accum{dV} to spherical coordinatesSince the distance from the origin is x2+y2+z2=ρ\integrand{\sqrt{x^2 + y^2 + z^2} = \rho} and a ball of radius 22 has constant bounds 0≤ρ≤20 \le \rho \le 2, 0≤φ≤π0 \le \varphi \le \pi, and 0≤θ≤2π0 \le \theta \le 2\pi, we multiply the density ρ\integrand{\rho} by the brick volume ρ2sin⁡φ dρ dφ dθ\accum{\rho^2 \sin \varphi \, d\rho \, d\varphi \, d\theta}.
Mass=∫02π∫0π∫02(ρ) ρ2sin⁡φ dρ dφ dθ=∫02π∫0π∫02ρ3sin⁡φ dρ dφ dθ\displaystyle \begin{aligned} \accum{\text{Mass}} &= \int_0^{2\pi} \int_0^\pi \int_0^2 \integrand{(\rho)} \, \accum{\rho^2 \sin \varphi \, d\rho \, d\varphi \, d\theta} \\ &= \int_0^{2\pi} \int_0^\pi \int_0^2 \rho^3 \sin \varphi \, d\rho \, d\varphi \, d\theta \end{aligned}
Integrate ρ3\rho^3 from 00 to 22Holding φ\varphi and θ\theta fixed, we evaluate the inner ρ\rho integral first.
∫02ρ3 dρ=[ρ44]02=164−0=4\displaystyle \begin{aligned} \int_0^2 \rho^3 \, d\rho &= \left[\frac{\rho^4}{4}\right]_0^2 \\ &= \frac{16}{4} - 0 \\ &= 4 \end{aligned}
Integrate 4sin⁡φ4 \sin \varphi from 00 to π\piSubstituting 44 into the middle integral sweeps the ray into a vertical half-disk.
∫0π4sin⁡φ dφ=4[−cos⁡φ]0π=4(1−(−1))=8\displaystyle \begin{aligned} \int_0^\pi 4 \sin \varphi \, d\varphi &= 4\left[-\cos \varphi\right]_0^\pi \\ &= 4\left(1 - (-1)\right) \\ &= 8 \end{aligned}
Integrate 88 from 00 to 2π2\piSpinning the slice all the way around the zz-axis multiplies 88 by 2π2\pi.
∫02π8 dθ=[8θ]02π=16π\displaystyle \begin{aligned} \int_0^{2\pi} 8 \, d\theta &= \left[8\theta\right]_0^{2\pi} \\ &= \accum{16\pi} \end{aligned}

So the total mass of the ball of radius 22 is 16π\accum{16\pi}.

4

Integrating over a cone capped by a sphere

When we only want part of a sphere, the tilt angle φ\varphi stops before π\pi. Suppose we want to evaluate ∭Ez dV\iiint_E \integrand{z} \, \accum{dV} over the solid bounded below by the cone z=x2+y2\surface{z = \sqrt{x^2 + y^2}} and capped on top by the sphere x2+y2+z2=9\surface{x^2 + y^2 + z^2 = 9}.

Integrating over a cone capped by a sphere
x\htmlClass{}{x}
y\htmlClass{}{y}
z\htmlClass{}{z}
z=x2+y2\htmlClass{lc-violet}{z = \sqrt{x^2 + y^2}}
x2+y2+z2=9\htmlClass{lc-violet}{x^2 + y^2 + z^2 = 9}
f(x,y,z)=z\htmlClass{}{f(x, y, z) = \htmlClass{lc-blue}{z}}
z\htmlClass{lc-blue}{z}
Text solution
Find the cone angle and set up the spherical integralBecause x2+y2=r\sqrt{x^2 + y^2} = r, the cone z=x2+y2\surface{z = \sqrt{x^2 + y^2}} is where the vertical leg zz equals the horizontal leg rr, fixing the cone wall at φ=π/4\surface{\varphi = \pi/4}, while z=ρcos⁡φ\integrand{z = \rho \cos \varphi} and the sphere x2+y2+z2=9\surface{x^2 + y^2 + z^2 = 9} fixes the outer cap at ρ=3\surface{\rho = 3}.
∭Ez dV=∫02π∫0π/4∫03(ρcos⁡φ) ρ2sin⁡φ dρ dφ dθ=∫02π∫0π/4∫03ρ3sin⁡φcos⁡φ dρ dφ dθ\displaystyle \begin{aligned} \iiint_E \integrand{z} \, \accum{dV} &= \int_0^{2\pi} \int_0^{\pi/4} \int_0^3 \integrand{(\rho \cos \varphi)} \, \accum{\rho^2 \sin \varphi \, d\rho \, d\varphi \, d\theta} \\ &= \int_0^{2\pi} \int_0^{\pi/4} \int_0^3 \rho^3 \sin \varphi \cos \varphi \, d\rho \, d\varphi \, d\theta \end{aligned}
Integrate ρ3\rho^3 from 00 to 33Treating sin⁡φcos⁡φ\sin \varphi \cos \varphi as a constant during the ρ\rho step gives 814\frac{81}{4}.
∫03ρ3 dρ=[ρ44]03=814\displaystyle \begin{aligned} \int_0^3 \rho^3 \, d\rho &= \left[\frac{\rho^4}{4}\right]_0^3 \\ &= \frac{81}{4} \end{aligned}
Substitute u=sin⁡φu = \sin \varphi to integrate over φ\varphiBecause cos⁡φ\cos \varphi is the derivative of sin⁡φ\sin \varphi, setting u=sin⁡φu = \sin \varphi and du=cos⁡φ dφdu = \cos \varphi \, d\varphi turns ∫sin⁡φcos⁡φ dφ\int \sin \varphi \cos \varphi \, d\varphi into ∫u du=12sin⁡2φ\int u \, du = \frac{1}{2}\sin^2 \varphi.
814∫0π/4sin⁡φcos⁡φ dφ=814[sin⁡2φ2]0π/4=814⋅12(22)2=814⋅14=8116\displaystyle \begin{aligned} \frac{81}{4} \int_0^{\pi/4} \sin \varphi \cos \varphi \, d\varphi &= \frac{81}{4} \left[\frac{\sin^2 \varphi}{2}\right]_0^{\pi/4} \\ &= \frac{81}{4} \cdot \frac{1}{2}\left(\frac{\sqrt{2}}{2}\right)^2 \\ &= \frac{81}{4} \cdot \frac{1}{4} \\ &= \frac{81}{16} \end{aligned}
Integrate from 00 to 2π2\pi over θ\thetaSince no θ\theta appears inside, spinning through a full turn multiplies by 2π2\pi.
∫02π8116 dθ=8116⋅2π=81π8\displaystyle \begin{aligned} \int_0^{2\pi} \frac{81}{16} \, d\theta &= \frac{81}{16} \cdot 2\pi \\ &= \accum{\frac{81\pi}{8}} \end{aligned}

So the integral of z\integrand{z} over the sphere-capped cone is 81π8\accum{\frac{81\pi}{8}}.

5

Flat boundaries where ρ\rho depends on φ\varphi

What if the outer surface isn't a sphere? Suppose we want to set up the volume integral ∭E1 dV\iiint_E \integrand{1} \, \accum{dV} for the same cone φ=π/4\surface{\varphi = \pi/4}, but now capped by a flat horizontal top at height z=3z = 3.

Flat boundaries where ρ depends on φ
x\htmlClass{}{x}
y\htmlClass{}{y}
z\htmlClass{}{z}
φ=π4\htmlClass{lc-violet}{\varphi = \tfrac{\pi}{4}}
z=3\htmlClass{}{z = 3}
Text solution
Solve the flat plane equation for ρ\rhoSubstituting z=ρcos⁡φz = \rho \cos \varphi into the plane z=3z = 3 gives the distance ρ\rho from the origin to the flat top at any tilt angle φ\varphi.
ρcos⁡φ=3ρ=3cos⁡φ\displaystyle \begin{aligned} \rho \cos \varphi &= 3 \\ \rho &= \frac{3}{\cos \varphi} \end{aligned}
Write the triple integral with ρ\rho running from 00 to 3/cos⁡φ3/\cos \varphiThe ray starts at the origin ρ=0\rho = 0 and exits the flat top at ρ=3/cos⁡φ\rho = 3/\cos \varphi, while the cone angle 0≤φ≤π/40 \le \varphi \le \pi/4 and full spin 0≤θ≤2π0 \le \theta \le 2\pi stay the same.
Volume\displaystyle \accum{\text{Volume}} =∫02π∫0π/4∫03/cos⁡φρ2sin⁡φ dρ dφ dθ\displaystyle = \int_0^{2\pi} \int_0^{\pi/4} \int_0^{3/\cos \varphi} \accum{\rho^2 \sin \varphi \, d\rho \, d\varphi \, d\theta}

So replacing a spherical cap with a flat top changes the upper ρ\rho bound from 33 to 3/cos⁡φ3/\cos \varphi.

Because the vertical height z=ρcos⁡φz = \rho \cos \varphi stays fixed at 33 along the flat top, tilting φ\varphi away from the zz-axis makes the hypotenuse ρ=3/cos⁡φ\rho = 3/\cos \varphi reach past the sphere ρ=3\surface{\rho = 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 xx, yy, and zz with square roots in both the bounds and the integrand. Suppose we want to evaluate

∫02∫04−x2∫x2+y28−x2−y2x2+y2+z2 dz dy dx\displaystyle \int_0^2 \int_0^{\sqrt{4-x^2}} \int_{\sqrt{x^2+y^2}}^{\sqrt{8-x^2-y^2}} \integrand{\sqrt{x^2 + y^2 + z^2}} \, \accum{dz \, dy \, dx}
Converting a rectangular integral to spherical coordinates
∫02∫04−x2∫x2+y28−x2−y2x2+y2+z2 dz dy dx=  ?\displaystyle \begin{aligned} &\int_0^2 \int_0^{\sqrt{4 - x^2}} \int_{\sqrt{x^2 + y^2}}^{\sqrt{8 - x^2 - y^2}} \\ &\quad \integrand{\sqrt{x^2 + y^2 + z^2}} \, \accum{dz \, dy \, dx} \\ &= \;? \end{aligned}
xx
yy
22
22
0≤x≤20 \le x \le 2
0≤θ≤π20 \le \theta \le \tfrac{\pi}{2}
0≤y≤4−x20 \le y \le \sqrt{4 - x^2}
Text solution
Use the zz-bounds to find ρ\rho and φ\varphiThe lower bound z=x2+y2\surface{z = \sqrt{x^2 + y^2}} is the cone φ=π/4\surface{\varphi = \pi/4}, and squaring the upper bound z=8−x2−y2\surface{z = \sqrt{8 - x^2 - y^2}} gives the upper hemisphere x2+y2+z2=8\surface{x^2 + y^2 + z^2 = 8}, so ρ\rho runs from 00 to 8\sqrt{8} and φ\varphi tilts from 00 to π/4\pi/4.
0\displaystyle 0 ≤ρ\displaystyle \le \rho ≤8,0\displaystyle \le \sqrt{8}, \qquad 0 ≤φ\displaystyle \le \varphi ≤π4\displaystyle \le \frac{\pi}{4}
Use the xx- and yy-bounds in the xyxy-plane to find θ\thetaBecause 0≤y≤4−x20 \le y \le \sqrt{4 - x^2} and 0≤x≤20 \le x \le 2 keep both xx and yy positive inside the circle x2+y2=4x^2 + y^2 = 4, the base covers only the first quadrant, so θ\theta spins from 00 to π/2\pi/2.
∫02∫04−x2∫x2+y28−x2−y2x2+y2+z2 dz dy dx=∫0π/2∫0π/4∫08(ρ) ρ2sin⁡φ dρ dφ dθ=∫0π/2∫0π/4∫08ρ3sin⁡φ dρ dφ dθ\displaystyle \begin{aligned} \int_0^2 \int_0^{\sqrt{4-x^2}} \int_{\sqrt{x^2+y^2}}^{\sqrt{8-x^2-y^2}} \integrand{\sqrt{x^2 + y^2 + z^2}} \, \accum{dz \, dy \, dx} &= \int_0^{\pi/2} \int_0^{\pi/4} \int_0^{\sqrt{8}} \integrand{(\rho)} \, \accum{\rho^2 \sin \varphi \, d\rho \, d\varphi \, d\theta} \\ &= \int_0^{\pi/2} \int_0^{\pi/4} \int_0^{\sqrt{8}} \rho^3 \sin \varphi \, d\rho \, d\varphi \, d\theta \end{aligned}
Integrate ρ3\rho^3 from 00 to 8\sqrt{8}Since (8)4=(81/2)4=82=64(\sqrt{8})^4 = (8^{1/2})^4 = 8^2 = 64, the inner integral simplifies cleanly without roots.
∫08ρ3 dρ=[ρ44]08=644=16\displaystyle \begin{aligned} \int_0^{\sqrt{8}} \rho^3 \, d\rho &= \left[\frac{\rho^4}{4}\right]_0^{\sqrt{8}} \\ &= \frac{64}{4} \\ &= 16 \end{aligned}
Evaluate the φ\varphi and θ\theta integralsMultiply 1616 by the φ\varphi integral from 00 to π/4\pi/4 and the θ\theta integral from 00 to π/2\pi/2.
16∫0π/2∫0π/4sin⁡φ dφ dθ=16[−cos⁡φ]0π/4[θ]0π/2=16(1−22)(π2)=4π(2−2)\displaystyle \begin{aligned} 16 \int_0^{\pi/2} \int_0^{\pi/4} \sin \varphi \, d\varphi \, d\theta &= 16 \left[-\cos \varphi\right]_0^{\pi/4} \left[\theta\right]_0^{\pi/2} \\ &= 16 \left(1 - \frac{\sqrt{2}}{2}\right)\left(\frac{\pi}{2}\right) \\ &= \accum{4\pi(2 - \sqrt{2})} \end{aligned}

So the value of the rectangular triple integral is 4π(2−2)\accum{4\pi(2 - \sqrt{2})}.

Key concepts

Use spherical coordinates when the solid is shaped around a central point, such as spheres like x2+y2+z2=9\surface{x^2 + y^2 + z^2 = 9} or cones like z=x2+y2\surface{z = \sqrt{x^2 + y^2}}, or when the integrand contains x2+y2+z2\integrand{x^2 + y^2 + z^2}. Do not switch to spherical coordinates just because a shape is round: if the side wall is a vertical cylinder like x2+y2=4x^2 + y^2 = 4 between flat planes z=0z = 0 and z=3z = 3, cylindrical coordinates keep the bounds constant (0≤r≤20 \le r \le 2, 0≤z≤30 \le z \le 3), whereas spherical coordinates would force ρ\rho to switch between the flat top 3/cos⁡φ3/\cos \varphi and the cylinder wall 2/sin⁡φ2/\sin \varphi. 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 ρ\rho and top angle φ\varphi gives the height z=ρcos⁡φz = \rho \cos \varphi and horizontal radius r=ρsin⁡φr = \rho \sin \varphi (so x=ρsin⁡φcos⁡θx = \rho \sin \varphi \cos \theta, y=ρsin⁡φsin⁡θy = \rho \sin \varphi \sin \theta, and x2+y2+z2=ρ2x^2 + y^2 + z^2 = \rho^2).

The spherical brick

has edge lengths dρ\step{d\rho}, ρ dφ\step{\rho \, d\varphi}, and ρsin⁡φ dθ\step{\rho \sin \varphi \, d\theta}, so dV=ρ2sin⁡φ dρ dφ dθ\accum{dV} = \accum{\rho^2 \sin \varphi \, d\rho \, d\varphi \, d\theta} goes into every integral.

To find the bounds, build the shape from the inside out:

Shoot a ray (ρ\rho)

Find where a ray from the origin enters and exits. A sphere x2+y2+z2=9\surface{x^2 + y^2 + z^2 = 9} gives a constant exit ρ=3\surface{\rho = 3}, while a flat top z=3z = 3 gives ρcos⁡φ=3  ⟹  ρ=3/cos⁡φ\rho \cos \varphi = 3 \implies \rho = 3/\cos \varphi.

Tilt into a slice (φ\varphi)

Tilt down from the positive zz-axis (φ=0\varphi = 0). A cone z=x2+y2\surface{z = \sqrt{x^2 + y^2}} has z=rz = r, fixing the tilt angle at φ=π/4\surface{\varphi = \pi/4}; the horizontal xyxy-plane z=0\surface{z = 0} is φ=π/2\surface{\varphi = \pi/2}; the negative zz-axis is φ=π\varphi = \pi.

Spin into the solid (θ\theta)

Check the shadow in the xyxy-plane. A full circle spins from 00 to 2π2\pi, while bounds like 0≤x≤20 \le x \le 2 and 0≤y≤4−x20 \le y \le \sqrt{4 - x^2} cover only the first quadrant, 0≤θ≤π/20 \le \theta \le \pi/2.

7

Practice

1

Evaluate ∭B(x2+y2+z2) dV\iiint_B \integrand{(x^2 + y^2 + z^2)} \, \accum{dV} over the solid ball BB given by x2+y2+z2≤4x^2 + y^2 + z^2 \le 4.

Rewrite x2+y2+z2\integrand{x^2 + y^2 + z^2} in terms of ρ\rho first, and remember that dV\accum{dV} brings its own ρ2sin⁡φ\accum{\rho^2 \sin \varphi}.

In spherical coordinates, the integrand is x2+y2+z2=ρ2\integrand{x^2 + y^2 + z^2 = \rho^2}, and the ball x2+y2+z2≤4x^2 + y^2 + z^2 \le 4 has radius ρ=2\rho = 2. (Watch out: two common slips are using 4\slip{4} instead of 4=2\sqrt{4} = 2 as the upper bound for ρ\rho, which gives 4096π5\slip{\frac{4096\pi}{5}}, or forgetting to multiply the integrand ρ2\integrand{\rho^2} by the volume factor ρ2sin⁡φ\accum{\rho^2 \sin \varphi} in dV\accum{dV}, which leaves ρ2sin⁡φ\slip{\rho^2 \sin \varphi} and gives 32π3\slip{\frac{32\pi}{3}}.)
∭B(x2+y2+z2) dV=∫02π∫0π∫02(ρ2) ρ2sin⁡φ dρ dφ dθ=∫02π∫0π∫02ρ4sin⁡φ dρ dφ dθ=[ρ55]02[−cos⁡φ]0π[θ]02π=(325)(2)(2π)=128π5\displaystyle \begin{aligned} \iiint_B \integrand{(x^2 + y^2 + z^2)} \, \accum{dV} &= \int_0^{2\pi} \int_0^\pi \int_0^2 \integrand{(\rho^2)} \, \accum{\rho^2 \sin \varphi \, d\rho \, d\varphi \, d\theta} \\ &= \int_0^{2\pi} \int_0^\pi \int_0^2 \rho^4 \sin \varphi \, d\rho \, d\varphi \, d\theta \\ &= \left[\frac{\rho^5}{5}\right]_0^2 \left[-\cos \varphi\right]_0^\pi \left[\theta\right]_0^{2\pi} \\ &= \left(\frac{32}{5}\right)(2)(2\pi) \\ &= \accum{\frac{128\pi}{5}} \end{aligned}
2

Evaluate ∭Ez dV\iiint_E \integrand{z} \, \accum{dV}, where EE is the upper hemispherical shell between the spheres x2+y2+z2=1\surface{x^2 + y^2 + z^2 = 1} and x2+y2+z2=4\surface{x^2 + y^2 + z^2 = 4} with z≥0z \ge 0.

When you shoot a ray from the origin, where does it enter the shell and where does it exit? And what angle φ\varphi corresponds to the horizontal floor z=0\surface{z = 0}?

A ray from the origin enters the inner sphere at ρ=1\surface{\rho = 1} and exits the outer sphere at ρ=2\surface{\rho = 2}. Because z≥0z \ge 0 is only the upper half of space, φ\varphi tilts from the positive zz-axis (φ=0\varphi = 0) down to the xyxy-plane (φ=π/2\surface{\varphi = \pi/2}). (Watch out: starting ρ\rho at 0\slip{0} instead of the inner sphere ρ=1\surface{\rho = 1} gives ∫02ρ3 dρ=4\slip{\int_0^2 \rho^3 \, d\rho = 4} and a wrong answer of 4π\slip{4\pi}; tilting φ\varphi all the way to π\slip{\pi} instead of stopping at the xyxy-plane φ=π/2\surface{\varphi = \pi/2} cancels the top and bottom halves to 0\slip{0}.)
∭Ez dV=∫02π∫0π/2∫12(ρcos⁡φ) ρ2sin⁡φ dρ dφ dθ=∫02π∫0π/2∫12ρ3sin⁡φcos⁡φ dρ dφ dθ=[ρ44]12[sin⁡2φ2]0π/2[θ]02π=(16−14)(12)(2π)=15π4\displaystyle \begin{aligned} \iiint_E \integrand{z} \, \accum{dV} &= \int_0^{2\pi} \int_0^{\pi/2} \int_1^2 \integrand{(\rho \cos \varphi)} \, \accum{\rho^2 \sin \varphi \, d\rho \, d\varphi \, d\theta} \\ &= \int_0^{2\pi} \int_0^{\pi/2} \int_1^2 \rho^3 \sin \varphi \cos \varphi \, d\rho \, d\varphi \, d\theta \\ &= \left[\frac{\rho^4}{4}\right]_1^2 \left[\frac{\sin^2 \varphi}{2}\right]_0^{\pi/2} \left[\theta\right]_0^{2\pi} \\ &= \left(\frac{16 - 1}{4}\right)\left(\frac{1}{2}\right)(2\pi) \\ &= \accum{\frac{15\pi}{4}} \end{aligned}
3

Find the volume of the solid that lies inside the sphere x2+y2+z2=9\surface{x^2 + y^2 + z^2 = 9}, below the cone z=x2+y2\surface{z = \sqrt{x^2 + y^2}}, and above the xyxy-plane z=0\surface{z = 0}.

Sketch a vertical slice first: the solid is below the cone φ=π/4\surface{\varphi = \pi/4} and above the xyxy-plane φ=π/2\surface{\varphi = \pi/2}, so between which two angles does φ\varphi tilt?

The sphere x2+y2+z2=9\surface{x^2 + y^2 + z^2 = 9} sets 0≤ρ≤30 \le \rho \le 3. Because the region lies below the cone z=x2+y2\surface{z = \sqrt{x^2 + y^2}} (φ=π/4\surface{\varphi = \pi/4}) and above the xyxy-plane z=0\surface{z = 0} (φ=π/2\surface{\varphi = \pi/2}), the tilt angle φ\varphi runs from π/4\pi/4 to π/2\pi/2. (Watch out: integrating φ\varphi from 0\slip{0} to π/4\slip{\pi/4} out of habit finds the volume above the cone instead of below it, giving 9π(2−2)\slip{9\pi(2 - \sqrt{2})}.)
Volume=∫02π∫π/4π/2∫03ρ2sin⁡φ dρ dφ dθ=[ρ33]03[−cos⁡φ]π/4π/2[θ]02π=(9)(0−(−22))(2π)=92π\displaystyle \begin{aligned} \accum{\text{Volume}} &= \int_0^{2\pi} \int_{\pi/4}^{\pi/2} \int_0^3 \accum{\rho^2 \sin \varphi \, d\rho \, d\varphi \, d\theta} \\ &= \left[\frac{\rho^3}{3}\right]_0^3 \left[-\cos \varphi\right]_{\pi/4}^{\pi/2} \left[\theta\right]_0^{2\pi} \\ &= (9)\left(0 - \left(-\frac{\sqrt{2}}{2}\right)\right)(2\pi) \\ &= \accum{9\sqrt{2}\pi} \end{aligned}
4

Evaluate ∭Ez dV\iiint_E \integrand{z} \, \accum{dV} over the solid EE bounded below by the cone z=x2+y2\surface{z = \sqrt{x^2 + y^2}} and above by the flat plane z=2z = 2.

Rewrite the flat top z=2z = 2 in spherical coordinates to find where the ray ρ\rho exits at each tilt angle φ\varphi.

On the flat plane z=2z = 2, we have ρcos⁡φ=2\rho \cos \varphi = 2, so the ray exits at ρ=2/cos⁡φ\rho = 2/\cos \varphi, while the cone z=x2+y2\surface{z = \sqrt{x^2 + y^2}} gives 0≤φ≤π/40 \le \varphi \le \pi/4. (Watch out: treating the flat top z=2z = 2 as a constant spherical bound ρ=2\slip{\rho = 2} instead of ρ=2/cos⁡φ\rho = 2/\cos \varphi misses the outer edge of the cone and gives 2π\slip{2\pi}.)
∭Ez dV=∫02π∫0π/4∫02/cos⁡φ(ρcos⁡φ) ρ2sin⁡φ dρ dφ dθ=∫02π∫0π/4[ρ44]02/cos⁡φsin⁡φcos⁡φ dφ dθ=∫02π∫0π/44cos⁡4φsin⁡φcos⁡φ dφ dθ=∫02π∫0π/44sin⁡φcos⁡3φ dφ dθ\displaystyle \begin{aligned} \iiint_E \integrand{z} \, \accum{dV} &= \int_0^{2\pi} \int_0^{\pi/4} \int_0^{2/\cos \varphi} \integrand{(\rho \cos \varphi)} \, \accum{\rho^2 \sin \varphi \, d\rho \, d\varphi \, d\theta} \\ &= \int_0^{2\pi} \int_0^{\pi/4} \left[\frac{\rho^4}{4}\right]_0^{2/\cos \varphi} \sin \varphi \cos \varphi \, d\varphi \, d\theta \\ &= \int_0^{2\pi} \int_0^{\pi/4} \frac{4}{\cos^4 \varphi} \sin \varphi \cos \varphi \, d\varphi \, d\theta \\ &= \int_0^{2\pi} \int_0^{\pi/4} \frac{4 \sin \varphi}{\cos^3 \varphi} \, d\varphi \, d\theta \end{aligned}
Using u=cos⁡φu = \cos \varphi and du=−sin⁡φ dφdu = -\sin \varphi \, d\varphi gives ∫4u−3 (−du)=2u−2=2cos⁡2φ\int 4u^{-3} \, (-du) = 2u^{-2} = \frac{2}{\cos^2 \varphi}:
∫02π[2cos⁡2φ]0π/4dθ=∫02π(2(1/2)2−212)dθ=∫02π(4−2) dθ=4π\displaystyle \begin{aligned} \int_0^{2\pi} \left[\frac{2}{\cos^2 \varphi}\right]_0^{\pi/4} d\theta &= \int_0^{2\pi} \left(\frac{2}{(1/\sqrt{2})^2} - \frac{2}{1^2}\right) d\theta \\ &= \int_0^{2\pi} (4 - 2) \, d\theta \\ &= \accum{4\pi} \end{aligned}
5

Evaluate ∫−11∫01−x2∫x2+y22−x2−y2x2+y2+z2 dz dy dx\int_{-1}^1 \int_0^{\sqrt{1-x^2}} \int_{\sqrt{x^2+y^2}}^{\sqrt{2-x^2-y^2}} \integrand{\sqrt{x^2 + y^2 + z^2}} \, \accum{dz \, dy \, dx} by converting to spherical coordinates.

Sketch the xyxy-region from −1≤x≤1-1 \le x \le 1 and 0≤y≤1−x20 \le y \le \sqrt{1 - x^2} before choosing the bounds for θ\theta.

The inner zz-bounds run from the cone z=x2+y2\surface{z = \sqrt{x^2 + y^2}} (φ=π/4\surface{\varphi = \pi/4}) to the upper hemisphere z=2−x2−y2\surface{z = \sqrt{2 - x^2 - y^2}}, where x2+y2+z2=2\surface{x^2 + y^2 + z^2 = 2} (ρ=2\surface{\rho = \sqrt{2}}). In the xyxy-plane, 0≤y≤1−x20 \le y \le \sqrt{1 - x^2} and −1≤x≤1-1 \le x \le 1 describe the upper half of the disk x2+y2≤1x^2 + y^2 \le 1 where y≥0y \ge 0, so θ\theta runs from 00 to π\pi. (Watch out: assuming a full turn 0≤θ≤2π\slip{0 \le \theta \le 2\pi} doubles the answer to π(2−2)\slip{\pi(2 - \sqrt{2})}, while using 0≤θ≤π/2\slip{0 \le \theta \le \pi/2} without checking that xx starts at −1-1 halves the answer to π(2−2)4\slip{\frac{\pi(2 - \sqrt{2})}{4}}.)
∫0π∫0π/4∫02(ρ) ρ2sin⁡φ dρ dφ dθ=∫0π∫0π/4∫02ρ3sin⁡φ dρ dφ dθ=[ρ44]02[−cos⁡φ]0π/4[θ]0π=(1)(1−22)(π)=π(2−2)2\displaystyle \begin{aligned} \int_0^\pi \int_0^{\pi/4} \int_0^{\sqrt{2}} \integrand{(\rho)} \, \accum{\rho^2 \sin \varphi \, d\rho \, d\varphi \, d\theta} &= \int_0^\pi \int_0^{\pi/4} \int_0^{\sqrt{2}} \rho^3 \sin \varphi \, d\rho \, d\varphi \, d\theta \\ &= \left[\frac{\rho^4}{4}\right]_0^{\sqrt{2}} \left[-\cos \varphi\right]_0^{\pi/4} \left[\theta\right]_0^\pi \\ &= (1)\left(1 - \frac{\sqrt{2}}{2}\right)(\pi) \\ &= \accum{\frac{\pi(2 - \sqrt{2})}{2}} \end{aligned}