Skip to main content
\(\newcommand{\R}{\mathbb{R}} \newcommand{\va}{\mathbf{a}} \newcommand{\vb}{\mathbf{b}} \newcommand{\vc}{\mathbf{c}} \newcommand{\vC}{\mathbf{C}} \newcommand{\vd}{\mathbf{d}} \newcommand{\ve}{\mathbf{e}} \newcommand{\vi}{\mathbf{i}} \newcommand{\vj}{\mathbf{j}} \newcommand{\vk}{\mathbf{k}} \newcommand{\vn}{\mathbf{n}} \newcommand{\vm}{\mathbf{m}} \newcommand{\vr}{\mathbf{r}} \newcommand{\vs}{\mathbf{s}} \newcommand{\vu}{\mathbf{u}} \newcommand{\vv}{\mathbf{v}} \newcommand{\vw}{\mathbf{w}} \newcommand{\vx}{\mathbf{x}} \newcommand{\vy}{\mathbf{y}} \newcommand{\vz}{\mathbf{z}} \newcommand{\vzero}{\mathbf{0}} \newcommand{\vF}{\mathbf{F}} \newcommand{\vG}{\mathbf{G}} \newcommand{\vH}{\mathbf{H}} \newcommand{\vR}{\mathbf{R}} \newcommand{\vT}{\mathbf{T}} \newcommand{\vN}{\mathbf{N}} \newcommand{\vL}{\mathbf{L}} \newcommand{\vB}{\mathbf{B}} \newcommand{\vS}{\mathbf{S}} \newcommand{\proj}{\text{proj}} \newcommand{\comp}{\text{comp}} \newcommand{\nin}{} \newcommand{\vecmag}[1]{|#1|} \newcommand{\grad}{\nabla} \DeclareMathOperator{\curl}{curl} \DeclareMathOperator{\divg}{div} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section4.9The Divergence of a Vector Field

Objectives
  • How can you measure where a vector field is created (or destroyed)?

  • How can you measure where a vector field's strength is increasing or decreasing?

  • What does the divergence of a vector field measure and how can you visually estimate whether the divergence of a vector field is positive or negative?

As we saw in Section4.1, there are many physical and theoretical representations for vector fields. A natural question is Where exactly is the vector field created? With the vector field in Figure4.9.1, imagine sketching a curve that follows the direction of the vector field by treating the vectors in the vector field as tangent vectors to your curve. No matter where you start, you should observe that the vector field decreases in strength as you move along the flow. We wish to understand (as a function of position), how much of the vector field is created (or destroyed) at a given location.

A vector field with vectors shortest along the line \(y=x\) and longer as distance from that line increases. Vectors in the fourth quadrant point primarily in the positive \(x\)-direction, although none are truly vertical. Vectors in the second quadrant point primarily in the negative \(x\)-direction, although none are truly vertical. Vectors in the first and third quadrants exhibit a form of counterclockwise rotation.
Figure4.9.1A vector field with changing strength
Exploration4.9.1

In this preview activity, we will look at several two-dimensional vector fields and try to assess when the vector field has increased or decreased in strength over a given region. We begin with graphs of the three vector fields. Parts a, b, and c ask you to answer the same three questions about the vector field and square illustrated in each of the figures. Partd asks you to think further about the third vector field.

A vector field with vectors radiating from the origin. The length of vectors increases as distance from the origin increases. There is a square in the first quadrant with sides parallel to the coordinate axes. Centered in the square is a point labeled \(P_1\text{,}\) which appears to lie on the line \(y=x\text{.}\)
Figure4.9.2Vector Field \(\vF\)
A vector field with vectors below the \(x\)-axis pointing primarily up near the axis and primarily to the right farther away from the axis. Above the \(x\)-axis, vectors point primarily to the right. Vector magnitudes are shortest near the positive \(y\)-axis. There is a square in the second quadrant with sides parallel to the coordinate axes. Centered in the square is a point labeled \(P_2\text{,}\) which appears to lie on the line \(y=-x\text{.}\)
Figure4.9.3Vector Field \(\vG\)
A vector field in which vectors circulate around the origin as if tangent vectors to concentric circles centered at the origin. Vector magnitude increases as distance from the origin increases. There is a square in the first quadrant with sides parallel to the coordinate axes. Centered in the square is a point labeled \(P_3\text{.}\) There is a point labeled \(P_4\) in the second quadrant that is the reflection of \(P_3\) across the \(y\)-axis. In the third quadrant, there is a point \(P_5\) that is closer to the \(y\)-axis than to the \(x\)-axis. In the fourth quadrant, there is a point labeled \(P_6\) that appears to be on the line \(y=-x\) but is farther from the origin than \(P_3\) or \(P_4\text{.}\)
Figure4.9.4Vector Field \(\vH\)
(a)

For each of the vector fields \(\vF\text{,}\) \(\vG\text{,}\) and \(\vH\) and the square centered on the corresponding point \(P_i\) for \(i=1,2,3\text{,}\) which statement do you think best applies?

  1. More of the vector field is going into the square than going out.

  2. Less of the vector field is going into the square than going out.

  3. The same amount of the vector field is going into the square as is going out.

(b)

For each of the vector fields \(\vF\text{,}\) \(\vG\text{,}\) and \(\vH\) (and corresponding square), does your answer to parta suggest that the vector field is being created, destroyed, or is unchanging in strength inside the square? Explain your reasoning.

(c)

Would the answer to parts a or b change if you used a smaller square centered on \(P_i\) for any of the vector fields and points with \(i=1,2,3\text{?}\) Explain your reasoning.

(d)

Thinking now only about the vector field \(\vH\text{,}\) would your answers to parts a, b, or c change if you considered squares around points \(P_4\text{,}\) \(P_5\text{,}\) or \(P_6\text{?}\) Explain your reasoning.

Subsection4.9.1Measuring the Change in Strength of a Vector Field

In this section, we will go through the process for how to measure the density of the creation or destruction of the vector field in a classic calculus fashion. Specifically, we will measure how the strength of the vector field changes in a region around a point. Next, using a limit, we examine what happens to our measurement as we shrink the region. Because our vector fields will change in a continuous fashion, we won't have the vector field actually change at a single point. Rather, we will really be measuring the density for the change in strength of the vector field.

We will develop all of our measurements in a two dimensional setting for now. However, our arguments can be applied to three (or more) dimensions. We start in the same fashion as in Exploration4.9.1. Namely, we will look at how much of the vector field is going into or out of a square centered at a point \((a,b)\text{.}\) For this development, we will consider a two-dimensional vector field given by \(\vF(x,y)=\langle{F_1(x,y),F_2(x,y)}\rangle\text{.}\)

A square with sides parallel to the coordinate axes and centered at the point \((a,b)\text{.}\) The upper-right corner of the square is labeled \((a+h,b+h)\text{.}\)
Figure4.9.5A square around the point \((a,b)\)

We can parametrize the top edge of the box (in blue) by \(\vr_{\text{top}}(t) = \langle a+t,b+h\rangle\) with \(-h\leq t\leq h\text{.}\) Similarly, the bottom, right, and left can be parametrized by \(\vr_{\text{bottom}}(t) = \langle a+t,b-h\rangle\text{,}\) \(\vr_{\text{right}}(t) = \langle a+h,b+t\rangle\text{,}\) and \(\vr_{\text{left}}(t) = \langle a-h,b+t\rangle\) with \(-h\leq t\leq h\text{.}\)

The amount of the vector field \(\vF\) that is created inside the square around the point \((a,b)\) can be measured by the net amount of the vector field coming in or going out of the square. The amount of vector flow that goes through each of the boundary segments can be measured by looking at just the orthogonal component of the vector field on each particular segment. For instance, on the top segment (in blue), the vertical component \(F_2\) determines how much of the vector field goes in or out of the square. Integrating just the vertical component \(F_2\) of the vector field \(\vF\) over the points on the top segment of our square will therefore measure how much of the vector field goes through the top of the square.

The same argument applies to the bottom edge of our square (in orange). Similarly, if we want to measure how much of \(\vF\) goes through either the left or right side of the square, we need to integrate the horizontal component \(F_1\text{.}\) Hence, the net flow of the vector field into or out of the square will be given by

\begin{equation} \int_{-h}^{h} F_2(a+t,b+h) dt - \int_{-h}^{h} F_2(a+t,b-h) dt \\ \quad + \int_{-h}^{h} F_1(a+h,b+t) dt -\int_{-h}^{h} F_1(a-h,b+t) dt\label{eqn_Vector_Div_MVT}\tag{4.9.1} \end{equation}

Notice that some of the integrals are subtracted because we need to pay attention to the orientation of the vector field relative to the square. A positive vertical component of the vector field (\(F_2\)) will correspond to flow out on the top of the square but will correspond to the vector field flowing into the square on the bottom. So in the integrals above, we are counting the flow out of the square as positive and the flow in as negative.

We are measuring the net flow through the square as a scalar quantity. We can look at what happens to our scalar quantity as we shrink the square to the point \((a,b)\) by decreasing \(h\text{.}\) In order for this to make the most sense, we will change our measurement to be a density argument by calculating flow in (or out) per unit area. This will allow us to compare our net flow calculations across squares with different areas. In other words, we want to consider what happens to

\begin{equation*} \frac{1}{(2h)^2}\left(\int_{-h}^{h} F_2(a+t,b+h) dt - \int_{-h}^{h} F_2(a+t,b-h) dt \\ \quad \quad +\int_{-h}^{h} F_1(a+h,b+t) dt -\int_{-h}^{h} F_1(a-h,b+t) dt \right) \end{equation*}

as \(h\) goes to zero.

We will take a moment here before we apply our limit to simplify our integrals in order to make the limit easier to evaluate. In particular, we will apply the Mean Value Theorem to each of four the integrals above. Applying the Mean Value Theorem to the first integral gives

\begin{equation*} \int_{-h}^{h} F_2(a+t,b+h) dt = (2h) F_2(t^*_1,b+h)\text{,} \end{equation*}

where \(t^*_1\) is some value in the interval \((a-h,a+h)\text{.}\) Applying the Mean Value Theorem to each of the other integrals yields

\begin{equation*} \int_{-h}^{h} F_2(a+t,b+h) dt - \int_{-h}^{h} F_2(a+t,b-h) dt + \\ \int_{-h}^{h} F_1(a+h,b+t) dt -\int_{-h}^{h} F_1(a-h,b+t) dt = \\ (2h) \left(F_2(t^*_1,b+h)-F_2(t^*_2,b-h)+F_1(a+h,t^*_3)-F_1(a-h,t^*_1)\right)\text{,} \end{equation*}

where \(t^*_1,t^*_2\) are values in \((a-h,a+h)\) and \(t^*_3,t^*_4\) are values in \((b-h,b+h)\text{.}\) Thus our flow density can be measured by looking at the limit as \(h\to 0\) of the net flow (in or out) over the square divided by the area of the square.

\begin{equation*} \text{Flow Density}(a,b)=\lim_{h\rightarrow 0} \frac{\text{net flow}}{\text{area}} =\\ \lim_{h\rightarrow 0} \frac{(2h) \left(F_2(t^*_1,b+h)-F_2(t^*_2,b-h)+F_1(a+h,t^*_3)-F_1(a-h,t^*_1)\right)}{4h^2} \end{equation*}

To simplify the limit further, we will reorganize our limit expression. Specifically, we collect the \(F_2\) and \(F_1\) terms separately. This gives

\begin{equation*} \text{Flow Density}(a,b)= \lim_{h\rightarrow 0}\left[ \frac{F_1(a+h,t^*_3)-F_1(a-h,t^*_1)}{2h}+\frac{F_2(t^*_1,b+h)-F_2(t^*_2,b-h)}{2h}\right] \end{equation*}

Recall the central difference method of estimating derivatives from Section 1.5.2 and notice that as \(h\to 0\text{,}\) the numbers \(t^*_1,t^*_2\) must go to \(a\) and \(t^*_3,t^*_4\) must go to \(b\text{.}\) Therefore, after evaluating our limit, the flow density is

\begin{equation*} \text{Flow Density}(a,b)= \frac{\partial F_1}{\partial x} (a,b)+\frac{\partial F_2}{\partial y} (a,b)\text{.} \end{equation*}

While this simplification may seem a bit amazing and magical, our conceptual steps should help us make sense of the result. If we are looking at how the strength of the vector field is changing in a small neighborhood of the point \((a,b)\) then we only need to look how fast the horizontal component is changing horizontally and how the vertical component is changing vertically. How the horizontal component changes over small steps in the vertical direction will give us information about how the direction of the vector field changes but not how the strength of the vector field is changing.

The arguments we made about measuring how much of the vector field flows into or out of a square has straightforward generalization to three (or more) dimensions. However, doing so requires a method for measuring how much of a vector field flows through a surface. This will be the subject of Section4.8.

Subsection4.9.2Definition of the Divergence of a Vector Field

In the previous subsection, we discussed the concept of the flow density at a point as giving a measurement of the how the strength of the vector field changes by using a density argument. The standard name for this quantity is the divergence of a vector field, which we now formally define.

Definition4.9.6

The divergence of a vector field

\begin{equation*} \vF(x,y)=\langle F_1(x,y),F_2(x,y)\rangle \end{equation*}

is given by

\begin{equation*} \divg(\vF)=\frac{\partial F_1}{\partial x}+\frac{\partial F_2}{\partial y} \end{equation*}

In three dimensions, the divergence of the vector field

\begin{equation*} \vG(x,y)=\langle{G_1(x,y,z),G_2(x,y,z),G_3(x,y,z)}\rangle \end{equation*}

is given by

\begin{equation*} \divg(\vG)=\frac{\partial G_1}{\partial x}+\frac{\partial G_2}{\partial y}+\frac{\partial G_3}{\partial z} \end{equation*}
Alternative Notation for Divergence

In other sources you may see the divergence written using a dot product as \(\divg(\vF) = \nabla\cdot \vF\text{.}\) This notation is very compact and works well with the understanding that the del operator \(\nabla = \langle \frac{\partial}{\partial x},\frac{\partial}{\partial y},\frac{\partial}{\partial z}\rangle\) is a function that operates on other functions. However, this notation can also be confusing because of its emphasis on computation rather than conceptual understanding. In this text, we will not generally write the divergence using the del operator.

Another way to see divergence on a vector field plot is to look at what happens to the magnitude of vectors as you move along the flow of the vector field. If the vector field is increasing in magnitude as you move along the flow of a vector field, then the divergence is positive. If the vector field is decreasing in magnitude as you move along the flow of a vector field, then the divergence is negative. If the vector field does not change in magnitude as you move along the flow of the vector field, then the divergence is zero. Also, remember that the divergence of a vector field is often a variable quantity and will change depending on location. The next activity asks you to graphically examine the divergence of three vector fields.

Activity4.9.2Graphical Representations of Divergence
(a)

For this part of the activity, consider the vector field \(\vF\) shown in Figure4.9.7.

A vector field with vectors pointing toward the origin. Vectors get longer as distance from the origin increases.
Figure4.9.7Vector field \(\vF\)
(i)

Draw a circle in the first quadrant of the vector field \(\vF\) depicted in Figure4.9.7. Based on the flow of the vector field into or out of the circle, do you think the vector field is increasing in strength, decreasing in strength, or not changing in overall strength in the first quadrant?

(ii)

As you move along the flow of the vector field in the first quadrant of Figure4.9.7, does your vector field increase in magnitude, decrease in magnitude, or have constant magnitude?

(iii)

Draw a circle in quadrants II, II, and IV. Based on the flow of the vector field into or out of your circles, do you think the vector field is increasing in strength, decreasing in strength, or not changing in overall strength in quadrants II, II, and IV?

(iv)

As you move along the flow of the vector field in the third quadrant of Figure4.9.7, does your vector field increase in magnitude, decrease in magnitude, or have constant magnitude.

(v)

Based on your arguments above, describe why the divergence of \(\vF\) is negative for all points in the \(xy\)-plane.

(b)

Look at the plot of the vector field \(\vG\) in Figure4.9.8 and state whether you think the vector field is increasing in strength, decreasing in strength, or not changing in overall strength in each of the four quadrants. You can make your argument in terms of the change in magnitude along the flow of the vector field or in terms of the net flow into or out of a small region on the plane. You may need to make separate arguments for each of the four quadrants.

A vector field in which vector magnitudes increase as distance from the origin increases. Vectors are oriented as if they follow hyperbolas with asymptotes \(y=x\) and \(y=-x\text{.}\) Vectors above both asymptotes or below both asymptotes result in counterclockwise rotation. The other vectors result in clockwise rotation.
Figure4.9.8Vector field \(\vG\)
(c)

Look at the plot of the vector field \(\vH\) in Figure4.9.9 below and state whether you think the vector field is increasing in strength, decreasing in strength, or not changing in overall strength in each of the four quadrants. You can make your argument in terms of the change in magnitude along the flow of the vector field or in terms of the net flow into or out of a small region on the plane. You may need to make separate arguments for each of the four quadrants.

A vector field having longer vectors  where \(x \lt
0\text{.}\) For \(x>0\text{,}\) vectors appear to get longer as distance from the \(x\)-axis increases.
Figure4.9.9Vector field \(\vH\)

The final activity of this section asks you to do some algebraic calculations of divergence using Definition4.9.6.

Activity4.9.3
(a)

Calculate the divergence of the vector fields given below.

  • \(\vF_1=\langle -x,-y\rangle\)
  • \(\vF_2=\langle y,x \rangle\)
  • \(\vF_3=\langle xy,1-x\rangle\)
(b)

Explain how your answers to the questions in Activity4.9.2 can be explained by using your results from parta of this activity.

Subsection4.9.3Summary

  • The divergence of a vector field \(\vF(x,y)=\langle F_1(x,y),F_2(x,y)\rangle\) is computed as

    \begin{equation*} \divg(\vF)=\frac{\partial F_1}{\partial x}+\frac{\partial F_2}{\partial y} \end{equation*}

    In three dimensions, the divergence of the vector field \(\vG(x,y)=\langle{G_1(x,y,z),G_2(x,y,z),G_3(x,y,z)}\rangle\) is computed as

    \begin{equation*} \divg(\vG)=\frac{\partial G_1}{\partial x}+\frac{\partial G_2}{\partial y}+\frac{\partial G_3}{\partial z} \end{equation*}
  • The divergence of a vector field measures the density of change in the strength of the vector field. In other words, the divergence measures the instantaneous rate of change in the strength of the vector field along the direction of flow.

  • The accumulation of the divergence over a region of space will measure the net amount of the vector field that exits (versus enters) the region.

Subsection4.9.4Exercises

  1. Let \(\vF=\langle{F_1,F_2,F_3}\rangle\) and let
    \begin{equation*} \vG = (\frac{\partial F_3}{\partial y}-\frac{\partial F_2}{\partial z})\vi- (\frac{\partial F_3}{\partial x}-\frac{\partial F_1}{\partial z})\vj + (\frac{\partial F_2}{\partial x}-\frac{\partial F_1}{\partial y})\vk \end{equation*}
    Show that \(\divg(\vG)=\vec{0}\text{.}\) Vector fields with a zero divergence everywhere in their domain are called divergence-free vector fields.
  2. Which of the following vector fields are divergence-free?

    1. \(\vF=\langle{-y,z,x}\rangle\)
    2. \(\vF=\langle{\cos(yz),3xe^{z-x},6(x+y+z)^3}\rangle\)
    3. \(\vF=\langle{4xyz,y^2z,yz^2}\rangle\)
    4. \(\vF=\nabla f\) where \(f\) is a scalar function of \(x\text{,}\) \(y\text{,}\) and \(z\)
  3. Let \(\vF_1=\langle{3(x-z)^2,2\cos(x)+3yz+y,-(z-1)^2+e^{xy}}\rangle\text{.}\) Calculate the divergence of \(\vF_1\) and give a point where \(\divg(\vF_1)=0\text{.}\)
  4. Is \(\vF_1\) a divergence free vector field?