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.
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}\).
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\).
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
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
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:
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
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
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
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
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
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:
Thus the flux is
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.
Check Your Understanding
Use translated coordinates and the divergence theorem to answer these questions.
- What are the translated spherical-coordinate bounds for a ball of radius \(3\) centered at \((2,-1,4)\)?
- 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\)?
- Why does the integral of \(v\) over a complete translated ball equal zero?
- For \(\mathbf{F}=(x,y,z)\), what is the outward flux across a sphere of radius \(R\), regardless of its center?
- In the ball centered at \((1,0,0)\), what expression replaces \(x^2+y^2+z^2\) in translated coordinates?