Divergence measures the rate field vectors are expanding at a point.

While the gradient and curl are the fundamental “derivatives” in two dimensions, there is another useful measurement we can make. It is called divergence. It measures the rate field vectors are “expanding” at a given point.

1 The divergence of a vector field

Let’s state the definition:

Is the divergence of a vector field a scalar or a vector?
vector. scalar. neither a vector nor a scalar.
Consider the vector field \(\vec {F}(x,y) = \vector {x^2y^3,ye^x}\). Compute:
\[ \divergence \vec {F} \begin{prompt} = \answer {2xy^3 + e^x} \end{prompt} \]
Consider the vector field \(\vec {F}(x,y,z) = \vector {\sin (xy),\sin (x+y+z),\sin (yz}\). Compute:
\[ \divergence \vec {F} \begin{prompt} = \answer {y\cos (xy) + \cos (x+y+z) + y\cos (yz)} \end{prompt} \]

1.1 What does divergence measure?

As we’ve already said, divergence measures the rate field vectors are expanding at a point. To be more explicit, the divergence measures how the magnitude of the field vectors change as you move in the direction of the field vectors:

And:

The most obvious example of a vector field with nonzero divergence is \(\vec {F}(x,y)= \vector {x,y}\):

On the other hand, recall that a radial vector field is a field of the form \(\vec {F}:\R ^n\to \R ^n\) where

\[ \vec {F}(\vec {x}) = \frac {\pm \vec {x}}{|\vec {x}|^p} \]

where \(p\) is a real number. The divergence of these vector fields can be surprising.

Compute the divergence of \(\vec {F} =\frac {\vector {x,y,z}}{|\vector {x,y,z}|^p}\).
\[ \divergence \vec {F}(x,y,z) = \frac {\answer [given]{3-p}}{|\vector {x,y,z}|^p} \]

Now we will see a radial vector field with zero divergence.

Now let’s see a radial vector field with negative divergence.

2 Measuring flow across a curve

Let \(\vec {F}:\R ^2\to \R ^2\) be a vector field, \(\vec {p}:\R \to \R ^2\) be a smooth vector valued function tracing a curve \(C\) exactly once as \(t\) runs from \(a\) to \(b\),

\begin{align*} \vec {F}(x,y) &= \vector {M(x,y), N(x,y)}\\ \vec {p}(t) &= \vector {x(t),y(t)}. \end{align*}

Recall that the line integral

\[ \int _C \vec {F}\dotp \d \vec {p} \]

measures the accumulated flow of a vector field along a curve. We see this because \(\vec {F}\dotp \vec {p}'\) measures how “aligned” field vectors are with the direction of the path \(\vec {p}\). On the other hand, if we set

\[ \vec {n}(t) = \vector {y(t),-x(t)} \]

then for any given value of \(t\), \(\vec {n}'(t)\) is a vector that is orthogonal to \(\vec {p}'(t)\). Moreover, given a closed curve, where \(\vec {p}(t)\) is parameterized with the interior on the left, \(\vec {n}'(t)\) points outward. Below we see a curve \(\vec {p}(t)\) along with some tangent vectors \(\vec {p}'(t)\) and some outward normal vectors \(\vec {n}'(t)\):

Since \(\vec {F}\dotp \vec {n}'\) measures how “aligned” field vectors are with vectors orthogonal to the direction of the path, the integral

\begin{align*} \oint _C \vec {F}\dotp \d \vec {n} &= \oint _C \vector {M,N}\dotp \vector {\d y,-\d x}\\ &= \oint _C - N(x,y)\d x + M(x,y)\d y \end{align*}

measures the flow of a vector field across a curve. Some folks call this a flux integral. Since \(\d x = x'(t)\d t\) and \(\d y = y'(t)\d t\), we may write \(\oint _C \vec {F}\dotp \d \vec {n}\) as

\begin{align*} &= \int _a^b \left (-N(x(t),y(t))\cdot x'(t) + M(x(t),y(t))\cdot y'(t)\right ) \d t\\ &= \int _a^b \vector {M(x(t),y(t)),N(x(t),y(t))}\dotp \vector {y'(t), -x'(t)} \d t \end{align*}
Consider the following vector field \(\vec {F}\) and curve \(C\) parameterized by \(\vec {p}(t)\): Do you expect \(\oint _C\vec {F} \dotp \d \vec {n}\) to be positive, zero, or negative?
positive zero negative
Consider the following vector field \(\vec {F}\) and curve \(C\) parameterized by \(\vec {p}(t)\): Do you expect \(\oint _C\vec {F} \dotp \d \vec {n}\) to be positive, zero, or negative?
positive zero negative
Consider the following vector field \(\vec {F}\) and curve \(C\) parameterized by \(\vec {p}(t)\): Do you expect \(\oint _C\vec {F} \dotp \d \vec {n}\) to be positive, zero, or negative?
positive zero negative

With our next example, we’ll get our hands dirty.

3 Connections to Green’s Theorem

Finally, note that if \(\vec {F}=\vector {M,N}\), then:

\begin{align*} \divergence \vec {F} &=\pp [M]{x} + \pp [N]{y}\\ &=\curl \vector {-N,M} \end{align*}

We also see that

\begin{align*} \int _C \vector {-N,M}\dotp \d \vec {p} &= \int _C \left (-N\d x+ M \d y\right )\\ &=\int _C \vec {F}\dotp \d \vec {n} \end{align*}

this leads us to the flux form of Green’s Theorem:

Let \(\vec {F}\) be a vector field with \(\divergence \vec {F} = 0\). Compute:
\[ \oint _C \vec {F}\dotp \d \vec {n} \begin{prompt} =\answer {0} \end{prompt} \]
Suppose that the divergence of a vector field \(\vec {F}:\R ^2\to \R ^2\) is constant, \(\divergence \vec {F} = -4\). If
\[ \int _{C_1} \vec {F} \dotp \d \vec {n} = 20 \]
estimate:
\[ \int _{C_2} \vec {F}\dotp \d \vec {n} \begin{prompt} = \answer {-108} \end{prompt} \]
Use Green’s Theorem.