Tutorials › Calculus III › Translated Balls and Off-Center Spherical Solids

The Divergence Theorem · Tutorial 959 of 999

Translated Balls and Off-Center Spherical Solids

Translate an off-center ball to standard spherical bounds and use the divergence theorem to compute its outward flux.

Advanced 9 min read

What You'll Learn

  • State when the divergence theorem applies to a ball and its boundary sphere
  • Translate a ball centered away from the origin into centered coordinates
  • Write the corresponding spherical-coordinate bounds and volume element
  • Integrate polynomial divergences over translated balls
  • Recognize when translated odd terms have zero integral
  • Check a flux calculation against the geometry of its boundary

Why the Center of a Ball Matters

A sphere can be centered somewhere other than the origin, but the divergence theorem still converts its outward flux into a volume integral. The main care is in describing the ball correctly: if its center is displaced, the original coordinates do not have the usual bounds for a ball centered at the origin.

The efficient approach is to translate the coordinates so that the ball becomes centered at the origin. This changes the expressions in the integrand, but it gives simple spherical bounds. Keeping those two effects straight is the central skill in flux problems over off-center spherical solids.

Definition: The closed ball of radius \(R>0\) centered at \(\mathbf{c}=(a,b,c)\) is the solid \(B=\{(x,y,z):(x-a)^2+(y-b)^2+(z-c)^2\le R^2\}\). Its boundary is the sphere \(\partial B\), and the outward unit normal on that boundary points away from the center \(\mathbf{c}\).

The Divergence-Theorem Setup

If \(\mathbf{F}=(P,Q,S)\) is continuously differentiable on an open set containing a ball \(B\) and its boundary, the divergence theorem states that the outward flux across the boundary equals the integral of the divergence over the solid. Here the divergence is \(\nabla\cdot\mathbf{F}=\frac{\partial P}{\partial x}+\frac{\partial Q}{\partial y}+\frac{\partial S}{\partial z}\).

$$ \iint_{\partial B}\mathbf{F}\cdot\mathbf{n}\,dS = \iiint_B \nabla\cdot\mathbf{F}\,dV. $$

Thus the ball's location enters through the volume bounds and through any translated variables in the divergence. A translation does not change volume: setting \(u=x-a\), \(v=y-b\), and \(w=z-c\) has Jacobian determinant \(1\). The ball then becomes \(u^2+v^2+w^2\le R^2\).

Coordinate rule: For a ball centered at \((a,b,c)\), use \(x=a+u\), \(y=b+v\), \(z=c+w\). The translated variables satisfy \(u^2+v^2+w^2\le R^2\), while every occurrence of \(x,y,z\) in the integrand must also be replaced by \(a+u,b+v,c+w\).

In spherical coordinates for the translated variables, a consistent convention is \(u=\rho\sin\phi\cos\theta\), \(v=\rho\sin\phi\sin\theta\), \(w=\rho\cos\phi\). For the entire ball, the bounds and volume element are

$$ 0\le \rho\le R,\qquad 0\le\phi\le\pi,\qquad 0\le\theta\le 2\pi, \qquad dV=\rho^2\sin\phi\,d\theta\,d\phi\,d\rho. $$

The shifted Cartesian coordinates are therefore \(x=a+\rho\sin\phi\cos\theta\), \(y=b+\rho\sin\phi\sin\theta\), and \(z=c+\rho\cos\phi\). These are the coordinates to substitute into the divergence. The bounds describe the whole ball; they are not bounds for the original coordinates \(x,y,z\) unless the center is the origin.

Why Translation Gives These Bounds

The coordinate translation is justified directly by the definition of the ball. If \((x,y,z)\) belongs to the ball centered at \((a,b,c)\), then \(u=x-a\), \(v=y-b\), and \(w=z-c\) satisfy \(u^2+v^2+w^2\le R^2\). Conversely, every \((u,v,w)\) satisfying that inequality gives a point in the original ball by adding the center coordinates.

For the change of variables, the derivative matrix of \((x,y,z)=(a+u,b+v,c+w)\) with respect to \((u,v,w)\) is the identity matrix. Its determinant is \(1\), so \(dV=du\,dv\,dw\). Applying spherical coordinates to \((u,v,w)\) then gives the bounds and volume element above. In particular, translating the ball changes neither the volume element nor the radius; it changes only the expressions for the original coordinates.

One useful consequence is that a term odd in one translated coordinate integrates to zero over the ball. For example, the transformation \((u,v,w)\mapsto(-u,v,w)\) maps the ball to itself and reverses the sign of \(u\). The volume element is unchanged, so the integral of \(u\) equals its own negative and must be zero. The same reasoning applies to \(v\) and \(w\).

Worked Example: A Linear Field on a Displaced Ball

Worked Example: A Linear Field on a Displaced Ball

Find the outward flux of \(\mathbf{F}=(x,y,z)\) across the sphere bounding the ball centered at \((1,-2,2)\) with radius \(2\).

The field is continuously differentiable everywhere, so the divergence theorem applies. Its divergence is

$$ \nabla\cdot\mathbf{F} =\frac{\partial x}{\partial x}+\frac{\partial y}{\partial y}+\frac{\partial z}{\partial z} =1+1+1=3. $$

Translate using \(x=1+u\), \(y=-2+v\), and \(z=2+w\). The solid becomes \(u^2+v^2+w^2\le 4\). Since the divergence is constant, its integral is the constant times the volume of the ball:

$$ \begin{aligned} \iint_{\partial B}\mathbf{F}\cdot\mathbf{n}\,dS &=\iiint_B 3\,dV\\ &=3\left(\frac{4}{3}\pi(2)^3\right)\\ &=3\left(\frac{32\pi}{3}\right)\\ &=32\pi. \end{aligned} $$

As a check, on the sphere write \((x,y,z)=(1,-2,2)+2\mathbf{q}\), where \(\mathbf{q}\) is the outward unit normal. Then \(\mathbf{F}\cdot\mathbf{q}=(1,-2,2)\cdot\mathbf{q}+2\). The integral of each component of \(\mathbf{q}\) over the sphere is zero, while the constant \(2\) integrates to \(2\cdot 4\pi(2)^2=32\pi\), agreeing with the volume calculation.

Polynomial Divergences and Shifted Terms

When the divergence depends on position, a translation must be applied to that expression as well as to the region. Expanding after translation often separates a constant part, terms odd in a translated coordinate, and terms that depend only on the translated radius. The odd terms vanish over a full ball, but the constants and radial terms generally remain.

Worked Example: A Quadratic Field on a Unit Ball

Compute the outward flux of \(\mathbf{F}=(x^2,y^2,z^2)\) across the sphere bounding the unit ball centered at \((1,1,1)\).

Each component is smooth everywhere, and

$$ \nabla\cdot\mathbf{F}=2x+2y+2z. $$

Set \(x=1+u\), \(y=1+v\), and \(z=1+w\). The translated region is \(u^2+v^2+w^2\le1\), and the divergence becomes \(6+2u+2v+2w\). Therefore

$$ \begin{aligned} \iint_{\partial B}\mathbf{F}\cdot\mathbf{n}\,dS &=\iiint_{u^2+v^2+w^2\le1}(6+2u+2v+2w)\,du\,dv\,dw\\ &=6\iiint_{u^2+v^2+w^2\le1}1\,dV +2\iiint_{u^2+v^2+w^2\le1}u\,dV\\ &\qquad+2\iiint_{u^2+v^2+w^2\le1}v\,dV +2\iiint_{u^2+v^2+w^2\le1}w\,dV. \end{aligned} $$

The three linear integrals vanish: for each coordinate, reflection across the corresponding coordinate plane preserves the unit ball and reverses the sign of that coordinate. The unit ball has volume \(4\pi/3\), so the remaining term gives

$$ 6\left(\frac{4\pi}{3}\right)+2(0)+2(0)+2(0)=8\pi. $$

As a check, the translated divergence has average value \(6\) over the ball because the three linear terms integrate to zero. Multiplying that average by the volume gives \(6(4\pi/3)=8\pi\), the same flux.

When the Divergence Contains a Squared Distance

A squared distance from the origin does not become merely \(\rho^2\) after translating an off-center ball. Instead, it becomes a squared distance from the center plus terms involving the center's displacement. Expanding that expression before integrating prevents a frequent mistake.

Worked Example: A Radial Polynomial Field on an Off-Center Ball

Find the outward flux of \(\mathbf{F}=(x^2+y^2+z^2)(x,y,z)\) across the sphere bounding the ball centered at \((1,0,0)\) with radius \(2\).

Write \(s=x^2+y^2+z^2\). The field components are \(sx,sy,sz\). Their partial derivatives are \(2x^2+s\), \(2y^2+s\), and \(2z^2+s\), respectively. Hence

$$ \nabla\cdot\mathbf{F} =(2x^2+s)+(2y^2+s)+(2z^2+s) =2s+3s =5s. $$

Translate by setting \(x=1+u\), \(y=v\), and \(z=w\). The region is \(u^2+v^2+w^2\le4\), and the squared distance in the divergence becomes

$$ x^2+y^2+z^2=(1+u)^2+v^2+w^2=1+2u+u^2+v^2+w^2. $$

Using \(\rho^2=u^2+v^2+w^2\), the divergence integral is therefore \(5\iiint_B(1+2u+\rho^2)\,dV\). The \(2u\) term has zero integral by reflection. The other two terms can be evaluated in translated spherical coordinates:

$$ \begin{aligned} \iiint_B 1\,dV &=\int_0^2\int_0^\pi\int_0^{2\pi}\rho^2\sin\phi\,d\theta\,d\phi\,d\rho\\ &=\left(2\pi\right)(2)\left(\frac{2^3}{3}\right) =\frac{32\pi}{3},\\[4pt] \iiint_B \rho^2\,dV &=\int_0^2\int_0^\pi\int_0^{2\pi}\rho^4\sin\phi\,d\theta\,d\phi\,d\rho\\ &=(2\pi)(2)\left(\frac{2^5}{5}\right) =\frac{128\pi}{5}. \end{aligned} $$

Thus the flux is

$$ \begin{aligned} \iint_{\partial B}\mathbf{F}\cdot\mathbf{n}\,dS &=5\left(\frac{32\pi}{3}+0+\frac{128\pi}{5}\right)\\ &=5\left(\frac{160\pi+384\pi}{15}\right)\\ &=5\left(\frac{544\pi}{15}\right) =\frac{544\pi}{3}. \end{aligned} $$

As a check on the integration, the translated squared distance has integral \(\frac{32\pi}{3}+\frac{128\pi}{5}=\frac{544\pi}{15}\). Multiplying by the divergence factor \(5\) recovers \(\frac{544\pi}{3}\).

A Common Bounds Error

A tempting but incorrect shortcut is to use the centered-ball bounds directly on the original coordinates when the ball is displaced. For the ball centered at \((1,0,0)\) with radius \(2\), the region is not \(x^2+y^2+z^2\le4\). For instance, the point \((3,0,0)\) lies on the actual boundary because \((3-1)^2=4\), but it would be excluded by bounds that incorrectly require \(x^2+y^2+z^2\le4\).

The correction is to translate first. In this example \(u=x-1\), \(v=y\), and \(w=z\), so the correct bounds are \(u^2+v^2+w^2\le4\), or \(0\le\rho\le2\) in spherical coordinates. Then the integrand must be rewritten using \(x=1+u\), not left unchanged. Shifting the bounds without shifting the integrand—or shifting the integrand while retaining the wrong bounds—describes a different integral.

Takeaway: For an off-center ball, translate both parts of the volume integral: replace the region by a centered ball and replace every original coordinate in the divergence by its shifted expression.

Check Your Understanding

Use translated coordinates and the divergence theorem to answer these questions.

  1. What are the translated spherical-coordinate bounds for a ball of radius \(3\) centered at \((2,-1,4)\)?
  2. For the ball centered at \((a,b,c)\), what do \(x,y,z\) become after setting \(u=x-a\), \(v=y-b\), and \(w=z-c\)?
  3. Why does the integral of \(v\) over a complete translated ball equal zero?
  4. For \(\mathbf{F}=(x,y,z)\), what is the outward flux across a sphere of radius \(R\), regardless of its center?
  5. In the ball centered at \((1,0,0)\), what expression replaces \(x^2+y^2+z^2\) in translated coordinates?