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 Section 12.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 Figure 12.6.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.

Preview Activity12.6.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, \(\vF\text{,}\)\(\vG\text{,}\) and \(\vH\text{.}\) 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. Part d asks you to think further about the third vector field.

(a)

For each of the vector fields \(\vF\text{,}\)\(\vG\text{,}\) and \(\vH\) and the square centered on \(P_1\text{,}\)\(P_2\text{,}\) and \(P_3\) (respectively), which statement do you think best applies?

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

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

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 part a suggest that the vector field is being created, destroyed, or is unchanging in strength inside the square? Write a sentence to explain your thinking for each vector field.

(c)

Would the answer to parts a or b change if you used a smaller square centered on \(P_1\text{,}\)\(P_2\text{,}\) and \(P_3\) for the corresponding vector fields? Write a sentence to explain your thinking for each vector field.

(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{?}\) Write a couple of sentences to explain your thinking.

Subsection12.6.1Definition of the Divergence of a Vector Field

We begin this subsection by stating a definition that captures analytically the ideas you reasoned aboug geometrically in Preview Activity 12.6.1. After the statement of the definition, we discuss what it means.

In two dimensions, the definition is analogous by omiting the third term.

The divergence of a vector field is a scalar measurement at a point that measures how the strength of the vector field is changing as we look small neighborhoods around our point. While Subsection 12.6.2 will show the details for how the divergence is defined, we can make the following qualitative argument: If we are looking at how the strength of the vector field is changing in a small neighborhood of the point \((a,b)\text{,}\) then we only need to look how fast the horizontal component is changing horizontally and how the vertical component is changing vertically. We make this measurement of changing strength of the vector field by measuring how much of a vector field flows into versus out of a small neighborhood of our point (as was done in Preview Activity 12.6.1). When looking at a small neighborhood of the point (as shown by the square in Figure 12.6.15), only the change of the horizontal component of the vector field contributes to flow in or out on the sides and only the change in the vertical component contributes to flow in or our on the top and bottom.

From our conceptual description above, \(\divg(\vF)\) being positive means that our vector field is increasing in strength. Since the divergence of \(\vF\) does not have a dependence on the input point, that means the vector field is increasing in strength, regardless of which point we consider. In the interactive element below, you can change the point you would like plotted and the size of the region around the point. You should see that regardless of what point you select or how small you make the region around the point, there will be more of the vector field flowing out of the region than in.

Example12.6.8.

Let \(\vG=\langle y,-x \rangle\text{.}\) We can compute that

From our conceptual description of divergence, \(\divg(\vG)\) being zero means that our vector field is not changing in strength. Since the divergence of \(\vG\) does not have a dependence on the input point, that means the vector field is not changing in strength, regardless of which point we consider.

In the interactive element below, you can change the point you would like plotted and the size of the region around the point. You should see that regardless of what point you select or how small you make the region around the point, there will be exactly as much of the vector field flowing into the region as is flowing out (on the other side).

Example12.6.10.

Let \(\vH=\langle x^2-y,y^2-x \rangle\text{,}\) which means that

In constrast to the previous examples, you can see that the value of divergence of \(\vH\) will depend on the input point choosen. For instance, \(\divg(\vH)\) will be \(4\) at the point \((1,1)\text{.}\) This means that for a small region around \((1,1)\) there should be more of the vector field flowing out of the region than into it. Use the interactive element below to verify this.

The divergence of \(\vH\) at the point \((-1,1)\) will be zero. If you look at this point in Figure 12.6.11, you will see that there is exactly as much of the vector field flowing into the region around \((-1,1)\) as is flowing out.

The divergence of \(\vH\) at the point \((-2,0)\) is \(-4\text{.}\) This should mean that there is more of the vector field flowing into the region around \((-2,0)\) than is flowing out. You should be able to see how difference regions of the \(xy\)-plane will have different values for \(\divg(\vH)\text{.}\)

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.

Activity12.6.2.Graphical Representations of Divergence.

(a)

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

(i)

Draw a circle in the first quadrant of the vector field \(\vF\) depicted in Figure 12.6.12. 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 Figure 12.6.12, does your vector field increase in magnitude, decrease in magnitude, or have constant magnitude?

(iii)

Draw a circle in each of 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 Figure 12.6.12, 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 Figure 12.6.13 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.

(c)

Look at the plot of the vector field \(\vH\) in Figure 12.6.14 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.

The next activity of this section asks you to do some algebraic calculations of divergence using Definition 12.6.5.

Activity12.6.3.

(a)

Calculate the divergence of the vector fields given below.

\(\displaystyle \vF(x,y)=\langle -x,-y\rangle\)

\(\displaystyle \vG(x,y)=\langle y,x \rangle\)

\(\displaystyle \vH(x,y)=\langle xy,1-x\rangle\)

(b)

Explain how your answers to the questions in Activity 12.6.2 can be explained by using your results from part a of this activity.

Subsection12.6.2Measuring the Change in Strength of a Vector Field

In this subsection, we examine the details of 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 vector fields change in a continuous fashion, the vector fields don’t actually change at a single point. Rather, we will measure 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 Preview Activity 12.6.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{.}\)

We can parametrize the top edge of the box 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

all of which use parameter values in \(-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 into 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, 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. 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 \(N\) of the vector field into or out of the square will be given by

Notice that the integrals corresponding to the left and bottom segments 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. 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. By decreasing \(h\text{,}\) we can look at what happens to our amount of flow out of the square as we shrink to the point \((a,b)\text{.}\) In order for this to make sense across different size of squares, we will change what we are measuring 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

Before we compute our limit, we will take a moment to simplify our integrals in order to make the limit easier to evaluate. Recall that in single-variable calculus, we defined the average value of a function^{ 1 }

when \(f\) is continuous on \([a,b]\text{.}\) (You can think of the left-hand side as being the area of a rectangle with the interval \([a,b]\) as its base.) We use this fact, sometimes called the Mean Value Theorem for Integrals, to simplify here. Applying the Mean Value Theorem for Integrals to the first integral gives

where \(t^*_1\) is some value in the interval \((a-h,a+h)\text{.}\) Applying the Mean Value Theorem for Integrals to each of the other integrals allows us to simplify the expression above for the net flow \(N\) to be

where \(t^*_1\) and \(t^*_2\) are values in \((a-h,a+h)\) and \(t^*_3\) and \(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.

Recall the central difference method of estimating derivatives from Section 1.5.2^{ 2 }

activecalculus.org/single/sec-1-5-units.html#VjW

and 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

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 Section 12.9.

Subsection12.6.3Summary

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

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.

The key ideas when interpreting divergence are:

A positive divergence means that the vector field is growing in strength.

A negative divergence means that the vector field is decreasing in strength.

A zero divergence means that the vector field is not changing in strength.

Exercises12.6.4Exercises

1.

Find the divergence of each of the following vector fields at all points where they are defined.

\(\vF=\nabla f\) where \(f\) is a scalar function of \(x\text{,}\)\(y\text{,}\) and \(z\)

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{.}\)

Is \(\vF_1\) a divergence free vector field?

Subsection12.6.5Notes to Instructors and Dependencies

This section relies heavily on understanding vector fields from Section 12.1. We have separated the details of how the flux density of a region leads to the definition and understanding of the divergence (Subsection 12.6.2). The second subsection is optional, but is worthwhile reading for students who are interested in a good conceptual understanding of how divergence is developed.