Skip to main content

Active Calculus - Multivariable

Section 12.12 The Divergence Theorem

In Section 12.6 we examined vector fields to consider how the strength of a vector field changes in different regions. In particular, we developed the divergence of a vector field as a local measurement (based on density) of how the strength of the vector field changes. In particular, we did this by looking at the flux of the vector field through a closed path in two dimensions and then generalized these ideas to higher dimensions.
In Section 12.9, we measured how much of a vector field flowed through a section of a surface in three dimensions as a generalization of our argument from Section 12.6. In this section, we will connect the ideas of flux of a vector field through a closed surface in three dimensions and the divergence of that vector field.
Recalling the surfaces we studied in Section 12.11, where we applied Stokes’ Theorem, notice that all of these surfaces had the property that they had a boundary along which we calculated circulation. It turns out that giving a precise definition for boundary is challenging. For our purposes, however, you might think of a boundary curve of a surface as being a curve along which you could walk with your arms stretched out on either side with one arm lying over the surface and the other arm not lying over the surface as you walk. In this section, we will study closed surfaces in three dimensions, which are those surfaces without boundary. In Section 12.11, none of the surfaces were closed, because each had a boundary curve. On the other hand, in Figure 12.12.1, we show two more surfaces that are not closed, as demonstrated by the magenta curves marking the edge where the surface ends.
Figure 12.12.1. Two surfaces that are not closed
In fact, the yellow cylinder has two edges where the surface ends (does not meet itself). The surfaces in Figure 12.12.2 are closed because there is no edge to the surface. Note that the cylinder has been “filled in” with a cap at top and bottom (plotted in gray and green, respectively) to become a closed surface.
Figure 12.12.2. Two closed surfaces
Closed surfaces can be used to define the boundary of a volume in space. If we have the top and bottom on our cylinder, we have a well-defined volume of space, in that we know which points are “inside” the volume and which are “outside” of the volume. With different top and bottom surfaces, the enclosed volume would be different. Figure 12.12.3 illustrates three different ways to complete the cylindrical surface into a closed surface.
Figure 12.12.3. Three ways to close a cylindrical surface by adding a top and bottom

Preview Activity 12.12.1. Locating sources of a poisonous gas.

We will use three different surfaces to examine the flux through closed surfaces. Let \(S_{\text{top}}\) be the top half of the unit sphere centered at the origin (graphed in magenta in the figures below). Let \(S_{\text{bottom}}\) be the bottom half of the unit sphere centered at the origin (graphed in yellow). Finally, let \(S_{\text{mid}}\) be the unit disk centered at the origin in the \(xy\)-plane (graphed in blue). With these definitions, \(S_{\text{top}}\) and \(S_{\text{bottom}}\) will make a closed surface given by the unit sphere. The surfaces \(S_{\text{top}}\) and \(S_{\text{mid}}\) will enclose the top half of the unit ball, while \(S_{\text{bottom}}\) and \(S_{\text{mid}}\) will enclose the bottom half of the unit ball.
In this problem we will be using the surfaces defined above and the flux integrals of a poisonous gas through these surfaces to try to determine whether different regions of space are emitting or absorbing the poisonous gas.

(a)

In this part, we will consider the unit ball shown in Figure 12.12.4, with boundary and normal vectors as shown in the plot. If the flux integral of a poisonous gas through \(S_{\text{top}}\) is \(15\) and the flux integral of the poison gas through \(S_{\text{bottom}}\) is \(-3\text{,}\) is the interior of the sphere emitting or absorbing poisonous gas? Explain your reasoning.
Figure 12.12.4. Unit ball with boundary given by the combination of \(S_{\text{top}}\) and \(S_{\text{bottom}}\)

(b)

In this part, we will consider the top half of the unit ball shown in Figure 12.12.5, with boundary and normal vectors as shown in the plot. If the flux integral of a poisonous gas through \(S_{\text{top}}\) is \(15\) and the flux integral of the poison gas through \(S_{\text{mid}}\) is \(-20\text{,}\) is the top half of the unit ball emitting or absorbing poisonous gas? Explain your reasoning.
Figure 12.12.5. Upper half of the unit ball with boundaries given by \(S_{\text{top}}\) and \(S_{\text{mid}}\)

(c)

In this part, we will consider the bottom half of the unit ball shown in Figure 12.12.6, with boundary and normal vectors as shown in the plot. Based on the information given in the previous two parts, what will the flux integrals of the poison gas be for \(S_{\text{bottom}}\) and \(S_{\text{mid}}\) be in this case? Be sure to pay attention to the orientation of what we consider positive flow. Explain your reasoning.
Figure 12.12.6. Lower half of the unit ball with boundaries given by \(S_{\text{mid}}\) and \(S_{\text{bottom}}\)

(d)

Using your answer from the previous part, is the bottom half of the unit ball emitting or absorbing poisonous gas? Explain your reasoning.
The preview activity showed how the flux through a closed surface can be subdivided into the flux through surfaces which combine to be the closed surface (with orientation switches corresponding to additive inverse). The net flux through the closed surface measures the net amount of the vector field that is created or destroyed on the interior of the closed surface.

Subsection 12.12.1 The Divergence Theorem

The divergence of a vector field was developed as a measurement of the density with which the strength of vector field is changing. In three dimensions, the divergence measures the density per unit volume in which the vector field is being created or destroyed. This means that if we integrate the divergence of a vector field over a volume of space, we will get the net amount of the vector field that is created or destroyed in that particular volume of space. Since the net amount of a vector field that is created or destroyed in a volume of space is the same as the net flux of the vector field through the closed surface that is the boundary of that volume, we have a correspondence between a triple integral of the divergence of a vector field on the interior of a closed surface and the flux integral of the vector field over the closed surface.
The preview activity and the discussion before the statement of the Divergence Theorem have hopefully given you some intuition as to why the theorem is true. The ideas should also seem similar to the manner in which we approached Green’s Theorem and Stokes’ Theorem. In the next example, we will verify the Divergence Theorem for a particular case.

Example 12.12.8.

In this example we will apply the Divergence Theorem to the vector field \(\vF=\langle xy-z, yz+e^x,z(x-y) \rangle \) and the region in the first octant bounded above by \(z=1-x-y\text{.}\) We will go through the calculations of the flux integral on the right side and the triple integral on the left side.
(a)
We first calculate the left side of the Divergence Theorem using four flux integrals (one for each of the four boundary surfaces) as illustrated in Figure 12.12.9. We will need to parametrize each of the four faces which we will call \(S_1\) (in magenta), \(S_2\) (in yellow), \(S_3\) (in blue), and \(S_4\) (in green).
\begin{align*} \vr_1(s,t)\amp= \langle 0,s,t \rangle\\ \vr_2(s,t)\amp= \langle s,0,t \rangle\\ \vr_3(s,t)\amp= \langle s,t,0 \rangle\\ \vr_4(s,t)\amp= \langle s,t,1-s-t \rangle \end{align*}
where all of these parameterization use \(0\leq s \leq 1\) and \(0 \leq t \leq 1-s\text{.}\) These parameterizations have the corresponding normal vectors:
\begin{align*} \vn_1 \amp = \langle 1,0,0 \rangle\\ \vn_2 \amp = \langle 0,-1,0 \rangle\\ \vn_3 \amp = \langle 0,0,1 \rangle\\ \vn_4 \amp = \langle 1,1,1 \rangle \end{align*}
Notice that \(\vn_1\) and \(\vn_3\) point into \(Q\) while \(\vn_2\) and \(\vn_4\) point out of \(Q\text{.}\) We will take into account the idea that we will need to calculate the flow out of \(Q\) when we sum our flux integrals later.
Figure 12.12.9. The region of integration \(Q\) with each of the four faces in a different color.
We set up and evaluate each of these flux integrals using Theorem 12.9.7:
\begin{align*} S_1\amp : \int_0^{1} \int_0^{1-s} \langle (0)s-t,st-e^1,t(0-s) \rangle \cdot \langle 1,0,0 \rangle \, dt\, ds\\ S_2\amp : \int_0^{1} \int_0^{1-s} \langle s(0)-t,0(t)-e^s,t(s-0) \rangle \cdot \langle 0,-1,0 \rangle \, dt\, ds\\ S_3\amp : \int_0^{1} \int_0^{1-s} \langle st-0,t(0)-e^s, 0(s-t) \rangle \cdot \langle 0,0,1 \rangle \, dt\, ds\\ S_4\amp : \int_0^{1} \int_0^{1-s} \langle st-(1-s-t),t(1-s-t)+e^s,(1-s-t)(s-t) \rangle \\ \amp \quad \quad \quad \quad \cdot \langle 1,1,1 \rangle \, dt\, ds \end{align*}
A strategy we can use to make our calculations more efficient is to note that we can subtract the first and third integrals from the second and fourth (remember the direction of flux) and do one integral. We can do this because the bounds on all of our parameterizations is the same. If we write out everything, we have:
\begin{align*} S_1\amp : \int_0^{1} \int_0^{1-s} -t \, dt\, ds\\ S_2\amp : \int_0^{1} \int_0^{1-s} -e^s \, dt\, ds\\ S_3\amp : \int_0^{1} \int_0^{1-s} 0 \, dt\, ds\\ S_4\amp : \int_0^{1} \int_0^{1-s} -1+2s+t+e^s-s^2 \, dt\, ds \end{align*}
Combining these we have:
\begin{align*} S_4-S_1+S_2-S_3: \amp \quad \int_0^{1} \int_0^{1-s} -1+2s+2t-s^2 \, dt\, ds\\ \amp \int_0^1 (s-1)^2 s \, ds \end{align*}
which evaluates to \(\frac{1}{12}\text{.}\)
(b)
Next, we calculate the triple integral on the right side of the Divergence Theorem for our example. Since \(\vF=\langle xy-z, yz+e^x,z(x-y) \rangle \text{,}\) we can calculate
\begin{align*} \divg(\vF) \amp = \dfrac{\partial}{\partial x}(xy-z)+\dfrac{\partial}{\partial y}(yz-e^x)+\dfrac{\partial}{\partial z}(z(x-y)) \\ \amp = y+z+(x-y) =z+x \end{align*}
The region \(Q\) can be described by the bounds \(0\leq x\leq 1\text{,}\) \(0\leq y\leq 1-x\text{,}\) and \(0\leq z\leq 1-x-y\text{.}\) Thus, our triple integral \(I\) will be set up and evaluated as
\begin{align*} I \amp = \int_0^1 \int_0^{1-x} \int_0^{1-x-y} z+x \, dz \, dy \, dx \\ \amp = \int_0^1 \int_0^{1-x} 1/2(1-x-y)+x(1-x-y) \, dy \, dx \\ \amp =\int_0^1 \frac{1}{12} (\frac{x^3}{3}) \, dx \end{align*}
This evaluates to \(\frac{1}{12}\text{,}\) which matches with the flux calculations we did in the previous step to verify the Divergence Theorem for our example.
The next activity walks you through evaluating both the flux integrals necessary to calculate the flux directly and the triple integral given in the Divergence Theorem for a specific vector field and closed surface.

Activity 12.12.2.

In this activity, we will look at calculating both sides of a non-trivial example of the Divergence Theorem. We will look at the region inside the right circular cylinder shown in Figure 12.12.10. Let \(S\) be the closed surface formed by combining \(S_{\text{top}}\) (in yellow), \(S_{\text{sides}}\) (in blue), and \(S_{\text{bottom}}\) (in magenta). The solid volume \(Q\) is the volume bounded by \(S\text{.}\) The region shown has radius \(2\text{,}\) and its height is \(1\text{.}\) The vector field we consider in this activity is given by
\begin{equation*} \vF=\langle xy-2z,y^2-yz,3x+z^2\rangle\text{.} \end{equation*}
Figure 12.12.10. A closed cylindrical surface
(a)
Figure 12.12.11 shows the vector field \(\vF\) on a region around \(S\text{.}\) Without doing any computations, write a couple of sentences to explain if you think the flux of \(\vF\) through \(S\) will be positive, negative, or zero.
Figure 12.12.11. The vector field \(\vF=\langle xy-2z,y^2-yz,3x+z^2\rangle\) in the region near \(Q\)
(b)
Parametrize each of the surfaces \(S_{\text{top}}\text{,}\) \(S_{\text{sides}}\text{,}\) and \(S_{\text{bottom}}\text{.}\) Be sure to give bounds for each of your parametrization.
(c)
Give inequalities in terms of cylindrical coordinates to describe \(Q\text{.}\)
(d)
Set up and evaluate double integrals to calculate the flux of \(\vF\) through \(S_{\text{top}}\text{,}\) \(S_{\text{sides}}\text{,}\) and \(S_{\text{bottom}}\text{.}\)
(e)
What is the net flux through the closed surface? Be sure to state if the net flux is in or out.
(f)
Compute the divergence of \(\vF\) and use this to explain whether you think \(\iiint_Q \divg(\vF)\, dV\) will be positive, negative, or zero.
(g)
Set up and compute the triple integral for \(\iiint_Q \divg(\vF)\, dV\text{.}\)
Hint.
Use cylindrical coordinates.
(h)
Verify that your answers for part e and part g are the same and thus that the Divergence Theorem holds for this example.
(i)
Was the left-hand side or right-hand side of the equation in the Divergence Theorem more tedious to calculate in this example? Do you think this will be true for most other cases where the Divergence Theorem applies?
The next activity asks you to compute flux in some circumstances where it may be wise to apply Divergence Theorem.

Activity 12.12.3.

(a)
Find the flux of the vector field \(\vF = \langle 3x^2+y^5,5+e^{z^3},z\rangle\) through the surface of the solid cube \(Q\) in \(\R^3\) with \(-2\leq x\leq 2\text{,}\) \(-2\leq y\leq 2\text{,}\) and \(-2\leq z\leq 2\text{.}\)
(b)
Find the flux of the vector field \(\vG = \langle x^3,y^3,z^3\rangle\) through surface consisting of the top half of sphere of radius \(3\) centered at the origin and the disc of radius \(3\) in the \(xy\)-plane (centered at the origin).
Hint.
Spherical coordinates

Subsection 12.12.2 Summary

  • A closed surface is one that has no boundary.
  • The flux of a smooth vector field through a closed surface can be computed by integrating the divergence of the vector field over the volume bounded by the closed surface.

Exercises 12.12.3 Exercises

1.

Verify the Divergence Theorem for the vector field and region:
\(\mathbf{F} = \left\lt 8x ,5z ,7y \right>\) and the region \(x^2+y^2\le 1\text{,}\) \(0\le z \le 8\)
\(\iint_{\mathcal{S}} \mathbf{F} \cdot d\mathbf{S} =\)
\(\iiint_{\mathcal{R}} \text{div} (\mathbf{F}) \,dV=\)

2.

Use the divergence theorem to calculate the flux of the vector field \(\vec{F}(x,y,z) = x^3 \vec{i} + y^3 \vec{j} + z^3 \vec{k}\) out of the closed, outward-oriented surface \(S\) bounding the solid \(x^2 + y^2 \leq 25, \ 0 \leq z \leq 5.\)
\(\displaystyle \iint\limits_S \vec{F} \cdot d\vec{A} =\)

3.

Let \(\mathbf{F}=(y^2 + z^3, x^3 + z^2, xz)\text{.}\) Evaluate \(\iint_{\partial W}\mathbf{F}\cdot d \mathbf{S}\) for each of the following regions \(W\text{:}\)
A. \(x^2 + y^2 \le z \le 10\)
B. \(x^2 + y^2 \le z \le 10, \ x \ge 0\)
C. \(x^2 + y^2 \le z \le 10, \ x \le 0\)

4.

Compute the flux integral \(\int_S\vec F\cdot d\vec A\) in two ways, directly and using the Divergence Theorem. \(S\) is the surface of the box with faces \(x=0,x=3,y=3,y=6,z=0,z=2\text{,}\) closed and oriented outward, and \(\vec{F}=5x^{2}\vec i + 2y^{2}\vec j + 5z^{2}\vec k\text{.}\)
Using the Divergence Theorem,
\(\int_S\vec F\cdot d\vec A = \int_a^b\int_c^d\int_p^q\,\) \(\,dz\,dy\,dx =\) ,
where \(a =\), \(b =\), \(c =\), \(d =\), \(p =\) and \(q =\).
Next, calculating directly, we have \(\int_S\vec F\cdot d\vec A =\) (the sum of the flux through each of the six faces of the box). Calculating the flux through each face separately, we have:
On \(x = 3\text{,}\) \(\int_S\vec F\cdot d\vec A = \int_a^b\int_c^d\) \(dz\,dy\) =
where \(a =\), \(b =\), \(c =\) and \(d =\).
On \(x = 0\text{,}\) \(\int_S\vec F\cdot d\vec A = \int_a^b\int_c^d\) \(dz\,dy\) =
where \(a =\), \(b =\), \(c =\) and \(d =\).
On \(y = 6\text{,}\) \(\int_S\vec F\cdot d\vec A = \int_a^b\int_c^d\) \(dz\,dx\) =
where \(a =\), \(b =\), \(c =\) and \(d =\).
On \(y = 3\text{,}\) \(\int_S\vec F\cdot d\vec A = \int_a^b\int_c^d\) \(dz\,dx\) =
where \(a =\), \(b =\), \(c =\) and \(d =\).
On \(z = 2\text{,}\) \(\int_S\vec F\cdot d\vec A = \int_a^b\int_c^d\) \(dy\,dx\) =
where \(a =\), \(b =\), \(c =\) and \(d =\).
And on \(z = 0\text{,}\) \(\int_S\vec F\cdot d\vec A = \int_a^b\int_c^d\) \(dy\,dx\) =
where \(a =\), \(b =\), \(c =\) and \(d =\).
Thus, summing these, we have \(\int_S\vec F\cdot d\vec A =\)

5.

Let \(Q\) be the volume enclosed by \(x=0\text{,}\) \(x=1\text{,}\) \(y=0\text{,}\) \(y=1\text{,}\) \(z=0\text{,}\) and \(z=1\text{.}\) Compute the flux of \(\vF = \langle z^2-xy,4yz+cos(x/\pi),e^{xyz} \rangle\) through each of the six cube faces.

6.

Let \(Q\) be the volume given in cylindrical coordinates by \(0 \leq z \leq 3\text{,}\) \(1 \leq r \leq 2\text{,}\) and \(0 \leq \theta \lt 2 \pi\text{.}\) Give an example of a vector field with component functions that are linear in \(x\text{,}\) \(y\text{,}\) and \(z\) such that the flux of the vector field through the boundary of \(Q\) is 17.

7.

Let \(Q\) be the volume given in spherical coordinates by \(0 \leq \rho \leq 3\text{,}\) \(0\leq \phi \leq \pi/4\text{,}\) and \(0\leq \theta \lt 2 \pi\text{.}\) Give an example of a vector field with component functions that are not linear or constant such that the flux of the vector field through the boundary of \(Q\) is 25.

8.

Calculate the flux of the given vector field \(\vF\) through the surface \(S\) for each situation below by using an appropriate triple integral from the Divergence Theorem.
(a)
The vector field \(\vF = \langle 2x+3\sin(yz),-4y+e^{x^2} , 7z+\arctan(y^5)\) through the tetrahedron \(S\) with vertices \((0,0,0)\text{,}\) \((1,0,0)\text{,}\) \((0,2,0)\text{,}\) and \((0,0,2)\text{.}\)
(b)
The vector field \(\vF=\langle xy^2,yz^2,zx^2\rangle\) through \(S\text{,}\) the portion of the sphere of radius \(3\) centered at the origin having \(x\geq 0\text{.}\)
Hint.
By itself, \(S\) is not a closed surface. However, you should think about what additional surface \(S'\) you need to add to make a closed surface, then use those pieces to apply the Divergence Theorem.

Subsection 12.12.4 Notes to Instructors and Dependencies

This section relies heavily on understanding flux integrals Section 12.9 as well as the meaning of the divergence of a vector field from Section 12.6 and triple integrals from Section 11.7.
You have attempted of activities on this page.