01 / 21

Divergence
of Vector Fields

Learn to compute divergence and understand how it measures the rate of expansion or compression of a vector field at every point in space.

Multivariable Calculus

What Is a Vector Field?

A vector field assigns a vector to every point in a region of space. Think of wind patterns on a weather map: at each location, there is a direction and magnitude of the wind.

Radial outward field: positive divergence

The Intuition Behind Divergence

Divergence measures how much a vector field spreads out or compresses at a given point. Imagine placing a tiny balloon in a flowing fluid:

Positive Divergence
The balloon expands: fluid flows outward from the point. This is a source.
Negative Divergence
The balloon shrinks: fluid flows inward toward the point. This is a sink.
Zero Divergence
The balloon stays the same size: the flow is incompressible at that point.

Why Divergence Matters

Divergence appears in the most fundamental laws of physics and engineering. It connects local behavior of a field to global behavior over a region.

1
Fluid dynamics: Divergence tells you whether fluid is being created or destroyed at a point (conservation of mass).
2
Electromagnetism: Gauss's law states \(\nabla \cdot \mathbf{E} = \frac{\rho}{\varepsilon_0}\), linking electric field divergence to charge density.
3
Heat transfer: The divergence of heat flux reveals where thermal energy accumulates or dissipates.
4
Divergence Theorem: Connects a volume integral of divergence to a surface integral of flux: one of the great theorems of vector calculus.

The Divergence Formula

For a vector field \(\mathbf{F} = \langle P,\, Q \rangle\) in two dimensions, the divergence is:

For a 3D field \(\mathbf{F} = \langle P,\, Q,\, R \rangle\):

The symbol \(\nabla\) is the del operator: \(\nabla = \left\langle \frac{\partial}{\partial x},\, \frac{\partial}{\partial y},\, \frac{\partial}{\partial z} \right\rangle\). Divergence is the dot product of \(\nabla\) with \(\mathbf{F}\).

Visualizing the Del Operator

\(\nabla\) (del)
\(\partial/\partial x\)
\(\partial/\partial y\)
\(\partial/\partial z\)
·
\(\mathbf{F}\)
\(P(x,y,z)\)
\(Q(x,y,z)\)
\(R(x,y,z)\)
= scalar
\(\frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y} + \frac{\partial R}{\partial z}\)
Divergence: a scalar at each point

Divergence vs Curl

Both divergence and curl use the del operator \(\nabla\), but they measure fundamentally different things about a vector field.

Divergence \(\nabla \cdot \mathbf{F}\) Curl \(\nabla \times \mathbf{F}\)
Operation Dot product Cross product
Output Scalar field Vector field
Measures Expansion / compression Rotation / swirling
Analogy Source or sink Whirlpool or vortex
Dimension 2D and 3D Primarily 3D

How to Compute Divergence

1
Identify the components. Write \(\mathbf{F} = \langle P,\, Q,\, R \rangle\) and confirm which variable each component depends on.
2
Take partial derivatives. Compute \(\frac{\partial P}{\partial x}\), \(\frac{\partial Q}{\partial y}\), and (if 3D) \(\frac{\partial R}{\partial z}\).
3
Sum the results. Add all partial derivatives: that sum is the divergence at each point.
4
Interpret. Positive means source, negative means sink, zero means incompressible at that point.

Example 1: Simple 2D Field

Find the divergence of \(\mathbf{F}(x,y) = \langle 3x^2,\, 5y \rangle\).

1
Identify components: \(P = 3x^2\), \(Q = 5y\).
2
Partial derivatives: \(\frac{\partial P}{\partial x} = 6x\), \(\frac{\partial Q}{\partial y} = 5\).
3
Sum: \(\nabla \cdot \mathbf{F} = 6x + 5\).

Example 2: 3D Vector Field

Find \(\nabla \cdot \mathbf{F}\) for \(\mathbf{F}(x,y,z) = \langle x^2 z,\, e^{xy},\, xyz \rangle\).

1
Components: \(P = x^2 z\), \(Q = e^{xy}\), \(R = xyz\).
2
\(\frac{\partial P}{\partial x} = 2xz\)
3
\(\frac{\partial Q}{\partial y} = x\, e^{xy}\)
4
\(\frac{\partial R}{\partial z} = xy\)
5
Sum: \(\nabla \cdot \mathbf{F} = 2xz + x\,e^{xy} + xy\).

Example 3: The Radial Field

Find the divergence of the radial field \(\mathbf{F}(x,y,z) = \langle x,\, y,\, z \rangle\).

\(\mathbf{F} = \langle x, y, z \rangle\)
1
\(\frac{\partial}{\partial x}(x) = 1\), \(\frac{\partial}{\partial y}(y) = 1\), \(\frac{\partial}{\partial z}(z) = 1\)
2
\(\nabla \cdot \mathbf{F} = 1 + 1 + 1 = \mathbf{3}\)

Physical Interpretation

Divergence is the flux density: the net outward flux per unit volume as the volume shrinks to zero.

\(\nabla \cdot \mathbf{F} > 0\)
Net outward flux: more fluid leaves the region than enters. Source.
\(\nabla \cdot \mathbf{F} < 0\)
Net inward flux: more fluid enters than leaves. Sink.
\(\nabla \cdot \mathbf{F} = 0\)
No net flux: whatever enters also leaves. Incompressible (also called solenoidal).

The Divergence Theorem

The Divergence Theorem (Gauss's Theorem) connects divergence inside a volume to flux through the boundary surface:

\(V\)
\(\mathbf{F} \cdot d\mathbf{S}\)
Surface S

Properties of Divergence

1
Linearity: \(\nabla \cdot (a\mathbf{F} + b\mathbf{G}) = a(\nabla \cdot \mathbf{F}) + b(\nabla \cdot \mathbf{G})\) for constants \(a, b\).
2
Product rule (scalar): \(\nabla \cdot (f\mathbf{F}) = f(\nabla \cdot \mathbf{F}) + \mathbf{F} \cdot \nabla f\).
3
Curl has zero divergence: \(\nabla \cdot (\nabla \times \mathbf{F}) = 0\) always. The divergence of a curl is identically zero.
4
Laplacian connection: \(\nabla \cdot (\nabla f) = \nabla^2 f\), the Laplacian of a scalar field.

Common Mistakes

✕ Wrong Partial Variable
Differentiating \(P\) with respect to \(y\) instead of \(x\). Each component is differentiated only with respect to its own variable.
✕ Confusing Divergence and Curl
Using cross-product rules instead of dot product. Remember: divergence uses \(\nabla \cdot\), curl uses \(\nabla \times\).
✕ Forgetting a Component
In 3D, forgetting \(\frac{\partial R}{\partial z}\). Always check that you have one term per component.

Summary Reference

Detail
Formula (2D) \(\frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y}\)
Formula (3D) \(\frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y} + \frac{\partial R}{\partial z}\)
Output type Scalar field
Positive Source: expansion
Negative Sink: compression
Zero Incompressible (solenoidal)
Big theorem \(\iiint_V \nabla \cdot \mathbf{F}\,dV = \oint_S \mathbf{F}\cdot d\mathbf{S}\)
Identity \(\nabla \cdot (\nabla \times \mathbf{F}) = 0\)

Question 1 of 5

What is the divergence of \(\mathbf{F}(x,y) = \langle 2xy,\, x^2 + y^2 \rangle\)?

Question 2 of 5

What does a negative divergence at a point indicate physically?

Question 3 of 5

Compute \(\nabla \cdot \mathbf{F}\) for \(\mathbf{F}(x,y,z) = \langle \sin x,\, \cos y,\, e^z \rangle\).

Question 4 of 5

Which identity is always true for any smooth vector field \(\mathbf{F}\)?

Question 5 of 5

The Divergence Theorem states that \(\iiint_V (\nabla \cdot \mathbf{F})\,dV\) equals which of the following?