The Divergence Theorem
The divergence theorem says that the net flow of a vector field out through a closed boundary is bookkept exactly by the sources and sinks inside it: $\oint_C \mathbf{F}\cdot\mathbf{n}\,ds = \iint_A (\nabla\cdot\mathbf{F})\,dA$ in the plane (and the same with a surface and a volume in three dimensions). The left side adds up how much of the field pokes outward through every bit of the boundary; the right side adds up the divergence, the local rate at which the field is spreading out, over the whole interior. Drag the circle around a vector field and the two numbers stay locked together: wherever you draw the loop, the outflow through it equals the divergence enclosed. This is the mathematics behind Gauss's law, where the field is the electric field and the divergence is the charge density: the flux out of any closed surface counts the charge inside. The point-source field makes that exact, its flux is the same constant whenever the source is enclosed and zero when it is not.
WHAT TO TRY
- Drag the circle around the field: the outward flux and the area integral of the divergence stay equal wherever you put the loop and whatever its size.
- On the radial source the boundary is all red (everything flows out) and the flux equals two times the area; on the rotation field the boundary is half red and half blue and the flux is zero (no net outflow, no divergence).
- Switch to the point source and move the circle so it does or does not enclose the source: the flux jumps between a fixed value and zero, exactly as in Gauss's law.
- On the varying-divergence field, move the circle into the red (source) region and into the blue (sink) region and watch the flux change sign.