Divergence: How Much Does a Field Spread Out?

Divergence: How Much Does a Field Spread Out?
Divergence: How Much Does a Field Spread Out? | Ideasthesia

Divergence measures how much a vector field spreads out or converges at each point. It's a single number (a scalar) that tells you whether the field is flowing away from a point (positive divergence), flowing toward it (negative divergence), or staying neutral (zero divergence).

The formula in Cartesian coordinates is simple. For a vector field F = (P, Q, R):

∇ · F = ∂P/∂x + ∂Q/∂y + ∂R/∂z

You take the partial derivative of each component with respect to its corresponding coordinate and add them up. That's divergence.

But the formula is less important than the geometric intuition: divergence measures sources and sinks. Where is the field being created? Where is it being destroyed? Divergence is the detector.

The Geometric Picture

Imagine a tiny box around a point. Look at the vector field on the boundary of that box. Is more field flowing out than in? Then divergence is positive—the point is a source.

Is more flowing in than out? Then divergence is negative—the point is a sink.

Is the flow balanced? Then divergence is zero—the point is neither source nor sink.

Shrink the box to infinitesimal size. Divergence is the limit of (flux out - flux in) / volume as the box shrinks to a point.

This is why divergence is ∂P/∂x + ∂Q/∂y + ∂R/∂z. Each term measures how much that component changes in its direction. If ∂P/∂x > 0, the x-component is increasing as you move in the x-direction—field is spreading in that direction. Sum over all three directions, and you get total spreading.

Physical Interpretations

Fluid flow: If F is the velocity field of a fluid, ∇ · F is the rate of volume expansion. Positive divergence means fluid is being created (sources). Negative means it's being destroyed (sinks). Zero divergence means incompressible flow—what comes in goes out.

Electrostatics: If F is the electric field, ∇ · F = ρ/ε₀ (Gauss's law in differential form). Divergence equals the charge density. Positive charges are sources of electric field. Negative charges are sinks.

Heat flow: If F is the heat flux, ∇ · F is the rate of heat accumulation. Positive divergence means heat is building up (a source). Negative means heat is leaving (a sink).

General: Divergence is the infinitesimal version of flux. It's local flux density—flux per unit volume at a point.

Example: Radial Field

Consider F(x, y, z) = (x, y, z), a field pointing radially outward from the origin.

∇ · F = ∂x/∂x + ∂y/∂y + ∂z/∂z = 1 + 1 + 1 = 3

Divergence is 3 everywhere. The field is spreading uniformly in all directions.

Now consider F = (x, y, z) / (x² + y² + z²)^(3/2), the field that falls off as 1/r².

This is the electric field of a point charge at the origin (up to constants). Away from the origin, the divergence is zero—you can verify this by computing the partials. But at the origin, there's a singularity, and the divergence is infinite (or more precisely, a delta function).

This matches the physical picture: a point charge creates a field with divergence concentrated at the charge location.

Divergence-Free Fields

A field with ∇ · F = 0 everywhere is called divergence-free or solenoidal.

Examples:

  • Incompressible fluid flow
  • Magnetic fields (∇ · B = 0 always, because there are no magnetic monopoles)
  • Rotating fields like F = (-y, x, 0)

Divergence-free fields have no sources or sinks. Field lines neither begin nor end—they either form closed loops or extend to infinity.

For magnetic fields, this is why field lines always form closed loops. Since ∇ · B = 0, there are no endpoints where lines could start or stop.

The Divergence Theorem

The divergence theorem (also called Gauss's theorem) is the fundamental theorem for divergence:

∫∫∫_V (∇ · F) dV = ∫∫_S F · dS

The volume integral of divergence over a region equals the surface integral of F over the boundary.

This connects local and global: adding up all the infinitesimal sources and sinks in a volume gives the net flux out of the surface.

It's the 3D analogue of the fundamental theorem of calculus. Instead of ∫ f' = f(b) - f(a), you have ∫∫∫ (∇ · F) = ∫∫_boundary F.

The theorem transforms volume integrals into surface integrals or vice versa, often simplifying calculations. It also reveals conservation laws: if ∇ · F = 0, then flux through any closed surface is zero.

Computing Divergence

In Cartesian coordinates, it's straightforward:

F = (P, Q, R) ∇ · F = ∂P/∂x + ∂Q/∂y + ∂R/∂z

Example: F = (x², 3y, -z³)

∇ · F = ∂(x²)/∂x + ∂(3y)/∂y + ∂(-z³)/∂z = 2x + 3 - 3z²

That's a scalar field (depends on position). Divergence is different at every point.

In other coordinate systems (cylindrical, spherical), the formula is more complicated because the basis vectors change with position.

Cylindrical (r, θ, z): ∇ · F = (1/r) ∂(rF_r)/∂r + (1/r) ∂F_θ/∂θ + ∂F_z/∂z

Spherical (r, θ, φ): ∇ · F = (1/r²) ∂(r²F_r)/∂r + (1/(r sin φ)) ∂(sin φ F_φ)/∂φ + (1/(r sin φ)) ∂F_θ/∂θ

These formulas account for the curvature of the coordinate system. They're messier but necessary for fields with spherical or cylindrical symmetry.

Divergence as a Limit

The rigorous definition of divergence is:

∇ · F = lim_{V → 0} (1/V) ∫∫_S F · dS

where S is the boundary of a small volume V around the point, and the limit is taken as V shrinks to the point.

This is "flux per unit volume" in the infinitesimal limit. It's coordinate-independent and captures the geometric meaning directly.

The Cartesian formula ∂P/∂x + ∂Q/∂y + ∂R/∂z is a consequence of this definition, derived by taking the limit of flux through a tiny box.

Conservation Laws

Divergence appears in every conservation law in physics.

Mass conservation (continuity equation): ∂ρ/∂t + ∇ · (ρv) = 0

where ρ is density and v is velocity. The rate of change of density equals the negative divergence of mass flux. If mass is flowing out (positive divergence of ρv), density decreases.

Charge conservation: ∂ρ/∂t + ∇ · J = 0

where ρ is charge density and J is current density. Charge can't be created or destroyed, so the rate of change of charge equals the negative divergence of current.

Energy conservation, momentum conservation, etc.—all have the same structure. The divergence of a flux equals the negative rate of change of the corresponding density.

This is why divergence is fundamental. It's the mathematical expression of the idea that "what flows out must come from somewhere."

Divergence and Compressibility

In fluid dynamics, incompressibility means ∇ · v = 0.

Compressible fluids have ∇ · v ≠ 0. Positive divergence means the fluid is expanding (density decreasing). Negative divergence means it's compressing (density increasing).

For gases, compressibility matters. For liquids (approximately incompressible), ∇ · v ≈ 0 is a good approximation.

The incompressibility condition simplifies the Navier-Stokes equations enormously. It's a constraint that the velocity field must satisfy everywhere.

Relationship to Gradient

Divergence takes a vector field and produces a scalar field. Gradient takes a scalar field and produces a vector field. They're not inverses, but they're related.

For any twice-differentiable scalar function φ:

∇ · (∇φ) = ∇²φ

where ∇² is the Laplacian. The divergence of the gradient is the Laplacian—a scalar differential operator that appears everywhere in physics.

The Laplacian measures curvature. In the heat equation, ∇²T describes how temperature diffuses. In quantum mechanics, ∇²ψ appears in the Schrödinger equation. In electrostatics, ∇²φ = -ρ/ε₀ is Poisson's equation.

Divergence and gradient together build the Laplacian, which is one of the most important operators in mathematical physics.

Divergence and Curl

Divergence measures spreading. Curl measures rotation. They're orthogonal concepts—divergence doesn't detect rotation, and curl doesn't detect spreading.

A key identity: for any vector field F that's the curl of another field (F = ∇ × G):

∇ · F = 0

The divergence of a curl is always zero. This is an algebraic identity, provable from the definition of curl and divergence.

Why? Because curl produces rotating fields, which have no sources or sinks. Field lines form closed loops, so divergence is zero.

Conversely, if ∇ · F = 0, then (under suitable conditions) F = ∇ × G for some G. Divergence-free fields are curls.

This is the foundation of the Helmholtz decomposition: any vector field can be split into a curl-free part (gradient of a scalar) and a divergence-free part (curl of a vector).

Divergence in Maxwell's Equations

Two of Maxwell's equations are divergence equations:

∇ · E = ρ/ε₀ (Gauss's law) ∇ · B = 0 (no magnetic monopoles)

The first says electric field has divergence proportional to charge density. Charges are sources of electric field.

The second says magnetic field has zero divergence everywhere. No magnetic charges exist (as far as we know), so magnetic field lines never start or stop—they always loop back on themselves.

These two equations, combined with the curl equations (Faraday's law and Ampère-Maxwell law), completely determine electromagnetic fields.

Divergence is half of the structure. Curl is the other half. Together, they describe electromagnetism.

Visualizing Divergence

How do you see divergence in a vector field plot?

Look for regions where field lines spread apart (positive divergence) or converge (negative divergence).

In a radial field, lines emanate from a central point—that point has positive divergence.

In a sink, lines converge to a point—negative divergence.

In a uniform flow or a rotating field, lines are parallel or circular—zero divergence.

Field line density also reflects divergence. Where lines spread out, density decreases and divergence is positive. Where lines come together, density increases and divergence is negative.

Why Divergence Matters

Divergence is one of the three core differential operators in vector calculus (along with gradient and curl). It appears in:

  • Every conservation law (mass, charge, energy, momentum)
  • Maxwell's equations (two of four are divergence equations)
  • Fluid dynamics (incompressibility and compressibility)
  • The divergence theorem (fundamental theorem connecting local and global)
  • Helmholtz decomposition (splitting fields into parts)

Without divergence, you can't describe sources and sinks. You can't write conservation laws. You can't formulate field theories.

It's not just a computational tool. It's a conceptual primitive—one of the basic ways fields can behave. Fields can spread (divergence), rotate (curl), or have gradients (change in scalar potential). Those three operators capture the fundamental types of field structure.

Understanding divergence geometrically—what it measures, why it appears in conservation laws, how it connects to flux—is essential for understanding vector calculus and the physics it describes.

Next, we'll cover curl, the operator that measures rotation. Together with divergence and gradient, curl completes the trinity of differential operators that define vector calculus.


Part 5 of the Vector Calculus series.

Previous: Surface Integrals: Integrating Over Surfaces Next: Curl: How Much Does a Field Rotate?