Ma · Mathematics

What Is a Divergence-Free Vector Field?

Published By the 9to5Science editorial team

At a glance

  1. 1. Compute the divergence

    Add the matching partial derivatives of the vector field’s components.

  2. 2. Set it equal to zero

    The field is divergence-free wherever this sum vanishes.

  3. 3. Interpret the result

    Zero divergence means no net local source or sink of the field.

  4. 4. Check flux when needed

    Use the divergence theorem to relate divergence to flux through closed surfaces.

A divergence-free vector field is a vector field whose divergence is zero throughout the region being considered. The condition describes the field locally: around every sufficiently small volume, the amount flowing in balances the amount flowing out.

For a vector field in three-dimensional Cartesian coordinates,

F(x,y,z)=⟨P(x,y,z),Q(x,y,z),R(x,y,z)⟩,\mathbf{F}(x,y,z)=\langle P(x,y,z),Q(x,y,z),R(x,y,z)\rangle,

its divergence is

div⁡F=∇⋅F=∂P∂x+∂Q∂y+∂R∂z.\operatorname{div}\mathbf{F}=\nabla\cdot\mathbf{F} =\frac{\partial P}{\partial x}+\frac{\partial Q}{\partial y}+\frac{\partial R}{\partial z}.

Therefore, F\mathbf{F} is divergence-free on a region DD precisely when

∇⋅F=0\nabla\cdot\mathbf{F}=0

at every point of DD.

Physical meaning of zero divergence

Think of a vector field as the velocity field of a fluid. Positive divergence at a point indicates local expansion: more fluid leaves a tiny region than enters it. Negative divergence indicates local compression or a sink. Zero divergence means there is no net creation, destruction, expansion, or compression of fluid at that point.

This is why divergence-free fields are often called solenoidal fields. In fluid mechanics, the velocity field of an incompressible fluid is commonly modeled as divergence-free. In electromagnetism, the magnetic field satisfies

∇⋅B=0,\nabla\cdot\mathbf{B}=0,

which expresses the absence of magnetic monopoles in the standard theory.

Zero divergence does not mean that the vector field itself is zero. A field can have large, rapidly varying vectors and still have zero divergence if the component derivatives cancel.

How to test a vector field

Use this procedure:

  1. Identify the three components PP, QQ, and RR.
  2. Differentiate PP with respect to xx, QQ with respect to yy, and RR with respect to zz.
  3. Add the three results.
  4. Check whether the sum is zero throughout the specified domain.

Worked example

Consider

F(x,y,z)=⟨2xy+z, x2−3y, 4z−2x⟩.\mathbf{F}(x,y,z)=\langle 2xy+z,\ x^2-3y,\ 4z-2x\rangle.

The relevant derivatives are

∂P∂x=2y,∂Q∂y=−3,∂R∂z=4.\frac{\partial P}{\partial x}=2y, \qquad \frac{\partial Q}{\partial y}=-3, \qquad \frac{\partial R}{\partial z}=4.

Thus,

∇⋅F=2y−3+4=2y+1.\nabla\cdot\mathbf{F}=2y-3+4=2y+1.

This is not zero everywhere, so the field is not divergence-free on R3\mathbb{R}^3. It happens to have zero divergence on the plane y=−12y=-\tfrac12, but that does not make it divergence-free on a three-dimensional region.

Now consider

G(x,y,z)=⟨yz, xz, xy⟩.\mathbf{G}(x,y,z)=\langle yz,\ xz,\ xy\rangle.

Then

∇⋅G=∂(yz)∂x+∂(xz)∂y+∂(xy)∂z=0+0+0=0.\begin{aligned} \nabla\cdot\mathbf{G} &=\frac{\partial (yz)}{\partial x} +\frac{\partial (xz)}{\partial y} +\frac{\partial (xy)}{\partial z}\\ &=0+0+0\\ &=0. \end{aligned}

Therefore, G\mathbf{G} is divergence-free everywhere in R3\mathbb{R}^3.

Divergence-free fields and flux

The divergence theorem states that, for a sufficiently smooth vector field and a solid region VV with outward-oriented boundary surface ∂V\partial V,

∬∂VF⋅n dS=∭V∇⋅F dV.\iint_{\partial V}\mathbf{F}\cdot\mathbf{n}\,dS =\iiint_V \nabla\cdot\mathbf{F}\,dV.

If ∇⋅F=0\nabla\cdot\mathbf{F}=0 throughout VV, then

∬∂VF⋅n dS=0.\iint_{\partial V}\mathbf{F}\cdot\mathbf{n}\,dS=0.

So the total outward flux through any closed surface surrounding a region is zero. This does not imply that the flux through each part of the surface is zero. One part may have positive outward flux while another has an equal negative flux.

For example, the constant field

F=⟨1,0,0⟩\mathbf{F}=\langle 1,0,0\rangle

is divergence-free. Through a closed box, the flux entering through the face with outward normal ⟨−1,0,0⟩\langle-1,0,0\rangle exactly cancels the flux leaving through the opposite face. The other four faces contribute zero.

Constructing divergence-free vector fields

A useful way to produce divergence-free fields is to take the curl of a sufficiently smooth vector potential A\mathbf{A}:

F=∇×A.\mathbf{F}=\nabla\times\mathbf{A}.

The identity

∇⋅(∇×A)=0\nabla\cdot(\nabla\times\mathbf{A})=0

guarantees that F\mathbf{F} is divergence-free wherever the required derivatives are continuous.

For instance, let

A(x,y,z)=⟨0,0,x2+y2⟩.\mathbf{A}(x,y,z)=\langle 0,0,x^2+y^2\rangle.

Then

∇×A=⟨2y,−2x,0⟩.\nabla\times\mathbf{A} =\left\langle 2y,-2x,0\right\rangle.

Checking directly,

∇⋅⟨2y,−2x,0⟩=∂(2y)∂x+∂(−2x)∂y+∂0∂z=0.\nabla\cdot\langle 2y,-2x,0\rangle =\frac{\partial(2y)}{\partial x} +\frac{\partial(-2x)}{\partial y} +\frac{\partial 0}{\partial z} =0.

In two dimensions, a similar construction uses a stream function. If ψ(x,y)\psi(x,y) is twice continuously differentiable, then

F=⟨∂ψ∂y,−∂ψ∂x⟩\mathbf{F}=\left\langle \frac{\partial\psi}{\partial y},-\frac{\partial\psi}{\partial x}\right\rangle

is divergence-free because

∇⋅F=∂2ψ∂x∂y−∂2ψ∂y∂x=0.\nabla\cdot\mathbf{F} =\frac{\partial^2\psi}{\partial x\partial y} -\frac{\partial^2\psi}{\partial y\partial x}=0.

The equality of the mixed partial derivatives is the reason for the cancellation.

Common mistakes

Differentiating with respect to the wrong variable

For F=⟨P,Q,R⟩\mathbf{F}=\langle P,Q,R\rangle, divergence uses Px+Qy+RzP_x+Q_y+R_z. It does not use all nine first partial derivatives; that collection belongs to the Jacobian matrix.

Confusing divergence with curl

Divergence is a scalar:

∇⋅F.\nabla\cdot\mathbf{F}.

Curl is a vector:

∇×F.\nabla\times\mathbf{F}.

A divergence-free field need not have zero curl, and a curl-free field need not be divergence-free. For example, ⟨−y,x,0⟩\langle-y,x,0\rangle has zero divergence but nonzero curl.

Checking only one point

A field is divergence-free on a region only if its divergence vanishes at every point in that region. Finding one point where the divergence is zero is not enough.

Applying the flux conclusion to an open surface

Zero total flux is guaranteed for closed surfaces under the divergence theorem. An open surface can have nonzero flux even when the field is divergence-free.

References

  1. OpenStax, Calculus Volume 3
  2. Vector Calculus, Linear Algebra, and Differential Forms: A Unified Approach, John Hubbard and Barbara Hubbard

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.