# Divergence

In vector calculus, divergence is a vector operator that produces a scalar field giving the quantity of a vector field's source at each point. More technically, the divergence represents the volume density of the outward flux of a vector field from an infinitesimal volume around a given point.

As an example, consider air as it is heated or cooled. The velocity of the air at each point defines a vector field. While air is heated in a region, it expands in all directions, and thus the velocity field points outward from that region. The divergence of the velocity field in that region would thus have a positive value. While the air is cooled and thus contracting, the divergence of the velocity has a negative value.

## Physical interpretation of divergence

In physical terms, the divergence of a three-dimensional vector field is the extent to which the vector field flow behaves like a source at a given point. It is a local measure of its "outgoingness" – the extent to which there is more of some quantity exiting an infinitesimal region of space than entering it. If the divergence is nonzero at some point then there must be a source or sink at that position.[1] (Note that we are imagining the vector field to be like the velocity vector field of a fluid (in motion) when we use the terms flow, source and so on.)

More rigorously, the divergence of a vector field F at a point p can be defined as the limit of the net flow of F across the smooth boundary of a three-dimensional region V divided by the volume of V as V shrinks to p. Formally,

${\displaystyle \left.\operatorname {div} \mathbf {F} \right|_{p}=\lim _{V\rightarrow \{p\}}\iint _{S(V)}{\frac {\mathbf {F} \cdot \mathbf {\hat {n}} }{|V|}}\,dS}$

where |V| is the volume of V, S(V) is the boundary of V, and the integral is a surface integral with being the outward unit normal to that surface. The result, div F, is a function of p. From this definition it also becomes obvious that div F can be seen as the source density of the flux of F.

In light of the physical interpretation, a vector field with zero divergence everywhere is called incompressible or solenoidal – in which case any closed surface has no net flow across it.

The intuition that the sum of all sources minus the sum of all sinks should give the net flow outwards of a region is made precise by the divergence theorem.

## Definition in Cartesian coordinates

Let x, y, z be a system of Cartesian coordinates in 3-dimensional Euclidean space, and let i, j, k be the corresponding basis of unit vectors. The divergence of a continuously differentiable vector field F = Ui + Vj + Wk is defined as the scalar-valued function:[2][3]

${\displaystyle \operatorname {div} \mathbf {F} =\nabla \cdot \mathbf {F} =\left({\frac {\partial }{\partial x}},{\frac {\partial }{\partial y}},{\frac {\partial }{\partial z}}\right)\cdot (U,V,W)={\frac {\partial U}{\partial x}}+{\frac {\partial V}{\partial y}}+{\frac {\partial W}{\partial z}}.}$

Although expressed in terms of coordinates, the result is invariant under rotations, as the physical interpretation suggests. This is because the trace of the Jacobian matrix of an N-dimensional vector field F in N-dimensional space is invariant under any invertible linear transformation.

The common notation for the divergence ∇ · F is a convenient mnemonic, where the dot denotes an operation reminiscent of the dot product: take the components of the operator (see del), apply them to the corresponding components of F, and sum the results. Because applying an operator is different from multiplying the components, this is considered an abuse of notation.

The divergence of a continuously differentiable second-order tensor field ε is a first-order tensor field:[4]

${\displaystyle {\overrightarrow {\operatorname {div} }}({\boldsymbol {\varepsilon }})={\begin{bmatrix}{\dfrac {\partial \varepsilon _{xx}}{\partial x}}+{\dfrac {\partial \varepsilon _{yx}}{\partial y}}+{\dfrac {\partial \varepsilon _{zx}}{\partial z}}\\[6pt]{\dfrac {\partial \varepsilon _{xy}}{\partial x}}+{\dfrac {\partial \varepsilon _{yy}}{\partial y}}+{\dfrac {\partial \varepsilon _{zy}}{\partial z}}\\[6pt]{\dfrac {\partial \varepsilon _{xz}}{\partial x}}+{\dfrac {\partial \varepsilon _{yz}}{\partial y}}+{\dfrac {\partial \varepsilon _{zz}}{\partial z}}\end{bmatrix}}}$

### Cylindrical coordinates

For a vector expressed in cylindrical coordinates as

${\displaystyle \mathbf {F} =\mathbf {e} _{r}F_{r}+\mathbf {e} _{\theta }F_{\theta }+\mathbf {e} _{z}F_{z},}$

where ea is the unit vector in direction a, the divergence is[5]

${\displaystyle \operatorname {div} \mathbf {F} =\nabla \cdot \mathbf {F} ={\frac {1}{r}}{\frac {\partial }{\partial r}}\left(rF_{r}\right)+{\frac {1}{r}}{\frac {\partial F_{\theta }}{\partial \theta }}+{\frac {\partial F_{z}}{\partial z}}\,.}$

### Spherical coordinates

In spherical coordinates, with θ the angle with the z axis and φ the rotation around the z axis, the divergence is[6]

${\displaystyle \operatorname {div} \mathbf {F} =\nabla \cdot \mathbf {F} ={\frac {1}{r^{2}}}{\frac {\partial }{\partial r}}\left(r^{2}F_{r}\right)+{\frac {1}{r\sin \theta }}{\frac {\partial }{\partial \theta }}(\sin \theta \,F_{\theta })+{\frac {1}{r\sin \theta }}{\frac {\partial F_{\varphi }}{\partial \varphi }}.}$

## Decomposition theorem

It can be shown that any stationary flux v(r) that is at least twice continuously differentiable in 3 and vanishes sufficiently fast for |r| → ∞ can be decomposed into an irrotational part E(r) and a source-free part B(r). Moreover, these parts are explicitly determined by the respective source densities (see above) and circulation densities (see the article Curl):

For the irrotational part one has

${\displaystyle \mathbf {E} =-\nabla \Phi (\mathbf {r} )\,,}$

with

${\displaystyle \Phi (\mathbf {r} )=\int _{\mathbb {R} ^{3}}\,d^{3}\mathbf {r} '\;{\frac {\operatorname {div} \mathbf {v} (\mathbf {r} ')}{4\pi \left|\mathbf {r} -\mathbf {r} '\right|}}\,.}$

The source-free part, B, can be similarly written: one only has to replace the scalar potential Φ(r) by a vector potential A(r) and the terms −∇Φ by +∇ × A, and the source density div v by the circulation density ∇ × v.

This "decomposition theorem" is a by-product of the stationary case of electrodynamics. It is a special case of the more general Helmholtz decomposition which works in dimensions greater than three as well.

## Properties

The following properties can all be derived from the ordinary differentiation rules of calculus. Most importantly, the divergence is a linear operator, i.e.

${\displaystyle \operatorname {div} (a\mathbf {F} +b\mathbf {G} )=a\operatorname {div} \mathbf {F} +b\operatorname {div} \mathbf {G} }$

for all vector fields F and G and all real numbers a and b.

There is a product rule of the following type: if φ is a scalar-valued function and F is a vector field, then

${\displaystyle \operatorname {div} (\varphi \mathbf {F} )=\operatorname {grad} \varphi \cdot \mathbf {F} +\varphi \operatorname {div} \mathbf {F} ,}$

or in more suggestive notation

${\displaystyle \nabla \cdot (\varphi \mathbf {F} )=(\nabla \varphi )\cdot \mathbf {F} +\varphi (\nabla \cdot \mathbf {F} ).}$

Another product rule for the cross product of two vector fields F and G in three dimensions involves the curl and reads as follows:

${\displaystyle \operatorname {div} (\mathbf {F} \times \mathbf {G} )=\operatorname {curl} \mathbf {F} \cdot \mathbf {G} -\mathbf {F} \cdot \operatorname {curl} \mathbf {G} ,}$

or

${\displaystyle \nabla \cdot (\mathbf {F} \times \mathbf {G} )=(\nabla \times \mathbf {F} )\cdot \mathbf {G} -\mathbf {F} \cdot (\nabla \times \mathbf {G} ).}$

The Laplacian of a scalar field is the divergence of the field's gradient:

${\displaystyle \operatorname {div} (\nabla \varphi )=\Delta \varphi .}$

The divergence of the curl of any vector field (in three dimensions) is equal to zero:

${\displaystyle \nabla \cdot (\nabla \times \mathbf {F} )=0}$

If a vector field F with zero divergence is defined on a ball in 3, then there exists some vector field G on the ball with F = curl G. For regions in 3 more topologically complicated than this, the latter statement might be false (see Poincaré lemma). The degree of failure of the truth of the statement, measured by the homology of the chain complex

${\displaystyle \{{\text{scalar fields on }}U\}~{\overset {\operatorname {grad} }{\rightarrow }}~\{{\text{vector fields on }}U\}~{\overset {\operatorname {curl} }{\rightarrow }}~\{{\text{vector fields on }}U\}~{\overset {\operatorname {div} }{\rightarrow }}~\{{\text{scalar fields on }}U\}}$

serves as a nice quantification of the complicatedness of the underlying region U. These are the beginnings and main motivations of de Rham cohomology.

## Relation with the exterior derivative

One can express the divergence as a particular case of the exterior derivative, which takes a 2-form to a 3-form in 3. Define the current two-form as

${\displaystyle j=F_{1}\,{\rm {d}}y\wedge {\rm {d}}z+F_{2}\,{\rm {d}}z\wedge {\rm {d}}x+F_{3}\,{\rm {d}}x\wedge {\rm {d}}y.}$

It measures the amount of "stuff" flowing through a surface per unit time in a "stuff fluid" of density ρ = 1 dx ∧ dy ∧ dz moving with local velocity F. Its exterior derivative dj is then given by

${\displaystyle {\rm {d}}j=\left({\frac {\partial F_{1}}{\partial x}}+{\frac {\partial F_{2}}{\partial y}}+{\frac {\partial F_{3}}{\partial z}}\right){\rm {d}}x\wedge {\rm {d}}y\wedge {\rm {d}}z=(\nabla \cdot {\mathbf {F} })\rho .}$

Thus, the divergence of the vector field F can be expressed as:

${\displaystyle \nabla \cdot {\mathbf {F} }={\star }{\rm {d}}{\star }{\big (}{\mathbf {F} }^{\flat }{\big )}.}$

Here the superscript is one of the two musical isomorphisms, and is the Hodge dual. Working with the current two-form and the exterior derivative is usually easier than working with the vector field and divergence, because unlike the divergence, the exterior derivative commutes with a change of (curvilinear) coordinate system.

## Generalizations

The divergence of a vector field can be defined in any number of dimensions. If

${\displaystyle \mathbf {F} =(F_{1},F_{2},\ldots F_{n}),}$

in a Euclidean coordinate system with coordinates x1, x2, ..., xn, define

${\displaystyle \operatorname {div} \mathbf {F} =\nabla \cdot \mathbf {F} ={\frac {\partial F_{1}}{\partial x_{1}}}+{\frac {\partial F_{2}}{\partial x_{2}}}+\cdots +{\frac {\partial F_{n}}{\partial x_{n}}}.}$

The appropriate expression is more complicated in curvilinear coordinates.

In the case of one dimension, F reduces to a regular function, and the divergence reduces to the derivative.

For any n, the divergence is a linear operator, and it satisfies the "product rule"

${\displaystyle \nabla \cdot (\varphi \mathbf {F} )=(\nabla \varphi )\cdot \mathbf {F} +\varphi (\nabla \cdot \mathbf {F} )}$

for any scalar-valued function φ.

The divergence of a vector field extends naturally to any differentiable manifold of dimension n that has a volume form (or density) μ, e.g. a Riemannian or Lorentzian manifold. Generalising the construction of a two-form for a vector field on 3, on such a manifold a vector field X defines an (n − 1)-form j = iX μ obtained by contracting X with μ. The divergence is then the function defined by

${\displaystyle {\rm {d}}j=(\operatorname {div} X)\mu .}$

Standard formulas for the Lie derivative allow us to reformulate this as

${\displaystyle {\mathcal {L}}_{X}\mu =(\operatorname {div} X)\mu .}$

This means that the divergence measures the rate of expansion of a volume element as we let it flow with the vector field.

On a pseudo-Riemannian manifold, the divergence with respect to the metric volume form can be computed in terms of the Levi-Civita connection :

${\displaystyle \operatorname {div} X=\nabla \cdot X={X^{a}}_{;a},}$

where the second expression is the contraction of the vector field valued 1-form X with itself and the last expression is the traditional coordinate expression from Ricci calculus.

An equivalent expression without using connection is

${\displaystyle \operatorname {div} (X)={\frac {1}{\sqrt {\operatorname {det} g}}}\partial _{a}\left({\sqrt {\operatorname {det} g}}\,X^{a}\right),}$

where g is the metric and a denotes the partial derivative with respect to coordinate xa.

Divergence can also be generalised to tensors. In Einstein notation, the divergence of a contravariant vector Fμ is given by

${\displaystyle \nabla \cdot \mathbf {F} =\nabla _{\mu }F^{\mu },}$

where μ denotes the covariant derivative.

Equivalently, some authors define the divergence of a mixed tensor by using the musical isomorphism : if T is a (p, q)-tensor (p for the contravariant vector and q for the covariant one), then we define the divergence of T to be the (p, q − 1)-tensor

${\displaystyle (\operatorname {div} T)(Y_{1},\ldots ,Y_{q-1})={\operatorname {trace} }{\Big (}X\mapsto \sharp (\nabla T)(X,\cdot ,Y_{1},\ldots ,Y_{q-1}){\Big )};}$

that is, we take the trace over the first two covariant indices of the covariant derivative[a]

## Notes

1. ^ There is no natural choice of a "first" covariant index – that there is a "first index" at all is an artefact of the notation. Consequently, it is more natural to specify the divergence of T with respect to a specified index. There are however two important special cases where this problem essentially vanishes: with a totally symmetric contravariant tensor, when every choice is equivalent, and with a totally antisymmetric contravariant tensor (a.k.a. a k-vector), when the choice affects only the sign.

## Citations

1. ^
2. ^ Rudin 1976, p. 281.
3. ^ Edwards 1994, p. 309.
4. ^ Gurtin 1981, p. 30.
5. ^ Cylindrical coordinates at Wolfram Mathworld
6. ^ Spherical coordinates at Wolfram Mathworld

## References

• Brewer, Jess H. (1999). "DIVERGENCE of a Vector Field". musr.phas.ubc.ca. Retrieved 2016-08-09.
• Rudin, Walter (1976). Principles of mathematical analysis. McGraw-Hill. ISBN 0-07-054235-X.
• Edwards, C. H. (1994). Advanced Calculus of Several Variables. Mineola, NY: Dover. ISBN 0-486-68336-2.
• Gurtin, Morton (1981). An Introduction to Continuum Mechanics. Academic Press. ISBN 0-12-309750-9.
• Theresa, M. Korn; Korn, Granino Arthur. Mathematical Handbook for Scientists and Engineers: Definitions, Theorems, and Formulas for Reference and Review. New York: Dover Publications. pp. 157–160. ISBN 0-486-41147-8.