Skip to main content
Logo image

Coordinated Multivariable Calculus

Section 4.10 The Divergence Theorem

In Section 4.9 we examined vector fields for 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, then generalizing these ideas to higher dimensions.
In Section 4.8, 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 4.9. 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.
A surface in three dimensions is said to be closed if it has no boundary. Think of a closed surface as being one that is “airtight”. In Figure 4.10.1, we show two surfaces that are not closed, as demonstrated by the red curves marking the edge where the surface ends.
Figure 4.10.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 4.10.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 4.10.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 4.10.3 illustrates three different ways to complete the cylindrical surface into a closed surface.
Figure 4.10.3. Three ways to close a cylindrical surface by adding a top and bottom

Subsection 4.10.1 Measuring the Flux through a Closed Surface

Preview Activity 4.10.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 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 4.10.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 4.10.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 4.10.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 4.10.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 4.10.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 4.10.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 4.10.2 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 volume density 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 boundary of that volume (which is a closed surface), 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 Theorem 4.11.5. The next activity walks you through evaluating both the flux integrals necessary to calculate the flux directly and the triple integral of the divergence theorem for a specific vector field and closed surface.

Activity 4.10.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 4.10.8. 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{.}\)
Figure 4.10.8. A closed cylindrical surface
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*}
(a)
Figure 4.10.9 shows the vector field \(\vF\) on a region around \(S\text{.}\) Do you think the flux of \(\vF\) through \(S\) will be positive, negative, or zero?
Figure 4.10.9. 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?
We finish this section with an activity that asks you to calculate the flux of a vector field through some closed surfaces without guiding you step-by-step.

Activity 4.10.3.

Calculate the flux of the given vector field \(\vF\) through the surface \(S\) for each situation below.
(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{.}\)
Answer.
\(10/3\)
(b)
The vector field \(\vF=\langle xy^2,yz^2,zx^2\rangle\) through the closed portion \(S\) 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, think about what additional surface \(S'\) you need to add to make a closed surface.

Subsection 4.10.3 Computing volume as a flux integral

Remember that in Subsection 4.6.4 we showed how to compute area using Green’s Theorem. A similar idea will allow us to compute volume using the Divergence Theorem. If we have a vector field \(\mathbf{F}\) for which \(\divg(\mathbf{F}) = 1\text{,}\) then the triple integral in the statement of the Divergence Theorem becomes volume. Luckily, there are many such vector fields \(\mathbf{F}\text{.}\)

Using the Divergence Theorem to compute volume.

If \(S\) is a closed surface that serves as the boundary of a solid \(W\text{,}\) then the volume of \(W\) is the flux out through \(S\) of any of the following vector fields \(\mathbf{F}\text{.}\)
\begin{align*} \mathbf{F}(x,y,z) \amp = \langle x,0,0 \rangle \\ \mathbf{F}(x,y,z) \amp = \langle 0,y,0 \rangle \\ \mathbf{F}(x,y,z) \amp = \langle 0,0,z \rangle \\ \mathbf{F}(x,y,z) \amp = \frac13 \langle x,y,z \rangle \end{align*}

Example 4.10.10.

Use the Divergence Theorem to find the volume of \(W\text{,}\) the part of the solid \(x^2 + y^2 \le (2 - z)^2\) with \(0 \le z \le 1\text{.}\) Use the vector field \(\mathbf{F} = \frac12 \langle x,y,0 \rangle\text{.}\)
Solution.
Notice that the flux out of the top or bottom of the truncated cone is 0 because \(\mathbf{F} \cdot \pm \mathbf{k} = 0\text{.}\) So we only need to worry about the outer face.
The cone is given in polar coordinates by the equation \(r = 2 - z\text{.}\) We parametrize the outer face using cylindrical coordinates:
\begin{equation*} \mathbf{r}(\theta,z) = \langle (2 - z)\cos\theta, (2-z)\sin\theta, z \rangle \end{equation*}
Exercise. Show that
\begin{equation*} \mathbf{r}_\theta \times \mathbf{r}_z = (2-z)\langle \cos\theta,\sin\theta,1 \rangle \end{equation*}
Plugging everything in, we have
\begin{align*} \mathbf{F}(\mathbf{r}(\theta,z)) \amp = \frac12\langle (2-z) \cos\theta,(2-z)\sin\theta,0 \rangle \cdot (2-z)\langle \cos\theta,\sin\theta,1 \rangle\\ \amp = \frac12 ((2-z)^2). \end{align*}
Now we can compute the flux of \(\mathbf{F}\) through the outer face, which by the Divergence Theorem is the volume:
\begin{equation*} \text{flux} = \int\limits_{\theta = 0}^{2\pi} \int\limits_{z = 0}^1 \frac12 (2 - z)^2 \,dzd\theta = \cdots = \frac{7\pi}{3}. \end{equation*}

Example 4.10.11.

By applying the Divergence Theorem to the vector field \(\mathbf{F} = \frac13 \langle x,y,z \rangle\text{,}\) compute the volume of the ellipsoid \((\frac{x}{a})^2 + (\frac{y}{b})^2 + (\frac{z}{c})^2 = 1\text{,}\) which is parametrized by
\begin{align*} x(\phi,\theta) \amp = a \sin\phi \cos\theta \\ y(\phi,\theta) \amp = b \sin\phi \sin\theta \\ z(\phi,\theta) \amp = c \cos\phi \end{align*}
for \(0 \le \theta \le 2\pi\text{,}\) \(0 \le \phi \le \pi\text{.}\)
Solution.
Writing \(\mathbf{r}\) for the parametrization described in the problem, you can show that
\begin{equation*} \mathbf{r}_\phi \times \mathbf{r}_\theta = abc \sin\phi \left\langle \frac{\sin\phi \cos\theta}{a},~ \frac{\sin\phi\sin\theta}{b},~ \frac{\cos\phi}{c} \right\rangle . \end{equation*}
Then
\begin{equation*} \mathbf{F}(\mathbf{r}(\phi,\theta))\cdot (\mathbf{r}_\phi \times \mathbf{r}_\theta) = \frac{abc \sin\phi}{3}. \end{equation*}
Now we can finish the computation:
\begin{equation*} \int\limits_{\theta = 0}^{2\pi} \int\limits_{\phi = 0}^\pi \frac{abc}{3} \sin\phi \, d\phi d\theta = \frac{4\pi}{3} abc \end{equation*}

Subsection 4.10.4 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 4.10.5 Exercises

1.

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.

2.

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.

3.

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.