Divergence
Prerequisites: Vector Calculus. Full path (3 pages)
Intuitive
Divergence (div) is “flux density”—the amount of flux entering or leaving a point. Think of it as the rate of flux expansion (positive divergence) or flux contraction (negative divergence). If you measure flux in bananas (and c’mon, who doesn’t?), a positive divergence means your location is a source of bananas. You’ve hit the Donkey Kong jackpot.
Vector Calculus: Understanding Divergence by Kalid Azad
Concrete
For a vector field in Cartesian coordinates, the divergence is the scalar field
The coordinate-free definition is the outward flux per unit volume through the surface of a small region that shrinks to the point :
For a small box with sides , the flux through the two faces perpendicular to is . Adding the three pairs of faces and dividing by the volume gives the Cartesian formula.
Divergence theorem
Adding up the flux of many small boxes, the contributions of interior faces cancel and only the outer surface remains:
Examples
- has : the field points away from the origin everywhere and grows with distance.
- has : a pure rotation neither creates nor destroys flow.
- The Coulomb field has for , while its flux through any sphere around the origin is . All the divergence sits at the origin: .
In physics
- Gauss's law: , and (no magnetic charges). See the Maxwell equations.
- Conservation laws: a density with current density obeys the continuity equation . Integrated over a volume and combined with the divergence theorem, it says that the amount inside changes only by what flows through the surface.
- Incompressible flow: the velocity field of an incompressible fluid satisfies .
Curvilinear coordinates
In spherical coordinates with orthonormal components,
The extra factors account for the change of the area of the faces of a volume element with position. For the first term vanishes, which is the Coulomb result above.
- Vector Calculus: Understanding Divergence by Kalid Azad
- Another great discussion of the divergence in vector calculus can be found in Section 3 of Vol. 2 of Feynman's Lectures on Physics, which is available here
- No-Nonsense Electrodynamics by Jakob Schwichtenberg, section "Divergence"
Abstract
Defining the divergence requires only a volume form; no metric is needed. Let be an oriented -dimensional manifold with volume form and a vector field. The divergence of is the function defined by
By Cartan's formula and , this is . The Lie derivative describes how the flow of changes volumes, so
and a flow preserves volume if and only if is divergence-free. Liouville's theorem is the special case of a Hamiltonian vector field on phase space with the Liouville volume form .
Riemannian case
On a (pseudo-)Riemannian manifold one takes to be the metric volume form, in a positively oriented chart. Then
with the Levi-Civita connection. The spherical-coordinate formula of the Concrete layer is this expression with , after converting the coordinate components to orthonormal components. In the language of forms, (up to a sign that depends on dimension and signature), so the divergence is minus the codifferential acting on 1-forms.
Divergence theorem
For compact with boundary, Stokes' theorem applied to the -form gives
and in the Riemannian case restricted to equals with the outward unit normal. Together with the product rule , this shows that is the formal adjoint of the gradient with respect to the inner products on functions and vector fields, and that is the Laplace-Beltrami operator.
Why is it interesting?
The divergence is a crucial tool, for example, in electrodynamics. This can be seen immediately because the fundamental equations of electrodynamics (called Maxwell equations) contain the divergence of the electric and magnetic fields.