Gauss divergence theorem
Imagine trying to measure how much water is leaking out through the curved surface of a lumpy tank by directly integrating flow across every patch of that surface — six faces for a cube, an awkward curved cap for a hemisphere, endless piecing together. Gauss's divergence theorem offers a shortcut: instead of chasing flux around a closed surface, add up how much the vector field is "spreading out" at every point inside the solid it encloses. The two totals are guaranteed equal. This is the natural 3D sequel to Green's theorem in the MA10002 vector calculus unit, and the second of the three integral theorems — Green's, Gauss's, Stokes's — that close out the chapter. Below we state it precisely, see why it works, verify it on a sphere and a cube, and collect the traps that cost the most marks in exams.
The total outward flux of a vector field through a closed surface equals the total divergence integrated over the solid volume it encloses, turning hard surface computations into easier triple integrals.
The core idea
Let be a solid region in space bounded by a piecewise-smooth closed surface , oriented with outward unit normal . If has continuous first partial derivatives on an open region containing , Gauss's divergence theorem states:
where: is the divergence of , is a volume element, is a surface-area element, and denotes integration over the entire closed surface.
Why it is useful.
- Closed surfaces made of several pieces (spheres, capped cylinders, cubes) usually force you to add up several separate surface integrals if you attack the flux directly; the divergence theorem collapses all of that bookkeeping into one triple integral over the solid.
- If everywhere inside — a solenoidal field — the theorem instantly gives with no computation at all, since the volume integral of zero is zero.
- The direction also runs backwards: an awkward triple integral of a divergence can sometimes be replaced by an easier flux computation over the boundary, whichever side of the equation is simpler for the given problem.
Reading the physics. Divergence at a point measures how strongly the field is "spreading out" there — outward flux per unit volume, in the limit of a tiny box shrunk to that point. Gauss's theorem says that summing this local spreading-out over the whole solid must reproduce exactly the net flow crossing the outer boundary, because any flux leaving one small cell simply enters the neighbouring cell — those interior contributions cancel in pairs, leaving only the flux that crosses the outer skin .
Verify Gauss's divergence theorem
The goal is to confirm, by two entirely independent routes, that the theorem's two sides really do produce the same number for a concrete field and solid — the volume-integral side using over the ball, and the surface-integral side using an outward-normal flux computation over the sphere — so both must be carried through in full and compared, not just one side computed and assumed to match.
Step 1. Take and the solid ball of radius , boundary the sphere of radius . Compute the divergence first: , a constant.
Step 2. Evaluate the volume-integral side. Since the divergence is the constant throughout , , using the standard volume formula for a ball of radius .
Step 3. Evaluate the surface-integral side independently. On the sphere the outward unit normal is , because the position vector is itself perpendicular to a sphere centred at the origin. So , a constant value everywhere on .
Step 4. Integrate that constant over the sphere's area : . Both sides equal exactly, confirming the theorem on this solid and field.
Worked example
Problem. Use Gauss's divergence theorem to find the total outward flux of through the surface of the unit cube (lengths in metres).
Step 1. Compute the divergence: .
Step 2. Convert the flux into the triple integral guaranteed by the theorem: , avoiding six separate face computations.
Step 3. By symmetry of the cube, , so evaluate one term and triple it. For the term, , since the and integrations each contribute a factor of .
Step 4. Add the three equal contributions: .
The total outward flux through the surface of the cube is (SI flux units). A direct six-face computation would take considerably longer than this single triple integral.
Competitive stretch
If instead were evaluated over the same cube but you were only asked for the flux through the single face (not the closed surface), the divergence theorem would not apply directly — it needs the entire closed boundary. That flux must be computed as a standalone surface integral, , illustrating that the theorem's shortcut is only available once the full closed surface is in play.
Common traps
- Applying the theorem to a surface that is not closed — for example, only the curved part of a hemisphere without its flat disc base — Gauss's theorem needs the entire boundary , including any flat caps.
- Using an inward-pointing normal instead of the required outward normal, which flips the sign of the surface-integral side and gives instead of in a sphere-type check.
- Forgetting that must have continuous partial derivatives throughout the closed solid , not merely on its boundary — a field singular at an interior point (such as at the origin of a ball containing the origin) cannot be plugged in directly.
- Computing incorrectly by dotting components with the wrong variable — divergence is specifically , matching each component to its own coordinate, never mixing them.
Ask the tutor: Want to try the divergence theorem on a cylinder with caps, or check your own flux computation step by step?
Why does the divergence theorem work — what makes the interior contributions cancel?
Picture the solid chopped into many tiny cubes. Divergence measures the outward flux per unit volume across one tiny cube's own boundary. Any interior face is shared by two neighbouring cubes, and the outward direction for one cube is the inward direction for its neighbour, so the flux leaving one cell exactly cancels the flux entering the next. Summing divergence over every tiny cube therefore leaves only the faces that lie on the outer skin of the whole solid — which is precisely the closed surface . That is why the volume sum of local "spreading out" reproduces the total flux crossing the boundary.
Do I always have to compute both sides of the theorem in an exam question?
No — usually the theorem is a shortcut, not a check. If the question only asks for the flux through a closed surface, compute and evaluate the single triple integral; there is no need to also do the surface integral. You only compute both sides when the question explicitly says "verify" the theorem, as in the sphere example here, where the point is to show the two independently computed numbers agree.
What if the solid has a hole in it, like a solid cylinder with a smaller cylinder drilled out?
The theorem still applies, but the boundary must include every piece of the surface enclosing the actual solid region, oriented outward from the material — that means the outer cylindrical surface pointing away from the axis and the inner drilled surface pointing back toward the axis (into the hole), plus any flat annular caps. As long as has continuous partial derivatives throughout the solid material (the drilled-out region is excluded, so any singularity there does not matter), the volume integral over the material equals the flux through this full multi-piece boundary.