The Divergence Theorem

The divergence theorem (Gauss's theorem) is the last and grandest of the boundary laws. It says the total flux of a field out through a closed surface equals the integral of its divergence over the solid it encloses.

\oiint_{S} \mathbf{F} \cdot d\mathbf{S} = \iiint_{E} (\nabla \cdot \mathbf{F})\, dV.

Here E is a solid region, S = \partial E is its closed boundary surface, and \mathbf{n} is the outward normal. Read it as: the net flow leaving a region equals the sum of all the little sources inside it. Whatever the triple integral of source density adds up to, exactly that much must escape across the skin.

Verifying both sides: the radial field out of a cube

Take \mathbf{F} = (x,\ y,\ z) — the outward explosion field — and let E be the unit cube [0,1] \times [0,1] \times [0,1].

Right side — the volume integral (the easy one)

Step 1 — the divergence. As computed on the divergence-and-curl page,

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

Step 2 — integrate the constant over the cube. A constant times the volume:

\iiint_E 3\, dV = 3 \cdot \operatorname{vol}(E) = 3 \cdot 1 = 3.

Left side — the flux through all six faces (the honest one)

Step 3 — handle one pair of faces. On the face x = 1 the outward normal is \mathbf{n} = (1,0,0), so \mathbf{F} \cdot \mathbf{n} = x = 1; integrated over that unit face gives flux 1. On the opposite face x = 0 the outward normal is (-1,0,0) and \mathbf{F} \cdot \mathbf{n} = -x = 0; flux 0. The x-pair contributes 1 + 0 = 1.

Step 4 — by symmetry, the other two pairs match. The y-faces give 1 and the z-faces give 1, by the identical argument with y or z in place of x.

Step 5 — total the flux.

\oiint_S \mathbf{F} \cdot d\mathbf{S} = \underbrace{1}_{x\text{-pair}} + \underbrace{1}_{y\text{-pair}} + \underbrace{1}_{z\text{-pair}} = 3.

Step 6 — compare. Both sides equal 3. Six separate face integrals collapse into a single line of volume integration — the theorem turns a boundary tally into an interior one.

The volume side never cares about the shape: for any solid E, \mathbf{F} = (x,y,z) gives \iiint_E 3\, dV = 3\,\operatorname{vol}(E). Take the unit ball, \operatorname{vol} = \tfrac{4}{3}\pi, so the flux must be 3 \cdot \tfrac{4}{3}\pi = 4\pi. Check it directly: on the unit sphere the outward normal is \mathbf{n} = (x, y, z) itself (the radial direction), so \mathbf{F} \cdot \mathbf{n} = x^2 + y^2 + z^2 = 1 on the surface, and the flux is \iint_S 1\, dS = \operatorname{area} = 4\pi(1)^2 = 4\pi. The two routes agree — and the volume route was effortless.

The physical reading: sources inside, flow out

Shrink E to a tiny box around a point. The theorem becomes the definition of divergence: \nabla \cdot \mathbf{F} is the flux per unit volume escaping an infinitesimal region. Sum those local outflows over a large region and the interior contributions cancel across every shared internal wall — flow leaving one cell enters its neighbour — leaving only the flux across the true outer boundary. That telescoping cancellation is the divergence theorem.

Let E be a solid region whose boundary S = \partial E is a piecewise-smooth closed surface oriented by the outward normal, and let \mathbf{F} have continuous partial derivatives on an open set containing E. Then:

Four theorems, one shape. Each equates something on a boundary to something in the interior:

They are one statement in the language of differential forms — the generalised Stokes' theorem,

\int_{\partial \Omega} \omega = \int_{\Omega} d\omega,

where d is the exterior derivative and \partial \Omega the boundary of \Omega. "The integral of a derivative over a region equals the integral of the original over the boundary" — the FTC made dimension-blind.

Gauss's law of electrostatics. The electric flux out of a closed surface equals the enclosed charge over \varepsilon_0. Applying the divergence theorem to \oiint_S \mathbf{E} \cdot d\mathbf{S} = Q_{\text{enc}}/\varepsilon_0 turns the global statement into Maxwell's local one,

\nabla \cdot \mathbf{E} = \frac{\rho}{\varepsilon_0}.

The continuity equation. If \rho is a density flowing with current \mathbf{J}, "matter is neither created nor destroyed" says the rate a region loses mass equals the flux out of its surface. The divergence theorem converts that integral balance into the pointwise conservation law

\frac{\partial \rho}{\partial t} + \nabla \cdot \mathbf{J} = 0.

In both, the theorem is the bridge from an integral law you can measure to a differential law you can solve.

See it: outward normals over a field

A 2-D slice (where the theorem reads \oint_{\partial D} \mathbf{F} \cdot \mathbf{n}\, ds = \iint_D (\nabla \cdot \mathbf{F})\, dA). The radial field \mathbf{F} = (x, y) has \nabla \cdot \mathbf{F} = 2; a circular region of radius R carries outward normals all around its rim. As you grow R, the boundary flux and the enclosed 2 \cdot \pi R^2 track each other exactly.