Tutorials › Calculus III › Field and Boundary Conditions for Applying the Theorem

The Divergence Theorem · Tutorial 955 of 999

Field and Boundary Conditions for Applying the Theorem

Learn to check that a vector field is continuously differentiable throughout a solid and that the entire boundary is closed and piecewise smooth before applying the Divergence Theorem.

Advanced 9 min read

What You'll Learn

  • State the field and boundary hypotheses in the Divergence Theorem.
  • Distinguish a singularity outside a solid from one inside it.
  • Diagnose why an open surface with a missing face is not a complete boundary.
  • See how regularity supports the local flux-divergence relation.
  • Check theorem conditions in examples and identify invalid direct applications.

Why the Conditions Matter

The Divergence Theorem converts the total outward flux across a closed surface into a volume integral of divergence. The conversion is powerful, but it is not a rule that applies to every field and every surface. The vector field must be sufficiently regular throughout the solid, and the surface must be the complete boundary of that solid.

These requirements are mathematical hypotheses, not optional checks. A field can be smooth on the surface yet singular at a point inside it. A collection of smooth surface pieces can still fail to enclose a solid if one face is missing. Either defect prevents direct use of the theorem.

The central check: Before applying the Divergence Theorem, verify both that the field is continuously differentiable on an open set containing the solid and that the surface is the complete, closed, piecewise smooth boundary of that solid.

Statement and Conditions

Let \(E\) be a bounded solid in \(\mathbb{R}^3\), and let \(\partial E\) denote its entire boundary. The boundary is piecewise smooth if it consists of finitely many smooth surface pieces that meet along edges or other lower-dimensional seams. Such edges and corners are permitted; they do not make the boundary open.

A vector field \(\mathbf{F}=(P,Q,R)\) is continuously differentiable on an open set \(U\) if its component functions have continuous first partial derivatives throughout \(U\). Requiring an open set containing \(E\) ensures that the field and the derivatives used in the theorem are defined throughout the solid, including its boundary.

Theorem: If \(E\) is a bounded solid with a piecewise smooth boundary \(\partial E\), and \(\mathbf{F}\) is continuously differentiable on an open set containing \(E\), then
$$ \iint_{\partial E}\mathbf{F}\cdot\mathbf{n}\,dS = \iiint_E \nabla\cdot\mathbf{F}\,dV. $$
Here \(\mathbf{n}\) is the outward unit normal on each smooth boundary piece, and \(\nabla\cdot\mathbf{F}=\frac{\partial P}{\partial x}+\frac{\partial Q}{\partial y}+\frac{\partial R}{\partial z}\). The surface integral includes every boundary piece.

The surface must be closed in the geometric sense: it must form the whole boundary of the solid, with no unaccounted-for opening. It may have multiple pieces, edges, and corners. What is not allowed is treating only part of a boundary as though it were the boundary of the entire solid.

Why Regularity and Closure Support the Theorem

The hypotheses reflect the mechanism behind the result. Continuous first derivatives make the divergence well-defined throughout the solid and allow local flux changes to be related to those derivatives. Closure ensures that the flux being counted is the flux through the entire boundary; when solids are assembled from smaller pieces, flux across a shared internal face cancels because the two outward directions are opposite.

For an axis-aligned rectangular box, the local relationship can be derived directly. Suppose \(E=[a,b]\times[c,d]\times[e,f]\), and \(\mathbf{F}=(P,Q,R)\) is continuously differentiable on an open set containing it. The two faces perpendicular to the \(x\)-axis contribute

$$ \int_c^d\int_e^f \bigl(P(b,y,z)-P(a,y,z)\bigr)\,dz\,dy. $$

By the Fundamental Theorem of Calculus, the difference inside the integral is \(\int_a^b \frac{\partial P}{\partial x}(x,y,z)\,dx\). Therefore the \(x\)-face contribution equals \(\iiint_E \frac{\partial P}{\partial x}\,dV\). Applying the same argument to the \(y\)-faces and \(z\)-faces gives the other two partial derivatives. Adding all six face contributions gives the total flux as the integral of the divergence over the box.

This calculation shows why the field needs suitable derivatives and why all boundary faces must be included. For more general piecewise smooth boundaries, the Divergence Theorem extends this flux-volume relationship beyond boxes; the stated hypotheses are what make that extension valid.

Worked Example: A Singularity Outside the Solid

Worked Example: A Singularity Outside the Solid

Let \(E=[0,1]\times[0,1]\times[0,1]\), and consider \(\mathbf{F}(x,y,z)=\left(\frac{1}{x-3},0,0\right)\). Determine whether the Divergence Theorem applies, then check its two sides.

The only singularity occurs where \(x=3\), which is outside \(E\). For example, the open region \(-1<x<2\), together with all \(y,z\), contains \(E\) and excludes \(x=3\). On that region, \(1/(x-3)\) and its first derivative are continuous. The field is therefore continuously differentiable on an open set containing the cube.

The cube is a bounded solid with a complete, piecewise smooth boundary, so the theorem applies. The divergence is

$$ \nabla\cdot\mathbf{F} = \frac{\partial}{\partial x}\left(\frac{1}{x-3}\right) = -\frac{1}{(x-3)^2}. $$

Integrating over the cube, whose \(y\)- and \(z\)-side lengths are both \(1\), gives

$$ \iiint_E \nabla\cdot\mathbf{F}\,dV = \int_0^1-\frac{1}{(x-3)^2}\,dx = \left[\frac{1}{x-3}\right]_0^1 = -\frac12+\frac13 = -\frac16. $$

For the boundary flux, the four faces parallel to the \(x\)-axis contribute zero because \(\mathbf{F}\) has no \(y\)- or \(z\)-component. On the face \(x=0\), the field’s \(x\)-component is \(-1/3\) and the outward direction is negative \(x\), so the flux is \(1/3\) across an area of \(1\). On \(x=1\), the component is \(-1/2\) and the outward direction is positive \(x\), so the flux is \(-1/2\). The total boundary flux is \(1/3-1/2=-1/6\), agreeing with the volume integral.

The key point is that the field need not be defined everywhere in space. It must be continuously differentiable on an open set containing the solid being considered.

Worked Example: A Singularity Inside the Solid

Worked Example: A Singularity Inside the Solid

Consider the unit ball \(E=\{(x,y,z):x^2+y^2+z^2\leq 1\}\) and the field \(\mathbf{F}(x,y,z)=\left(\frac{x}{r^3},\frac{y}{r^3},\frac{z}{r^3}\right)\), where \(r=\sqrt{x^2+y^2+z^2}\). Can the Divergence Theorem be applied directly?

The ball has a closed, smooth boundary. However, \(\mathbf{F}\) is undefined at the origin, and the origin lies inside \(E\). Thus \(\mathbf{F}\) is not continuously differentiable on any open set containing the whole ball. The field condition fails.

The failure is substantive. Away from the origin, direct differentiation gives

$$ \nabla\cdot\mathbf{F} = \frac{1}{r^3}+\frac{1}{r^3}+\frac{1}{r^3} - \frac{3x^2+3y^2+3z^2}{r^5} = \frac{3}{r^3}-\frac{3r^2}{r^5} = 0. $$

On the unit sphere, \(r=1\), so \(\mathbf{F}=(x,y,z)\). The outward unit normal there is \(\mathbf{n}=(x,y,z)\), and therefore \(\mathbf{F}\cdot\mathbf{n}=x^2+y^2+z^2=1\). The sphere has area \(4\pi\), so its outward flux is \(4\pi\). If one incorrectly applied the theorem using the divergence \(0\), one would obtain a volume integral of \(0\), which disagrees with the flux.

There is no contradiction: the theorem’s field hypothesis fails at an interior point. Computing the divergence away from that point does not establish that the theorem applies throughout the ball.

Worked Example: A Missing Face

Worked Example: A Missing Face

Let \(E=[0,2]\times[0,2]\times[0,2]\) and let \(\mathbf{F}=(0,0,1)\). Suppose we are given the five faces of the cube other than the top face \(z=2\). Is the Divergence Theorem applicable to that five-face surface?

The field is continuously differentiable everywhere, and the cube is a bounded solid. But the five faces are not the entire boundary \(\partial E\): the top face is missing. The given collection is not closed, so it does not meet the boundary condition in the theorem.

The flux across the five included faces makes the problem visible. On the four side faces, the outward direction has no \(z\)-component, so \(\mathbf{F}\cdot\mathbf{n}=0\) and their total flux is \(0\). On the bottom face \(z=0\), the outward normal is \((0,0,-1)\), giving \(\mathbf{F}\cdot\mathbf{n}=-1\). The bottom has area \(2\cdot 2=4\), so its flux is \(-4\). The five-face flux is therefore \(-4\).

But \(\nabla\cdot\mathbf{F}=0\), so the divergence integral over the cube is \(0\). The values disagree because the flux was not taken over the complete boundary. The theorem does not say that the flux through an arbitrary selection of faces equals the volume integral.

A Practical Hypothesis Check

Before using the theorem, identify the exact solid \(E\) and the exact surface over which flux is requested. Then check the field and boundary separately. This prevents a frequent error: verifying that the formulas look manageable while overlooking a missing hypothesis.

1
Identify the solid.
Specify the region \(E\) whose volume integral would be used.
2
Check the field on a neighborhood.
Look for undefined points or discontinuous first derivatives anywhere in \(E\) or on its boundary. A singularity outside \(E\) does not by itself invalidate the theorem.
3
Check the whole boundary.
Confirm that the surface is \(\partial E\), not only some of its pieces, and that its pieces meet to form a closed, piecewise smooth boundary.
4
Apply the theorem only after both checks pass.
If either condition fails, the theorem cannot be applied directly in its stated form. A separate argument or a changed setup would be needed.

Common Mistake: Checking Only the Surface

A common incorrect argument is: “The field is smooth on the sphere, so the Divergence Theorem applies to the ball.” In the singular-field example, the field is indeed smooth at every point of the unit sphere. Nevertheless, it is undefined at the origin inside the ball, so it is not continuously differentiable on an open set containing the solid. Checking the boundary alone is not sufficient.

The reverse mistake is to reject a field merely because its formula has a singularity somewhere in space. In the first worked example, the singularity at \(x=3\) lies outside the cube, and an open neighborhood of the cube avoids it. What matters is regularity on a neighborhood of the chosen solid, not on all of \(\mathbb{R}^3\).

Likewise, smoothness of every included face does not compensate for an omitted face. Closure is a condition on the assembled surface as a whole.

Takeaway: A direct application requires both a regular field throughout a neighborhood of the solid and the flux through its complete closed, piecewise smooth boundary. Neither condition can replace the other.

Check Your Understanding

For each question, decide which hypothesis is being tested before deciding whether the theorem applies.

  1. A field is smooth on a sphere but undefined at the center of its ball. Which condition fails?
  2. A field has a singularity at a point far outside the solid, and is continuously differentiable on an open neighborhood of the solid. Does that singularity alone prevent application?
  3. Why is the collection of five faces of a cube not the complete boundary of the cube?
  4. What does “piecewise smooth” allow at the places where boundary pieces meet?
  5. In the rectangular-box derivation, why does the contribution from the two faces perpendicular to the \(x\)-axis involve \(\frac{\partial P}{\partial x}\)?