Introduction

The calculation showing that divergence measures flow out of a loop can be done for a box-shaped loop instead of a circle. When two boxes are glued side-by-side, flow out of one box and into the other contributes positively to the line integral around the first box, and negatively to the line integral around the second box, so these contributions cancel in the sum. By subdividing a region into infinitesimal boxes, writing for the total flow out of each box, summing the flow across all the box walls, and observing the inner cancellation of adjacent boxes, one obtains the divergence theorem:

Divergence Theorem

When is a region of the -plane enclosed by its boundary curve , then:

The way to think about this theorem is that measures local expansion of a fluid that is flowing with velocity vectors . Then measures the total expansion of fluid in the region . The theorem says that the total expansion in must exactly match the total egress of fluid from the region by flowing across the boundary . Net expansion exactly matches net outflow.

When in a region, then is said to be divergence free. An incompressible fluid flowing in a closed container is divergence free. This concept is the analogue of being conservative, with replaced by . Here is one mathematical application. For a divergence-free field, the flux between points and can be calculated using any path from to and does not depend on the chosen path. The reason is that any two paths create a loop, and the total flux across the loop is zero, so the flux into the loop on one side (the first path) equals the flux out of the loop on the other side (the second path). This is an analogue of path independence but for “across” line integrals instead of “aligned” line integrals.