Mathematics.

vector calculus

Divergence and Curl

Calculus III35 minDifficulty7 out of 10

You should know: vector fields

Overview

Divergence and curl are two scalar/vector operators that describe the local behavior of a vector field. Divergence div F = ∇·F is a scalar measuring how much a field 'spreads out' (sources) or 'converges' (sinks) at a point — how much flux flows out of an infinitesimal volume. Curl curl F = ∇×F is a vector measuring the field's local rotation or 'spin' at a point — the axis and strength of infinitesimal circulation. Together they are the local, differential versions of the flux and circulation integrals that Green's, Stokes', and the divergence theorems relate to global (integral) behavior.

Intuition

Imagine a vector field as the velocity of a flowing fluid. Divergence at a point measures whether fluid is being 'created' there (positive divergence — a source, like a faucet) or 'destroyed' (negative divergence — a sink, like a drain); zero divergence means fluid flows through without accumulating. Curl at a point measures whether a tiny paddle wheel dropped into the flow would spin — the direction of the curl vector is the wheel's spin axis (via the right-hand rule), and its magnitude is how fast it would spin.

Formal Definition

Definition

For a vector field F = ⟨P, Q, R⟩ in three dimensions:

divF=F=Px+Qy+Rz\operatorname{div}\mathbf F = \nabla\cdot\mathbf F = \frac{\partial P}{\partial x}+\frac{\partial Q}{\partial y}+\frac{\partial R}{\partial z}

A scalar function

Divergence
curlF=×F=(RyQz)i+(PzRx)j+(QxPy)k\operatorname{curl}\mathbf F = \nabla\times\mathbf F = \left(\frac{\partial R}{\partial y}-\frac{\partial Q}{\partial z}\right)\mathbf i + \left(\frac{\partial P}{\partial z}-\frac{\partial R}{\partial x}\right)\mathbf j + \left(\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}\right)\mathbf k

A vector function, computed as the formal 'determinant' of ∇ crossed with F

Curl
×F=det(ijk/x/y/zPQR)\nabla\times\mathbf F = \det\begin{pmatrix} \mathbf i & \mathbf j & \mathbf k \\ \partial/\partial x & \partial/\partial y & \partial/\partial z \\ P & Q & R \end{pmatrix}

Mnemonic device for computing curl

Curl as a symbolic determinant

Notation

NotationMeaning
divF=F\operatorname{div}\mathbf F = \nabla \cdot \mathbf FDivergence of F — a scalar field
curlF=×F\operatorname{curl}\mathbf F = \nabla \times \mathbf FCurl of F — a vector field
2f=(f)=2fx2+2fy2+2fz2\nabla^2 f = \nabla\cdot(\nabla f) = \frac{\partial^2 f}{\partial x^2}+\frac{\partial^2 f}{\partial y^2}+\frac{\partial^2 f}{\partial z^2}Divergence of the gradient — the Laplacian operator

Derivation

Divergence arises as a limit of outward flux per unit volume: consider a small box of volume ΔV around a point, and let Φ be the net outward flux of F through the box's surface. Divergence is defined as:

divF(P)=limΔV01ΔV(ΔV)FndS\operatorname{div}\mathbf F(P) = \lim_{\Delta V \to 0} \frac{1}{\Delta V}\oiint_{\partial(\Delta V)} \mathbf F \cdot \mathbf n\, dS

The 'flux density' at a point — this limit definition is equivalent to ∇·F and is exactly what the divergence theorem later formalizes

Proofs

curl(∇f) = 0 for any scalar function f (gradient fields are irrotational)
  1. f=(fx,fy,fz)\nabla f = \left(\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}, \frac{\partial f}{\partial z}\right)(Definition of gradient)
  2. (×f)1=y(fz)z(fy)=fzyfyz(\nabla\times\nabla f)_1 = \frac{\partial}{\partial y}\left(\frac{\partial f}{\partial z}\right) - \frac{\partial}{\partial z}\left(\frac{\partial f}{\partial y}\right) = f_{zy} - f_{yz}(First component of the curl determinant applied to P=fx, Q=fy, R=fz)
  3. fzy=fyz (Clairaut’s theorem, assuming continuous second partials)f_{zy} = f_{yz} \text{ (Clairaut's theorem, assuming continuous second partials)}(Mixed partial derivatives commute for smooth functions)
  4. Similarly, all three components of ×f vanish by the same argument\text{Similarly, all three components of } \nabla\times\nabla f \text{ vanish by the same argument}(Symmetric structure of the curl determinant applied to each pair of mixed partials)
  5. ×(f)=0\therefore \nabla \times (\nabla f) = \mathbf 0(All three components are zero)

Properties

Linearity of divergence

(aF+bG)=aF+bG\nabla\cdot(a\mathbf F+b\mathbf G) = a\,\nabla\cdot\mathbf F + b\,\nabla\cdot\mathbf G

Linearity of curl

×(aF+bG)=a×F+b×G\nabla\times(a\mathbf F+b\mathbf G) = a\,\nabla\times\mathbf F + b\,\nabla\times\mathbf G

Product rule (scalar times vector field)

(fF)=fF+fF\nabla\cdot(f\mathbf F) = f\,\nabla\cdot\mathbf F + \nabla f\cdot\mathbf F

3D conservative field test

F is conservative    ×F=0\mathbf F \text{ is conservative} \implies \nabla\times\mathbf F = \mathbf 0

Condition: The converse holds on simply connected domains (curl-free ⟺ conservative)

Incompressible flow

F=0    the fluid flow F is incompressible (no sources/sinks)\nabla\cdot\mathbf F = 0 \iff \text{the fluid flow } \mathbf F \text{ is incompressible (no sources/sinks)}

Theorems

Theorem 1: Curl of a gradient is zero
×(f)=0 for any twice continuously differentiable scalar function f\nabla \times (\nabla f) = \mathbf{0} \text{ for any twice continuously differentiable scalar function } f
Theorem 2: Divergence of a curl is zero
(×F)=0 for any twice continuously differentiable vector field F\nabla \cdot (\nabla \times \mathbf F) = 0 \text{ for any twice continuously differentiable vector field } \mathbf F

Applications

Maxwell's equations are stated entirely in terms of divergence and curl: ∇·E=ρ/ε₀ (Gauss's law), ∇×E=−∂B/∂t (Faraday's law), ∇·B=0, ∇×B=μ₀J+μ₀ε₀∂E/∂t (Ampère-Maxwell law).

3D Visualization

Compare fields with positive divergence (source), negative divergence (sink), and nonzero curl (rotation)

Loading visualization…

Animation

Animates a small paddle wheel and a small expanding/contracting bubble dropped at different points into an animated vector field — the paddle wheel's spin rate visualizes curl, and the bubble's growth or shrinkage visualizes divergence.

Worked Examples

  1. Divergence: sum ∂P/∂x + ∂Q/∂y + ∂R/∂z.

    F=y+z+x\nabla\cdot\mathbf F = y + z + x
  2. Curl: apply the determinant formula with P=xy, Q=yz, R=xz.

    ×F=((xz)y(yz)z)i+((xy)z(xz)x)j+((yz)x(xy)y)k\nabla\times\mathbf F = \left(\frac{\partial(xz)}{\partial y}-\frac{\partial(yz)}{\partial z}\right)\mathbf i + \left(\frac{\partial(xy)}{\partial z}-\frac{\partial(xz)}{\partial x}\right)\mathbf j + \left(\frac{\partial(yz)}{\partial x}-\frac{\partial(xy)}{\partial y}\right)\mathbf k
  3. Evaluate each component.

    =(0y)i+(0z)j+(0x)k=(y,z,x)= (0-y)\mathbf i + (0-z)\mathbf j + (0-x)\mathbf k = (-y,-z,-x)

Answer: div F = x+y+z; curl F = (−y, −z, −x)

Practice Problems

Difficulty 6/10

Compute div F for F(x,y,z) = ⟨x², y³, z⟩.

Difficulty 7/10

Compute curl F for F(x,y,z) = ⟨y, -x, 0⟩ (a pure rotation field around the z-axis).

Difficulty 6/10

A fluid has velocity field v=⟨x,-y,0⟩. Is the flow incompressible? Does it have any rotation?

Common Mistakes

Common Mistake

Confusing divergence (a scalar) with curl (a vector) — treating them as interchangeable measures of 'how much the field changes'.

Divergence measures outward flux/spreading (a single number at each point); curl measures rotation (a vector — axis and strength of spin). A field can have zero divergence but nonzero curl (pure rotation) or vice versa (pure expansion).

Common Mistake

Assuming a field with curl F=0 must be conservative on ANY domain.

curl F=0 (irrotational) implies conservative only on a SIMPLY CONNECTED domain (no holes). The classic counterexample is F=⟨-y,x⟩/(x²+y²) on ℝ²∖{origin}, which has curl 0 everywhere it's defined but is not conservative because the domain has a hole at the origin.

Common Mistake

Making sign errors in the curl determinant, especially in the j-component.

The j-component of the curl determinant carries an implicit minus sign from cofactor expansion: curl F's j-component is (∂P/∂z − ∂R/∂x), NOT (∂R/∂x − ∂P/∂z). Double-check this term specifically.

Quiz

Divergence of a vector field is:
curl(∇f) for any scalar function f equals:

Flashcards

1 / 4

Historical Background

Divergence and curl emerged from 19th-century fluid dynamics and electromagnetism. William Thomson (Lord Kelvin) and James Clerk Maxwell developed and named these operators in the 1850s-70s while formalizing field equations for electricity, magnetism, and fluid flow — Maxwell's equations are most compactly stated using div and curl. The term 'divergence' (for outward flux density) and 'curl' (for rotational tendency) were coined during this period, with Maxwell popularizing 'curl' specifically in his 1873 Treatise.

  1. 1830s-1840s

    Fluid dynamicists (Stokes, others) study rotational flow, laying groundwork for curl

    George Gabriel Stokes

  2. 1870s

    Maxwell names and popularizes 'curl' in his Treatise on Electricity and Magnetism, using it to write Maxwell's equations compactly

    James Clerk Maxwell

  3. 1880s-1890s

    Gibbs and Heaviside formalize modern vector calculus notation ∇· and ∇×

    Josiah Willard Gibbs, Oliver Heaviside

Summary

  • Divergence ∇·F is a scalar measuring outward flux density (sources/sinks); curl ∇×F is a vector measuring local rotation.
  • Divergence formula: ∂P/∂x+∂Q/∂y+∂R/∂z; curl formula: the symbolic determinant of ∇×F with i,j,k, ∂/∂x,∂/∂y,∂/∂z, and P,Q,R.
  • curl(∇f)=0 always (gradients are irrotational); div(curl F)=0 always (curl fields are source-free).
  • curl F=0 implies F is conservative only on simply connected domains — not in general.
  • Both operators are the local/differential counterparts of the global flux (divergence theorem) and circulation (Stokes'/Green's theorem) integrals.

References

  1. BookMaxwell, J.C. (1873). A Treatise on Electricity and Magnetism.