Tutorials › Calculus III › Solids Between Spheres

Spherical Triple Integrals · Tutorial 667 of 999

Solids Between Spheres

Use spherical coordinates to turn pairs of spherical boundaries into radial intervals, including cases where the bounds change with direction.

Intermediate 9 min read

What You'll Learn

  • Write the equation of a sphere whose centre is displaced from the spherical-coordinate origin.
  • Derive the radial intersections of a ray with an offset sphere and identify when they exist.
  • Describe a concentric spherical shell with constant radial bounds.
  • Split an integral where the smaller of two spherical radial limits changes.
  • Check spherical bounds using the geometry of the region.

Why Two Spherical Boundaries Need Careful Bounds

A region bounded by two spheres may look simple in a sketch, but its spherical-coordinate description depends on where the spheres are centred. If their centres coincide, the radial limits are constant. If one sphere is offset from the coordinate origin, its intersections with rays from the origin vary with direction. Those intersections may also appear or disappear as the direction changes.

The central task is therefore to determine, for each direction, which radial values belong to the region. Once those intervals are known, the spherical volume element turns the description into an iterated triple integral.

Convention: Use spherical coordinates \(x=\rho\sin\phi\cos\theta\), \(y=\rho\sin\phi\sin\theta\), and \(z=\rho\cos\phi\), where \(\rho\geq 0\), \(0\leq\phi\leq\pi\), and \(0\leq\theta<2\pi\). The volume element is \(dV=\rho^2\sin\phi\,d\rho\,d\phi\,d\theta\).

Sphere Equations and Radial Intersections

A sphere of radius \(a\) centred at the origin has equation \(\rho=a\). For a sphere of radius \(a\) whose centre is \((d,0,0)\), its Cartesian equation is \((x-d)^2+y^2+z^2=a^2\). Substituting the spherical-coordinate expressions gives an equation in \(\rho\) for each fixed direction.

$$ \rho^2-2d\rho\sin\phi\cos\theta+d^2-a^2=0. $$

The solutions of this quadratic are the radial distances at which a ray from the origin meets the sphere. Write \(u=\sin\phi\cos\theta\), the \(x\)-component of the unit direction vector. The solutions are

$$ \rho_{\pm}=du\pm\sqrt{a^2-d^2(1-u^2)}. $$

Real intersections require the expression under the square root to be nonnegative. A solution also represents a point on the forward ray only if it is nonnegative. If the origin is outside the sphere and a ray passes through it, the two nonnegative roots bound the part of the ray inside the sphere. If the origin is inside the sphere, the forward ray starts inside and exits at the positive root. These distinctions matter when using the roots as integral limits.

Key takeaway: For a fixed direction, a sphere cuts a ray at radial distances given by a quadratic. First check that the roots are real and nonnegative; then determine which intervals between the roots lie inside the sphere.

Concentric Spheres: A Constant Radial Shell

If two spheres share the coordinate origin and have radii \(r_1\) and \(r_2\), with \(0\leq r_1<r_2\), the solid between them is the spherical shell \(r_1\leq\rho\leq r_2\). Every ray has the same radial limits. The angular variables cover the whole sphere.

Worked Example: Volume of a Concentric Spherical Shell

Find the volume between spheres of radii \(1\) and \(2\), both centred at the origin.

The bounds are \(1\leq\rho\leq2\), \(0\leq\phi\leq\pi\), and \(0\leq\theta<2\pi\). Integrate the volume element:

$$ \begin{aligned} V &=\int_0^{2\pi}\int_0^\pi\int_1^2 \rho^2\sin\phi\,d\rho\,d\phi\,d\theta\\ &=\int_0^{2\pi}\int_0^\pi \left[\frac{\rho^3}{3}\right]_1^2 \sin\phi\,d\phi\,d\theta\\ &=\int_0^{2\pi}\int_0^\pi \frac{8-1}{3}\sin\phi\,d\phi\,d\theta\\ &=\frac{7}{3}(2\pi)(2) =\frac{28\pi}{3}. \end{aligned} $$

As a check, the shell’s volume is the volume of the radius-\(2\) ball minus the volume of the radius-\(1\) ball: \(\frac{4\pi}{3}(2^3-1^3)=\frac{28\pi}{3}\), matching the integral.

Offset Spheres: Find Where the Radial Bound Changes

For an intersection of two balls, a ray must remain inside both spheres. Its upper radial bound is the smaller of the two spheres’ forward limits. The smaller limit can change at a direction where the ray meets both spherical surfaces at the same point. Finding that direction tells us where to split the integral.

Here is a useful derivation for two unit spheres whose centres are one unit apart. Place the first sphere at the origin and the second at \((1,0,0)\). A ray at angle \(\phi\) from the positive \(x\)-axis has \(\theta\) as its azimuth around that axis; equivalently, use \(x=\rho\cos\phi\) and let \(\theta\) run around the \(x\)-axis. The second sphere’s equation becomes \(\rho^2-2\rho\cos\phi=0\), so its radial boundary is \(\rho=2\cos\phi\). The ray is inside this sphere for \(0\leq\rho\leq2\cos\phi\), provided \(\cos\phi\geq0\). The first sphere has radial bound \(\rho\leq1\). The bounds are equal when \(2\cos\phi=1\), or \(\phi=\pi/3\). Thus the smaller limit is \(1\) for \(0\leq\phi\leq\pi/3\), and \(2\cos\phi\) for \(\pi/3\leq\phi\leq\pi/2\).

Worked Example: Volume Common to Two Offset Unit Spheres

Find the volume common to the unit sphere centred at the origin and the unit sphere centred at \((1,0,0)\). Use spherical coordinates with the polar axis along the \(x\)-axis, so \(x=\rho\cos\phi\) and \(dV=\rho^2\sin\phi\,d\rho\,d\phi\,d\theta\).

For the second sphere, \((x-1)^2+y^2+z^2=1\) gives \(\rho^2-2\rho\cos\phi=0\), hence \(\rho=2\cos\phi\). The intersection lies only in directions with \(\cos\phi\geq0\), so \(0\leq\phi\leq\pi/2\). The first sphere imposes \(\rho\leq1\). Since the upper limit changes at \(\phi=\pi/3\), split the integral there:

$$ \begin{aligned} V &=\int_0^{2\pi}\left( \int_0^{\pi/3}\int_0^1 \rho^2\sin\phi\,d\rho\,d\phi + \int_{\pi/3}^{\pi/2}\int_0^{2\cos\phi} \rho^2\sin\phi\,d\rho\,d\phi\right)d\theta\\ &=2\pi\left( \frac{1}{3}\int_0^{\pi/3}\sin\phi\,d\phi +\frac{8}{3}\int_{\pi/3}^{\pi/2}\cos^3\phi\sin\phi\,d\phi \right). \end{aligned} $$

For the first angular integral, \(\int_0^{\pi/3}\sin\phi\,d\phi=1-\cos(\pi/3)=1/2\). For the second, substitute \(w=\cos\phi\), so \(dw=-\sin\phi\,d\phi\):

$$ \int_{\pi/3}^{\pi/2}\cos^3\phi\sin\phi\,d\phi =\int_0^{1/2}w^3\,dw =\left[\frac{w^4}{4}\right]_0^{1/2} =\frac{1}{64}. $$

Therefore,

$$ V=2\pi\left(\frac{1}{6}+\frac{8}{3}\cdot\frac{1}{64}\right) =2\pi\left(\frac{1}{6}+\frac{1}{24}\right) =\frac{5\pi}{12}. $$

As a check, the intersection consists of two spherical caps, each of height \(1/2\). A unit-sphere cap of height \(h\) has volume \(\pi h^2(1-h/3)\); for \(h=1/2\), each cap has volume \(5\pi/24\). Their sum is \(5\pi/12\), as found by integration.

Between Two Offset Boundaries on a Ray

When a region lies inside one sphere but outside another, it is not always described by a single radial interval. Along a direction that crosses an excluded sphere, the allowed portion may lie before its first intersection and again after its second intersection. In that case, use two radial intervals on those rays. On directions that miss the excluded sphere, the whole radial segment up to the outer boundary remains allowed.

For an offset sphere centred at \((d,0,0)\), the discriminant condition can be written \(d^2(1-u^2)\leq a^2\). This condition identifies directions with real intersections, but it does not by itself guarantee positive roots. Checking the signs is essential, especially if the coordinate origin is outside the sphere.

Worked Example: Bounds for a Shell with an Offset Inner Sphere

Describe the solid inside the sphere \(\rho\leq2\) and outside the sphere of radius \(1/2\) centred at \((1,0,0)\). The offset sphere is wholly inside the outer sphere because the distance between centres plus its radius is \(1+1/2<2\).

Let \(\phi\) be measured from the positive \(x\)-axis. The inner sphere has equation \(\rho^2-2\rho\cos\phi+3/4=0\). Its roots are

$$ \rho_{\pm}=\cos\phi\pm\sqrt{\frac14-\sin^2\phi}. $$

Real roots require \(\sin\phi\leq1/2\), so the rays that meet the inner sphere lie in the forward cone \(0\leq\phi\leq\pi/6\). Both roots are nonnegative there: their product is \(3/4>0\) and their sum \(2\cos\phi>0\). The allowed radial intervals on those rays are \(0\leq\rho\leq\rho_-\) and \(\rho_+\leq\rho\leq2\). Other directions miss the inner sphere and have \(0\leq\rho\leq2\).

For example, the volume can be set up as follows. The azimuthal angle \(\theta\) runs from \(0\) to \(2\pi\), and the radial intervals are split at the two roots:

$$ \begin{aligned} V=\int_0^{2\pi}\Bigg[ &\int_0^{\pi/6}\left( \int_0^{\rho_-}\rho^2\sin\phi\,d\rho +\int_{\rho_+}^{2}\rho^2\sin\phi\,d\rho\right)d\phi\\ &+\int_{\pi/6}^{\pi}\int_0^2 \rho^2\sin\phi\,d\rho\,d\phi \Bigg]d\theta. \end{aligned} $$

As a check on the described solid’s volume, subtract the offset ball’s volume from the outer ball’s volume: \(\frac{4\pi}{3}(2^3)-\frac{4\pi}{3}(1/2)^3=\frac{32\pi}{3}-\frac{\pi}{6}=\frac{21\pi}{2}\). The offset does not change the inner ball’s volume. The displayed integral describes the same solid; its split intervals remove exactly the radial portion inside the inner sphere.

Why the Split Is Necessary

An iterated integral requires bounds that describe the region without leaving gaps or counting points twice. When two spheres compete to provide the radial limit, selecting one bound for every direction can include points outside one sphere or omit points inside both. The correct split follows from comparing the limits and locating where they agree.

1
Choose the origin and polar axis.
Place the origin at a sphere centre when that makes the radial description simpler. Align an axis with the displacement between centres when useful.
2
Write each sphere’s radial condition.
Substitute the spherical-coordinate expressions into its Cartesian equation and solve for \(\rho\).
3
Check the direction conditions.
Determine where the roots are real and nonnegative, and identify which radial intervals are inside each sphere.
4
Compare competing limits.
Find where they are equal. Split the angular range there if the active radial bound changes.
5
Integrate and check.
Include \(\rho^2\sin\phi\), then compare the result or setup with the geometry of the solid.
Common pitfall: The two roots of an offset sphere do not automatically give valid radial bounds in every direction. For example, a ray can miss the sphere entirely, or the origin can lie inside it so that only the outward intersection is a positive radial boundary. Check the discriminant, the signs of the roots, and the inside interval before using them.

Check Your Understanding

Use the sphere equations and ray-by-ray reasoning to answer these questions.

  1. What are the radial bounds for the region between concentric spheres of radii \(2\) and \(5\)?
  2. For a sphere centred at \((d,0,0)\) with radius \(a\), what condition makes its radial intersections real?
  3. Why can the upper radial bound for the intersection of two balls change with \(\phi\)?
  4. For two unit spheres with centres one unit apart on the \(x\)-axis, at what polar angle do their radial upper bounds agree?
  5. When a ray passes through an excluded sphere, why might the allowed part of that ray consist of two separate intervals?