Why Check the Whole Enclosed Region?
A closed surface separates an inside from an outside. The divergence theorem relates the net outward flux through that surface to the divergence throughout the enclosed solid. This makes divergence a useful diagnostic: if the field has zero divergence everywhere inside and on the boundary, the net outward flux must be zero.
The condition concerns the entire solid, not just the surface. A field may have zero divergence wherever it is defined and still fail to have zero flux if it has a singularity inside the surface. The theorem cannot be applied across a point where the field is undefined or not sufficiently smooth.
Flux, Divergence, and the Theorem’s Conditions
Let \(\mathbf{F}=(P,Q,R)\) be a vector field in three-dimensional space. Its divergence is the scalar field
For a smooth surface \(S\) with unit normal \(\mathbf{n}\), the flux of \(\mathbf{F}\) through \(S\) is the surface integral of the normal component. If \(S\) is the boundary of a solid \(E\), the outward flux is
Here \(\mathbf{n}\) points out of the enclosed solid. For a closed surface, this outward orientation is the one used in the divergence theorem.
The regularity condition matters: \(\mathbf{F}\) must be defined and sufficiently smooth throughout the region where the volume integral is taken, including the boundary. In particular, it is not enough that the divergence be zero at all points where the field happens to be defined if a singular point inside \(E\) has been omitted.
“Source-free” here means that the divergence vanishes throughout the solid under consideration. The conclusion is about net flux: parts of the boundary can have nonzero outward or inward flux, while the total over the closed boundary is zero.
Worked Example: A Smooth Source-Free Field on a Sphere
Worked Example: A Smooth Source-Free Field on a Sphere
Let \(\mathbf{F}(x,y,z)=(y,z,x)\), and let \(S\) be the sphere \(x^2+y^2+z^2=4\), oriented outward. Find its net outward flux.
First compute the divergence. The components are \(P=y\), \(Q=z\), and \(R=x\), so
The field is polynomial, so it and its first partial derivatives are continuous throughout the ball \(E=\{x^2+y^2+z^2\leq 4\}\). The sphere is the piecewise smooth closed boundary of that ball. The divergence theorem therefore applies:
Check: the computed divergence is zero at every point of the enclosed ball, not merely on the sphere, and the field has no singularities there. Those facts meet the theorem’s hypotheses and give the stated zero net flux.
Why an Enclosed Singularity Changes the Diagnosis
Consider the inverse-square radial field
This field is undefined at the origin. Away from that point, write \(r=\sqrt{x^2+y^2+z^2}\), so its components are \(x/r^3\), \(y/r^3\), and \(z/r^3\). For \(r>0\), differentiating each component gives
Adding these expressions and using \(x^2+y^2+z^2=r^2\) yields
Thus the divergence vanishes wherever the field is defined. But a sphere enclosing the origin does not enclose a region on which this field is defined and continuously differentiable everywhere. We must not use the divergence theorem on the full ball. The flux can be computed directly, and a punctured-region argument shows why it is nonzero.
Worked Example: Flux Through a Sphere Enclosing the Singularity
Worked Example: Flux Through a Sphere Enclosing the Singularity
Find the outward flux of the inverse-square field above through the sphere \(S_R\) of radius \(R>0\) centered at the origin.
On this sphere, \(r=R\), and the outward unit normal is \(\mathbf{n}=(x,y,z)/R\). Therefore
The integrand is constant on the sphere, whose area is \(4\pi R^2\). Hence
Check: substituting the sphere’s area cancels the factor \(R^2\), so the flux is \(4\pi\) for every \(R>0\), as the direct calculation shows. The result is nonzero even though the divergence is zero at every point away from the origin. There is no contradiction: the hypotheses for applying the theorem to the entire ball fail at the origin.
A Punctured-Region Justification
The nonzero flux can also be understood using the divergence theorem where it does apply. Remove a small ball of radius \(\varepsilon\), with \(0<\varepsilon<R\), from the ball of radius \(R\). On the resulting spherical shell, the field is smooth and its divergence is zero. The shell has two boundary components: the outer sphere and the inner sphere. Crucially, the outward normal for the shell on its inner boundary points toward the origin, into the removed ball.
The shell avoids the singularity, so the theorem gives the sum of its two outward boundary fluxes as the integral of zero divergence.
On the inner sphere, the shell’s normal is the negative of the radial outward normal for a ball centered at the origin.
The inner shell-boundary flux is \(-4\pi\), so the outer flux must be \(4\pi\).
In equations, if \(E_{\varepsilon,R}\) is the shell, the divergence theorem gives
Here \(\mathbf{n}_{\mathrm{rad}}\) is the radial outward unit normal for the small sphere. The flux with that radial normal is \(4\pi\), by the same calculation as for radius \(R\), so the inner shell-boundary flux is \(-4\pi\). It follows that the outer flux is \(4\pi\). Flux through the outer boundary is balanced by flux through the boundary around the removed singularity. The theorem has been used only on a region where its smoothness conditions hold.
Worked Example: A Singularity Outside the Enclosed Solid
Worked Example: A Singularity Outside the Enclosed Solid
Use the same inverse-square field to find the outward flux through the sphere centered at \((3,0,0)\) with radius \(1\).
The field is undefined only at the origin. Every point in the closed ball lies at distance at least \(3-1=2\) from the origin. Thus the field is defined and continuously differentiable on an open set containing the entire closed ball and its boundary.
We already computed that \(\nabla\cdot\mathbf{F}=0\) wherever \(r>0\). Since the closed ball avoids the origin, its divergence is zero throughout the ball. The divergence theorem applies and gives
Check: the singularity is outside this enclosed region, so it does not violate the theorem’s hypotheses there. The zero-flux conclusion follows from zero divergence within the ball; it would not follow merely from knowing that the field is nonsingular on the sphere itself.
Common Pitfall: Checking Divergence but Ignoring the Domain
A tempting but invalid argument is: “The inverse-square field has divergence zero, so its flux through every closed surface is zero.” This treats the calculation \(\nabla\cdot\mathbf{F}=0\) for \(r>0\) as though it held throughout every enclosed solid. For a sphere centered at the origin, the ball contains the point \(r=0\), where \(\mathbf{F}\) is undefined. The theorem’s hypotheses are not satisfied, and the direct calculation gives \(4\pi\), not zero.
For a practical diagnosis, identify the enclosed solid, locate any singularities, and then check divergence throughout that solid. A surface-only smoothness check is insufficient. If the region is source-free and the theorem applies, the total outward flux is zero; if a singularity lies inside, compute the flux by a valid method or remove the singularity and account for the additional boundary.
Check Your Understanding
For each question, pay attention to both the divergence and the region on which the field is defined.
- State the two main conditions that let you conclude zero net outward flux from zero divergence.
- Why does zero divergence away from the origin not justify applying the divergence theorem to a ball centered at the origin for the inverse-square radial field?
- For that field, what is the outward flux through a sphere of radius \(R>0\) centered at the origin?
- Why does the same field have zero net flux through the sphere centered at \((3,0,0)\) with radius \(1\)?
- On a spherical shell, which way does the outward normal point on the inner boundary, and why does that orientation matter for flux cancellation?