The Physics Travel Guide

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 F⃗=(Fx,Fy,Fz)\vec F = (F_x, F_y, F_z) in Cartesian coordinates, the divergence is the scalar field

∇⋅F⃗=∂Fx∂x+∂Fy∂y+∂Fz∂z.\nabla\cdot\vec F = \frac{\partial F_x}{\partial x} + \frac{\partial F_y}{\partial y} + \frac{\partial F_z}{\partial z} .

The coordinate-free definition is the outward flux per unit volume through the surface ∂V\partial V of a small region VV that shrinks to the point pp:

(∇⋅F⃗)(p)=lim⁡V→p1∣V∣∮∂VF⃗⋅dA⃗.(\nabla\cdot\vec F)(p) = \lim_{V \to p} \frac{1}{|V|} \oint_{\partial V} \vec F\cdot d\vec A .

For a small box with sides dx,dy,dzdx, dy, dz, the flux through the two faces perpendicular to xx is [Fx(x+dx)−Fx(x)]dy dz≈∂Fx∂x dx dy dz\left[F_x(x+dx) - F_x(x)\right] dy\, dz \approx \frac{\partial F_x}{\partial x}\, dx\, dy\, dz. 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:

∫V∇⋅F⃗  dV=∮∂VF⃗⋅dA⃗.\int_V \nabla\cdot\vec F \; dV = \oint_{\partial V} \vec F\cdot d\vec A .

Examples

In physics

Curvilinear coordinates

In spherical coordinates (r,θ,φ)(r, \theta, \varphi) with orthonormal components,

∇⋅F⃗=1r2∂∂r(r2Fr)+1rsin⁡θ∂∂θ(sin⁡θ Fθ)+1rsin⁡θ∂Fφ∂φ.\nabla\cdot\vec F = \frac{1}{r^2}\frac{\partial}{\partial r}\left( r^2 F_r \right) + \frac{1}{r\sin\theta}\frac{\partial}{\partial\theta}\left( \sin\theta\, F_\theta \right) + \frac{1}{r\sin\theta}\frac{\partial F_\varphi}{\partial\varphi} .

The extra factors account for the change of the area of the faces of a volume element with position. For Fr=1/r2F_r = 1/r^2 the first term vanishes, which is the Coulomb result above.

Abstract

Defining the divergence requires only a volume form; no metric is needed. Let MM be an oriented nn-dimensional manifold with volume form μ\mu and XX a vector field. The divergence of XX is the function defined by

LXμ=(div⁡μX) μ.\mathcal{L}_X \mu = (\operatorname{div}_\mu X)\, \mu .

By Cartan's formula LX=d ιX+ιXd\mathcal{L}_X = d\,\iota_X + \iota_X d and dμ=0d\mu = 0, this is d(ιXμ)=(div⁡μX) μd(\iota_X \mu) = (\operatorname{div}_\mu X)\, \mu. The Lie derivative describes how the flow φt\varphi_t of XX changes volumes, so

ddt∫φt(U)μ=∫φt(U)(div⁡μX) μ,\frac{d}{dt}\int_{\varphi_t(U)} \mu = \int_{\varphi_t(U)} (\operatorname{div}_\mu X)\, \mu ,

and a flow preserves volume if and only if XX is divergence-free. Liouville's theorem is the special case of a Hamiltonian vector field on phase space with the Liouville volume form ωn/n!\omega^n/n!.

Riemannian case

On a (pseudo-)Riemannian manifold one takes μ\mu to be the metric volume form, μ=∣g∣ dx1∧⋯∧dxn\mu = \sqrt{|g|}\, dx^1\wedge\dots\wedge dx^n in a positively oriented chart. Then

div⁡X=1∣g∣ ∂μ(∣g∣ Xμ)=∇μXμ,\operatorname{div} X = \frac{1}{\sqrt{|g|}}\, \partial_\mu\left( \sqrt{|g|}\, X^\mu \right) = \nabla_\mu X^\mu ,

with ∇\nabla the Levi-Civita connection. The spherical-coordinate formula of the Concrete layer is this expression with g=r2sin⁡θ\sqrt{g} = r^2\sin\theta, after converting the coordinate components XμX^\mu to orthonormal components. In the language of forms, div⁡X=⋆ d⋆X♭\operatorname{div} X = \star\, d \star X^\flat (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 MM with boundary, Stokes' theorem applied to the (n−1)(n-1)-form ιXμ\iota_X\mu gives

∫M(div⁡μX) μ=∫Md(ιXμ)=∫∂MιXμ,\int_M (\operatorname{div}_\mu X)\, \mu = \int_M d(\iota_X\mu) = \int_{\partial M} \iota_X \mu ,

and in the Riemannian case ιXμ\iota_X\mu restricted to ∂M\partial M equals g(X,N) μ∂Mg(X, N)\, \mu_{\partial M} with NN the outward unit normal. Together with the product rule div⁡(fX)=fdiv⁡X+X(f)\operatorname{div}(fX) = f\operatorname{div} X + X(f), this shows that −div⁡-\operatorname{div} is the formal adjoint of the gradient with respect to the L2L^2 inner products on functions and vector fields, and that div⁡grad⁡\operatorname{div}\operatorname{grad} 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.

Path to this page

  1. Calculus
  2. Linear Algebra
  3. Vector Calculus