The Divergence Theorem

Chapter 5: Integral Theorems of Vector Calculus

Learning objectives

  • State the Divergence Theorem precisely, including orientation conventions
  • Apply it to convert flux integrals to volume integrals (and vice versa)
  • Read the theorem as a statement of conservation
  • Recognise it as Gauss's law in disguise
Vector Field VisualizerInteractive figure — enable JavaScript to interact.

The Divergence Theorem is the cleanest statement in vector calculus of "local sources accumulate to global flux." If a vector field has a positive divergence at every point of a region — meaning every point is a tiny source — then the total outward flux through the boundary equals the sum of all those local sources. The theorem unifies a dozen apparently distinct facts in physics: Gauss's law in electrostatics, conservation of mass in fluid flow, heat conservation in thermodynamics. Once you see the pattern, you stop re-deriving these for each application and just invoke the theorem.

Statement of the theorem

Let VV be a bounded region in R3\mathbb{R}^3 whose boundary S=VS = \partial V is a piecewise smooth, closed, orientable surface, oriented by the outward unit normal. Let F\mathbf{F} be a C1C^1 vector field defined on a neighbourhood of VV. Then

SFdS  =  VFdV.\iint_{S} \mathbf{F} \cdot d\mathbf{S} \;=\; \iiint_{V} \nabla \cdot \mathbf{F}\, dV.

The left side is the flux of F\mathbf{F} outward through SS. The right side accumulates the source density F\nabla\cdot\mathbf{F} over the enclosed volume.

Why it is a conservation law

If F\mathbf{F} is the mass-flux density of a fluid (mass per area per time crossing a surface), then F\nabla\cdot\mathbf{F} at a point gives the rate at which mass is being produced per unit volume there. The Divergence Theorem says: total production inside = total escape across the boundary. If nothing is created or destroyed (F=0\nabla\cdot\mathbf{F}=0), then the net flux through every closed surface is zero. That is conservation of mass written in three lines.

Gauss's law as a corollary

Apply the theorem to the electric field E\mathbf{E}. Maxwell's first equation in differential form is E=ρ/ε0\nabla\cdot\mathbf{E} = \rho/\varepsilon_0 (charge density divided by permittivity). The Divergence Theorem gives

SEdS=1ε0VρdV=Qencε0,\iint_{S} \mathbf{E}\cdot d\mathbf{S} = \dfrac{1}{\varepsilon_0}\iiint_V \rho\, dV = \dfrac{Q_{\text{enc}}}{\varepsilon_0},

which is Gauss's law: the flux through a closed surface is the enclosed charge divided by ε0\varepsilon_0. The reason Gauss's law makes problems with spherical or cylindrical symmetry so easy is that you trade a surface integral (hard) for a volume integral of a density (easy).

(The standard way to internalise the theorem is to compute it both ways on a simple region — a cube or a ball — and check the answers agree. Two such examples appear below.)

Pause and think: If a vector field F\mathbf{F} has F=0\nabla\cdot\mathbf{F}=0 everywhere, what does the Divergence Theorem tell you about the flux through ANY closed surface? Does the shape of the surface matter?

Try it

  • Predict, then verify: for F=(x,y,z)\mathbf{F}=(x,y,z) and VV the unit ball, compute both sides of the theorem. (Both should equal 4π4\pi.) On the surface, the outward normal at (x,y,z)(x,y,z) on the unit sphere is (x,y,z)(x,y,z) itself, so Fn^=1\mathbf{F}\cdot\hat{n} = 1.
  • For F=(x,2y,3z)\mathbf{F}=(x, 2y, 3z) on the unit cube [0,1]3[0,1]^3, predict the flux without integrating over six faces. (Use the theorem: F=6\nabla\cdot\mathbf{F}=6 on a unit volume gives flux 66.)
  • Show that F=(y,x,0)\mathbf{F}=(y,-x,0) has F=0\nabla\cdot\mathbf{F}=0. Conclude that its flux through any closed surface is zero. Interpret physically.
  • True or false: the Divergence Theorem can be applied to a region with a hole (e.g., a thick spherical shell). If true, what does the formula look like? (Hint: the boundary has two components; orient the inner one carefully.)

A trap to watch for

Orientation. The theorem requires the outward normal. If you use the inward normal you flip the sign of the entire flux integral and get a wrong answer. When the region has multiple boundary components (a hollow ball, say), the outer surface gets outward orientation and the inner one gets inward orientation relative to the original region — equivalently, outward relative to the hole. Get the signs wrong and Gauss's law gives Q/ε0-Q/\varepsilon_0.

What you now know

You can state and apply the Divergence Theorem, recognise it in Gauss's law and the continuity equation, and avoid the orientation trap. Next, Stokes' Theorem (§5.3) gives the curl-and-circulation analogue.

References

  • Garrity, T. (2002). All the Mathematics You Missed. Cambridge University Press, ch. 5.
  • Marsden, J. E., Tromba, A. J. (2011). Vector Calculus (6th ed.). W. H. Freeman.
  • Schey, H. M. (2004). Div, Grad, Curl, and All That (4th ed.). W. W. Norton.
  • Griffiths, D. J. (2017). Introduction to Electrodynamics (4th ed.). Cambridge UP, ch. 2 (Gauss's law).
  • Spivak, M. (1965). Calculus on Manifolds. W. A. Benjamin.

This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.