Let V be a region of space with closed surface A, and let n be the outward unit normal at each point of A. For a continuous, differentiable vector field p (reader 1.174):
∫V∇⋅pdV=∫An⋅pdA.
[1.76]
In words: the total source strength inside a region equals the total outflow through its boundary. The left side adds up the divergence, the net outflow per unit volume, over all the small volumes. The right side measures what actually crosses the surface.
Why it is true
Cut V into many small boxes. For each box, §1.4.3 showed that
net outflow through the box’s six faces≈∇⋅pdV.
Now add up all the boxes. On the left you get ∫V∇⋅pdV. On the right, look at any face insideV: it is shared by two neighbouring boxes, whose outward normals on that face point in opposite directions. What flows out of one box flows into the other, so the two contributions cancel exactly. The only faces without a partner are those on the outer surface A. Their contributions add up to ∫An⋅pdA. That is the whole proof; making “small boxes” rigorous is the job of an analysis course.
∫V∇⋅adV=3.677∮An⋅adA=3.676
Drag the corners or change the field: the two numbers stay equal. Red arrows leave the region, blue arrows enter it.
Interactive · drag the corners; switch fields; split into cells
Figure [1.16]: The divergence theorem in 2D (area instead of volume, boundary curve instead of surface). The area integral of ∇⋅a and the outward flux through the boundary, both computed numerically, agree for every rectangle and every field. Splitting into cells shows the internal edges cancelling.
A few things to try. With the rotation field both numbers are zero: what enters on one side leaves on the other. With uniform they are zero too, for a different reason: the field is constant, so every bit that enters leaves. With source both grow with the area of the rectangle, because the divergence is the same everywhere. With growing they depend on where you put the rectangle.
Worked example
Check the theorem for p=x on a ball of radius R centred at the origin.
Left: ∇⋅x=xi,i=δii=3, so ∫V3dV=3⋅34πR3=4πR3.
Right: on the sphere n=x/R, so n⋅x=∥x∥2/R=R, and ∫ARdA=R⋅4πR2=4πR3. ✓
The same calculation, read backwards, is a neat way to get the volume of a body from a surface integral: V=31∫An⋅xdA for any shape.
The tensor version
The theorem holds for tensor fields too (reader 1.175):
∫V∇⋅PdV=∫An⋅PdA.
[1.77]
Both sides are now vectors. The proof is the same box argument applied to each component: in index form the statement is ∫VPij,idV=∫AniPijdA, which for each fixed j is the vector theorem applied to the vector field with components Pij (index i). The pattern to remember: ∇ on the left becomes n on the right, in the same position. That pattern also holds for the gradient and the curl:
Take P=I (a constant tensor field) in [1.77]: ∫An⋅IdA=∫AndA, and ∇⋅I=0 because I does not depend on position. Physically: a uniform pressure on a closed body gives no net force. The normals of a closed surface always cancel.