Divergence Theorem Explained: Flux, Closed Surfaces, and a Complete Example

The Divergence Theorem converts the outward flux through a closed surface into a triple integral of divergence over the solid region inside.
It is the three-dimensional bridge between boundary flow and interior source strength.

This theorem matters because a difficult surface integral can collapse into an easy volume integral. The decisive recognition rule is simple: when the surface is closed, compute the divergence before committing to a direct flux calculation.


Divergence Theorem formula equating outward flux through a closed surface with the volume integral of divergence inside, from Woody Calculus.
Slide 1: The Divergence Theorem equates outward flux through the closed boundary \(S\) with accumulated divergence throughout the enclosed region \(E\).

What Is the Divergence Theorem?

The Divergence Theorem states that the net outward flux through a closed surface equals the total divergence inside the enclosed volume.

The theorem is also called Gauss’s Divergence Theorem or Gauss’s Theorem. The left side is a surface integral over the boundary. The right side is a volume integral over the interior. The theorem does not say that flux and divergence are the same pointwise quantity; it says their totals agree after integration over the matching boundary and volume.

Plain-language answer:
Count everything flowing out through the skin, or add every source and sink inside. The two totals must match.

What Does the Divergence-Theorem Notation Mean?

Every symbol identifies either the vector field, the closed boundary, the enclosed region, the outward orientation, or the measure used for integration.

Divergence-Theorem notation glossary
Notation Meaning Role
\(\mathbf F=\langle P,Q,R\rangle\) Vector field Describes the direction and strength of flow
\(E\) Solid region The three-dimensional volume enclosed by the boundary
\(S=\partial E\) Boundary surface The closed surface surrounding \(E\)
\(\mathbf n\) Outward unit normal Fixes the positive direction of flux
\(\mathbf F\cdot\mathbf n\) Pointwise normal component Measures local outward or inward flow
\(dS\) Surface-area element Adds flux over the boundary
\(dV\) Volume element Adds divergence throughout the interior
\(\nabla\cdot\mathbf F\) Divergence Measures local net expansion or compression

Some textbooks combine the normal and surface element into the vector area element
\(d\mathbf S=\mathbf n\,dS\). Then the surface integral may be written

\[
\iint_S \mathbf F\cdot d\mathbf S.
\]

What Is Outward Flux?

Flux measures how much of a vector field crosses a surface in the normal direction.

\[
\mathbf F\cdot\mathbf n
=
\|\mathbf F\|\cos\theta.
\]

Here \(\theta\) is the angle between the field and the outward unit normal.
The dot product isolates the component of the field that actually crosses the surface.

  • If \(\mathbf F\cdot\mathbf n>0\), the field crosses outward.
  • If \(\mathbf F\cdot\mathbf n<0\), the field crosses inward.
  • If \(\mathbf F\cdot\mathbf n=0\), the field is tangent to the surface and contributes no normal flux at that point.

Outward flux illustrated by the dot product of a vector field with the outward unit normal, with positive outward and negative inward flow, from Woody Calculus.
Slide 2: The dot product \(\mathbf F\cdot\mathbf n\) measures pointwise normal flow, while the surface integral adds that flow over the entire surface.

Plain-language answer:
Flux ignores the part of the field sliding along the surface and keeps only the part crossing through it.

What Does Divergence Measure?

Divergence measures the local net rate at which a vector field expands outward from or compresses inward toward a point.

For
\(\mathbf F=\langle P,Q,R\rangle\),

\[
\boxed{
\nabla\cdot\mathbf F
=
\frac{\partial P}{\partial x}
+
\frac{\partial Q}{\partial y}
+
\frac{\partial R}{\partial z}
}
\]

Positive divergence indicates net local production or expansion. Negative divergence indicates net local absorption or compression. Zero divergence means there is no net local source strength, although the field may still move, rotate, or circulate.


Divergence formula with visual source and sink fields illustrating positive and negative divergence, from Woody Calculus.
Slide 3: Positive divergence behaves like a local source, while negative divergence behaves like a local sink.

When Can You Use the Divergence Theorem?

Use the theorem only when the surface is closed, the orientation is outward, and the vector field is continuously differentiable throughout a neighborhood of the enclosed region.

Geometry Requirement

\[
S=\partial E.
\]

The surface must be the complete boundary of a solid region.

Orientation Requirement

\[
\mathbf n=\text{outward unit normal}.
\]

Reversing the orientation reverses the sign of flux.

Field Requirement

\[
\mathbf F\in C^1.
\]

The field and its first partial derivatives must behave properly on and inside the boundary.

Boundary Requirement

\[
S\text{ is piecewise smooth}.
\]

Spheres, boxes, closed cylinders, and many composite surfaces qualify.


Closed surfaces required by the Divergence Theorem, comparing a sphere, cube, closed cylinder, and an invalid open hemisphere, from Woody Calculus.
Slide 4: Spheres, cubes, and closed cylinders bound solids; an open hemisphere must be capped before the theorem can be applied.

Why Does the Divergence Theorem Work?

When a solid is divided into many tiny cells, flux across shared interior faces cancels because the two cells use opposite outward normals.

Imagine partitioning \(E\) into many small boxes. A field crossing a face from one box enters the neighboring box through that same face. The outward normal for the first box is the negative of the outward normal for the second box, so the two interior flux contributions cancel.

Only the flux across the exterior boundary survives. In the limit, the sum of the tiny local source strengths becomes the integral of divergence, and the surviving exterior flow becomes the boundary flux.


Interior flux cancellation across neighboring cells leaving only total flux through the outside boundary, from Woody Calculus.
Slide 5: Opposite orientations cancel flux across internal faces, leaving only the net flow through the outer boundary.

Plain-language answer:
Flow transferred between neighboring pieces is internal bookkeeping. Only flow that escapes the entire solid contributes to net outward flux.

When Is the Divergence Theorem Better Than Direct Integration?

The theorem is usually best when the surface is closed and the divergence is simpler to integrate than the original normal component.

Decision rules for choosing a flux method
Situation Best first move Reason
Closed surface and simple divergence Use the Divergence Theorem Replaces surface geometry with a volume integral
Closed surface but singularity inside Stop and inspect the hypotheses The theorem may not apply to the full region
Open surface that can be capped Close it, use the theorem, subtract cap flux Converts most of the problem to a volume integral
Open surface with easy parametrization Use a direct surface integral No artificial cap may be needed
\(\mathbf F\cdot\mathbf n\) is constant or obvious Compare direct and theorem methods Direct integration may be faster
Surface given in several pieces Check whether the pieces form one closed boundary The theorem may combine all pieces at once

How Do You Compute the Flux Through a Sphere?

For \(\mathbf F=\langle x,y,z\rangle\) and the sphere \(x^2+y^2+z^2=4\), compute the constant divergence and multiply it by the volume of the radius-\(2\) ball.

Find the outward flux of

\[
\mathbf F(x,y,z)=\langle x,y,z\rangle
\]

through the sphere

\[
S:\ x^2+y^2+z^2=4.
\]

Flux example for the radial vector field F equals x y z through the sphere of radius two, from Woody Calculus.
Slide 6: The example asks for outward flux of the radial field \(\mathbf F=\langle x,y,z\rangle\) through the sphere of radius \(2\).

Step 1: Confirm the Surface Is Closed

The sphere is the boundary of the solid ball

\[
E=\{(x,y,z):x^2+y^2+z^2\le4\}.
\]

The polynomial vector field is continuously differentiable everywhere, so the theorem applies.

Step 2: Compute the Divergence

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

Computation of the constant divergence three for the vector field F equals x y z, from Woody Calculus.
Slide 7: Each matching partial derivative equals \(1\), so \(\nabla\cdot\mathbf F=3\).

Step 3: Replace the Flux Integral with a Volume Integral

\[
\iint_S \mathbf F\cdot\mathbf n\,dS
=
\iiint_E 3\,dV.
\]

Because the integrand is constant,

\[
\iiint_E 3\,dV=3\operatorname{Vol}(E).
\]

Step 4: Compute the Ball’s Volume

\[
\operatorname{Vol}(E)
=
\frac{4}{3}\pi(2)^3
=
\frac{32\pi}{3}.
\]

Conversion of a closed-surface flux integral into the volume integral of three over a solid ball of radius two, from Woody Calculus.
Slide 8: The theorem replaces the flux integral over \(S\) with the integral of \(3\) over the radius-\(2\) ball \(E\).

Step 5: Evaluate the Flux

\[
\iint_S \mathbf F\cdot\mathbf n\,dS
=
3\left(\frac{32\pi}{3}\right)
=
\boxed{32\pi}.
\]

Final outward flux calculation three times thirty-two pi over three equals thirty-two pi, from Woody Calculus.
Slide 9: The constant divergence \(3\) times the ball’s volume gives total outward flux \(32\pi\).
\[
\boxed{\text{Outward flux}=32\pi}
\]

Plain-language answer:
The field creates three units of local expansion per unit volume, and the ball has volume \(32\pi/3\), so the total outward flow is \(32\pi\).

How Can You Verify the Flux Answer Directly?

On the radius-\(2\) sphere, the field points exactly in the outward normal direction, so the direct surface integral reduces to a constant times the sphere’s area.

Both methods agree exactly. The direct method is unusually simple here because the field is radial and the sphere is centered at the origin. The Divergence Theorem is more reusable because it does not require finding or parametrizing the normal field. Students who need more practice with oriented surface integrals can review
Stokes’ Theorem, surface orientation, and surface-integral setup.

How Do You Handle an Open Surface?

Add a missing cap to create a closed boundary, use the Divergence Theorem on the closed surface, and subtract the cap’s flux.

If an open surface \(S_{\mathrm{open}}\) and a cap \(C\) form the closed boundary of a region \(E\), then

\[
\iint_{S_{\mathrm{open}}}\mathbf F\cdot\mathbf n\,dS
+
\iint_C\mathbf F\cdot\mathbf n\,dS
=
\iiint_E\nabla\cdot\mathbf F\,dV.
\]

Therefore,

\[
\boxed{
\iint_{S_{\mathrm{open}}}\mathbf F\cdot\mathbf n\,dS
=
\iiint_E\nabla\cdot\mathbf F\,dV

\iint_C\mathbf F\cdot\mathbf n\,dS
}.
\]

Bonus Example: Upper Hemisphere of Radius \(2\)

Use the same field
\(\mathbf F=\langle x,y,z\rangle\)
on the upper hemisphere
\(x^2+y^2+z^2=4\), \(z\ge0\).
Add the disk \(z=0\) to close the upper half-ball.

The half-ball volume is

\[
\frac12\left(\frac{32\pi}{3}\right)
=
\frac{16\pi}{3}.
\]

Thus the total closed-boundary flux is

\[
3\left(\frac{16\pi}{3}\right)=16\pi.
\]

On the disk, the outward normal for the upper half-ball is
\(-\mathbf k\), so

\[
\mathbf F\cdot(-\mathbf k)=-z=0.
\]

Therefore, the outward flux through the curved upper hemisphere is

\[
\boxed{16\pi}.
\]

Plain-language answer:
Closing the surface creates a theorem-friendly problem. The subtraction step removes the artificial cap afterward.

Why Do Interior Singularities Matter?

A closed surface is not enough: the vector field must also be defined and continuously differentiable throughout the enclosed region.

Consider the inverse-square radial field

\[
\mathbf F(x,y,z)
=
\frac{\langle x,y,z\rangle}
{(x^2+y^2+z^2)^{3/2}}.
\]

Away from the origin,

\[
\nabla\cdot\mathbf F=0.
\]

It would be incorrect to conclude that the flux through a sphere centered at the origin is \(0\), because the field is undefined at the origin. On a sphere of radius \(R\),

\[
\mathbf F\cdot\mathbf n
=
\frac{1}{R^2},
\]

so the flux is

\[
\frac{1}{R^2}(4\pi R^2)
=
\boxed{4\pi}.
\]

How Do Green’s, Stokes’, and Divergence Theorems Compare?

All three theorems convert an integral over a boundary into an integral of a derivative over the region inside, but they use different dimensions, derivatives, and geometric objects.

Comparison of the major vector-calculus integral theorems
Theorem Boundary integral Interior integral Primary recognition cue
Green’s Theorem Line integral around a closed plane curve Double integral over a plane region Closed curve in two dimensions
Stokes’ Theorem Circulation around the boundary curve of a surface Surface integral of curl Curve is the boundary of an oriented surface
Divergence Theorem Flux through a closed surface Triple integral of divergence Closed surface enclosing a volume

Comparison of Green’s Theorem, the Divergence Theorem, and Stokes’ Theorem with their boundary and interior integrals, from Woody Calculus.
Slide 10: Green’s, Stokes’, and Divergence Theorems all connect boundary behavior with a derivative accumulated over the interior.

The common structural idea is a higher-dimensional form of the Fundamental Theorem of Calculus: interior derivative information determines a boundary total.

What Are the Most Common Divergence-Theorem Mistakes?

The fastest way to debug a flux solution is to match the visible symptom to the underlying geometric or algebraic mistake.

Mistake 1: Applying the Theorem to an Open Surface

Symptom: Your “closed-surface” setup includes only a hemisphere, only the side of a cylinder, or a paraboloid without its cap.
Cause: The listed surface is not the complete boundary of a solid.
Fix: Add the missing cap, apply the theorem to the closed boundary, and subtract the cap flux—or use a direct surface integral.

Mistake 2: Forgetting the Outward Orientation

Symptom: Your magnitude looks plausible, but the sign is opposite the expected physical direction.
Cause: You used an inward normal even though the theorem is stated for outward flux.
Fix: Compute outward flux first. If the problem requests inward flux, multiply the outward result by \(-1\).

Mistake 3: Ignoring a Singularity Inside the Region

Symptom: The divergence appears to be zero, yet the field visibly radiates from a point and the direct flux is nonzero.
Cause: The field is undefined at an interior point, so the theorem’s smoothness hypothesis fails on the full solid.
Fix: Identify the singularity, remove a small surrounding region if appropriate, and apply the theorem only where the field is defined.

Mistake 4: Computing the Wrong Divergence

Symptom: Your derivative expression mixes component variables or resembles a curl calculation.
Cause: You did not differentiate each component with respect to its matching coordinate.
Fix: For \(\mathbf F=\langle P,Q,R
angle\), write the template first:

\[

abla\cdot\mathbf F
=
P_x+Q_y+R_z.
\]

Then substitute the actual components. Do not calculate \(P_y+Q_z+R_x\), and do not confuse divergence with curl.

Mistake 5: Integrating Over the Surface After Switching Methods

Symptom: Your right-hand side still contains \(dS\) or surface parameters after invoking the Divergence Theorem.
Cause: You changed the integrand but not the domain of integration.
Fix: Replace the entire surface integral with a triple integral over the enclosed solid \(E\) using \(dV\).

Mistake 6: Using Surface Area Instead of Volume

Symptom: After finding a constant divergence, you multiply by \(4\pi r^2\).
Cause: You used the sphere’s surface area on the volume-integral side of the theorem.
Fix: Use \(\iiint_E c\,dV=c\operatorname{Vol}(E)\). In the worked example, the correct factor is the ball volume \(4\pi r^3/3\).

Mistake 7: Forgetting a Piece of a Composite Boundary

Symptom: A closed cylinder problem includes the side but omits the top or bottom, or a box problem omits a face.
Cause: You treated one component as though it were the entire boundary.
Fix: List every boundary component before calculating. A closed cylinder includes the side, top, and bottom.

Mistake 8: Treating Positive Divergence as Positive Flux at Every Point

Symptom: You conclude that \(\mathbf F\cdot\mathbf n>0\) everywhere because \(
abla\cdot\mathbf F>0\).
Cause: You confused a local source-density statement with a pointwise boundary-direction statement.
Fix: Remember that the theorem compares integrated totals. Positive divergence can produce positive net outward flux even when some boundary regions have inward flow.

Mistake 9: Assuming Zero Divergence Means the Field Is Zero

Symptom: You erase the field or conclude there is no motion after finding \(
abla\cdot\mathbf F=0\).
Cause: You interpreted “no net local expansion” as “no vector field.”
Fix: A divergence-free field can still be large, nonconstant, or rotational. Zero divergence means no net local source strength, not no motion.

Mistake 10: Choosing the Theorem Before Checking the Geometry

Symptom: You write a theorem formula immediately and later discover the surface is open, the normal is inward, or the field is singular.
Cause: Calculation began before classification.
Fix: Write four checks first: closed or open, outward or inward, smooth or singular, surface or volume.

What Divergence-Theorem Checklist Should You Use on an Exam?

Use the same classification sequence on every flux problem so that geometry, orientation, regularity, and the integration region are checked before calculation begins.

  1. Identify the target: Confirm that the problem asks for flux.
  2. Classify the surface: Decide whether it is closed or open.
  3. Identify the solid: Write \(S=\partial E\) when a closed boundary exists.
  4. Check orientation: Confirm that the normal is outward.
  5. Check the vector-field domain: Search for denominators, roots, logarithms, or singular points.
  6. State the theorem hypotheses: Verify that \(\mathbf F\) is continuously differentiable on and inside the boundary.
  7. Write the formula from memory: Surface flux equals the volume integral of divergence.
  8. Compute divergence cleanly: Use \(P_x+Q_y+R_z\).
  9. Choose coordinates: Cartesian, cylindrical, or spherical coordinates should match the solid.
  10. Set the correct bounds: The bounds describe the volume \(E\), not only the surface.
  11. Evaluate exactly: Preserve exact constants such as \(\pi\).
  12. Check the sign: Sources should suggest positive net outward flux; sinks should suggest negative net outward flux.
  13. Verify when practical: Compare with a direct surface integral, symmetry, dimensional reasoning, or a second method.
  14. Rewrite the perfect solution: Rebuild the full classification and setup from a blank page.
  15. Say the steps aloud: Closed, outward, smooth, divergence, volume, verify.

Classify first. Choose second. Execute third. Verify last.

Divergence Theorem FAQ

What does the Divergence Theorem say?

The Divergence Theorem says that total outward flux through a closed surface equals the triple integral of the vector field’s divergence over the enclosed solid.

What is the formula for the Divergence Theorem?

If \(S=\partial E\) is oriented outward, then \(\iint_S\mathbf F\cdot\mathbf n\,dS=\iiint_E\nabla\cdot\mathbf F\,dV\), provided the theorem’s regularity assumptions hold.

Is the Divergence Theorem the same as Gauss’s Theorem?

Yes. The Divergence Theorem is also commonly called Gauss’s Divergence Theorem or Gauss’s Theorem.

Why must the surface be closed?

The theorem compares flux through the complete boundary of a solid with divergence throughout that solid. An open surface is not the entire boundary of a three-dimensional region.

Can the Divergence Theorem be used on an open surface?

Not directly. You can sometimes add a cap to create a closed surface, apply the theorem, and subtract the cap’s flux.

What does positive divergence mean?

Positive divergence means the vector field has positive local net expansion or source strength. It contributes positively to the total outward flux when integrated over a region.

What does negative divergence mean?

Negative divergence means the vector field has negative local net expansion, behaving like a local sink or compression.

Does zero divergence mean zero flux?

Zero divergence throughout a region implies zero net flux through its closed boundary only when the vector field satisfies the theorem’s hypotheses throughout the region. Interior singularities can invalidate that conclusion.

What is the difference between flux and divergence?

Flux is a surface total measuring flow across a surface. Divergence is a scalar field measuring local net expansion or compression at each point.

How do you know when to use the Divergence Theorem?

Look for a closed surface enclosing a volume, an outward-flux question, a vector field that is smooth inside, and a divergence that is easier to integrate than the original surface integrand.

What is the outward flux of F equals x y z through the sphere of radius two?

The divergence is \(3\), the enclosed volume is \(32\pi/3\), and the total outward flux is \(32\pi\).

How is the Divergence Theorem different from Stokes’ Theorem?

The Divergence Theorem converts flux through a closed surface into a triple integral of divergence. Stokes’ Theorem converts circulation around a boundary curve into a surface integral of curl.

How is the Divergence Theorem related to Green’s Theorem?

Both are boundary-to-interior theorems. Green’s Theorem works in the plane with a closed curve and a double integral, while the Divergence Theorem works in three dimensions with a closed surface and a triple integral.

Can a region with a cavity use the Divergence Theorem?

Yes. Every boundary component is included, and each normal points outward from the material region. On an inner cavity, that outward normal points into the cavity.

Why can a singularity make the Divergence Theorem fail?

The theorem requires the vector field to be continuously differentiable throughout a neighborhood of the enclosed region. A singularity violates that hypothesis and can carry nonzero flux even when the ordinary divergence is zero away from the singular point.

What is the flux of an inverse-square field through a sphere?

For \(\mathbf F=\langle x,y,z
angle/(x^2+y^2+z^2)^{3/2}\), the outward flux through any sphere centered at the origin is \(4\pi\). The field is singular at the origin, so the ordinary Divergence Theorem cannot be applied directly to the full ball.

How Do You Master the Divergence Theorem?

Master the theorem by connecting three ideas every time: closed boundary, outward flux, and accumulated divergence inside.

Private Calculus 3 and Vector Calculus Instruction

The
Woody Calculus Mastery Lab
is the required first step for students seeking structured help with vector fields, flux, surface integrals, Green’s Theorem, Stokes’ Theorem, the Divergence Theorem, and Calculus 3 exam preparation.

Limited
private instruction
is selective, normally requires weekly sessions, requires active Mastery Lab enrollment first, and is not guaranteed. Students and parents may use the
Woody Calculus contact page
to ask about the appropriate starting point.

About Brian M. Woody

Brian M. Woody is a professional mathematician, Private Professor, and former university mathematics lecturer with more than 25 years of university-level teaching experience.

His Calculus 3 teaching emphasizes formula memorization, visual intuition, geometric classification, orientation, clean notation, complete worked solutions, rewriting perfect setups, and saying each step out loud until the method becomes automatic.

Explore Brian’s
mathematical research and publications, including his
finite-field research on arXiv.

University Calculus 3 and Vector Calculus Help

Woody Calculus provides professor-led online support for students taking multivariable calculus, vector calculus, differential equations, and related university mathematics courses.

Visit the
university mathematics help hub
to explore additional university pages.

Woody Calculus Reviews

★★★★★

Read
Woody Calculus 5-star Google reviews
and view
Brian M. Woody’s 5.0 RateMyProfessors rating.

Students ready to build a stronger vector-calculus system can begin with the
Woody Calculus Mastery Lab on Skool.

Leave a Reply

Your email address will not be published. Required fields are marked *