Divergence
Chapter 2 — Vector Calculus
The divergence of a vector field \(\vec{F}\) is a local measure of how much the field is spreading out (or converging) at a point. Its formal definition is flux-per-unit-volume:
\[(\vec{\nabla}\cdot\vec{F})(\vec{r}) = \lim_{V\to 0}\frac{1}{V}\oint_{\partial V} \vec{F}\cdot d\vec{A},\]
where the integral is over the closed surface bounding a tiny volume \(V\) centered at \(\vec{r}\). Shrinking the volume to zero makes this into a pointwise scalar field — the divergence.
Cartesian formula
Taking the limiting volume to be a little rectangular prism and Taylor-expanding the field across each pair of faces gives the workhorse formula,
\[\vec{\nabla}\cdot\vec{F} = \frac{\partial F_x}{\partial x} + \frac{\partial F_y}{\partial y} + \frac{\partial F_z}{\partial z}.\]
Notation-wise this is exactly the "dot product" of the vector operator \(\vec{\nabla} = (\partial_x,\partial_y,\partial_z)\) with the field \(\vec{F}\).
Physical picture
Think of \(\vec{F}\) as the velocity field of a fluid. Then:
- \(\vec{\nabla}\cdot\vec{F} > 0\) at a point means fluid is being created there (a source) — more leaves a small box than enters.
- \(\vec{\nabla}\cdot\vec{F} < 0\) means fluid is being destroyed (a sink).
- \(\vec{\nabla}\cdot\vec{F} = 0\) means the field is locally "incompressible" — whatever flows in flows back out.
Uniform fields have zero divergence
If \(\vec{F}\) is a constant vector, every partial derivative vanishes and \(\vec{\nabla}\cdot\vec{F} = 0\). Geometrically, every flux-in is canceled by an equal flux-out. This is why "uniform" and "divergence-free" so often go together.
Worked example
Let \(\vec{F}(x,y,z) = (x^2,\ 3xy,\ 2z)\). Compute \(\vec{\nabla}\cdot\vec{F}\).
\[\partial_x(x^2) = 2x,\quad \partial_y(3xy) = 3x,\quad \partial_z(2z) = 2.\]
So \(\vec{\nabla}\cdot\vec{F} = 2x + 3x + 2 = 5x + 2\). That's a scalar function of position — bigger where \(x\) is bigger, and equal to \(2\) on the plane \(x=0\).
Divergence of a Coulomb field (heads-up)
For \(\vec{E} = \frac{q}{4\pi\epsilon_0}\frac{\hat{r}}{r^2}\) — the point-charge field — a direct computation away from the origin gives \(\vec{\nabla}\cdot\vec{E} = 0\). Right at \(r=0\) the field blows up, and the divergence "hides" a delta-function spike there. This is consistent with Gauss's law: charge density is zero except at the point charge itself.
Practice Problems
Hint
Solution
\(\partial_x(y) = 0\), \(\partial_y(x) = 0\), \(\partial_z(z) = 1\).
Answer: \(\vec{\nabla}\cdot\vec{F} = 1\).
Hint
Solution
\(\partial_x(cy) = 0\), \(\partial_y(cx) = 0\), \(\partial_z(0) = 0\).
Answer: \(\vec{\nabla}\cdot\vec{F} = 0\).
Hint
Solution
\(\vec{\nabla}\cdot\vec{r} = 1+1+1 = 3\). The field is sourced uniformly everywhere — every tiny volume in space produces the same amount of outward flux per unit volume.
Answer: \(\vec{\nabla}\cdot\vec{r} = 3\).
Hint
Solution
\(\partial_x(x^2 y) = 2xy\), \(\partial_y(y^2 z) = 2yz\), \(\partial_z(z^2 x) = 2zx\). So \(\vec{\nabla}\cdot\vec{F} = 2(xy+yz+zx)\). At \((1,2,3)\): \(2(2+6+3) = 22\).
Answer: \(22\).
Hint
Solution
(a) \(0+0+0=0\). (b) \(1+1+0=2\). (c) \(\partial_x(\sin y)+\partial_y(\sin x)+0=0\).
Answer: only (b) has nonzero divergence; it equals \(2\) everywhere.
Hint
Solution
\(F_x = x/r^3\). By the product rule, \(\partial_x(x/r^3) = 1/r^3 + x\cdot(-3/r^4)\cdot(x/r) = 1/r^3 - 3x^2/r^5\). Summing the cyclic permutations: \(3/r^3 - 3(x^2+y^2+z^2)/r^5 = 3/r^3 - 3r^2/r^5 = 0\).
Answer: \(\vec{\nabla}\cdot(\hat{r}/r^2)=0\) for \(r>0\).