5.5 The Divergence Theorem

$\newcommand{\curl}{\operatorname{curl}}$ $\newcommand{\div}{\operatorname{div}}$ $\newcommand{\grad}{\operatorname{grad}}$ $\newcommand{\R}{\mathbb R }$ $\newcommand{\N}{\mathbb N }$ $\newcommand{\Z}{\mathbb Z }$ $\newcommand{\bfa}{\mathbf a}$ $\newcommand{\bfb}{\mathbf b}$ $\newcommand{\bfc}{\mathbf c}$ $\newcommand{\bfe}{\mathbf e}$ $\newcommand{\bft}{\mathbf t}$ $\newcommand{\bff}{\mathbf f}$ $\newcommand{\bfn}{\mathbf n}$ $\newcommand{\bfF}{\mathbf F}$ $\newcommand{\bfk}{\mathbf k}$ $\newcommand{\bfg}{\mathbf g}$ $\newcommand{\bfG}{\mathbf G}$ $\newcommand{\bfh}{\mathbf h}$ $\newcommand{\bfu}{\mathbf u}$ $\newcommand{\bfv}{\mathbf v}$ $\newcommand{\bfx}{\mathbf x}$ $\newcommand{\bfp}{\mathbf p}$ $\newcommand{\bfy}{\mathbf y}$ $\newcommand{\ep}{\varepsilon}$

5.5 The Divergence Theorem

  1. Statement of the Divergence Theorem
  2. Some examples
  3. Problems

Statement of the Divergence Theorem

Theorem 1: the Divergence Theorem Let $R\subset \R^3$ be a regular region with piecewise smooth boundary. If $\bfF$ is a vector field that is $C^1$ on an open set containing $R$, then $$ \iint_{\partial R} \bfF\cdot \bfn\,dA = \iiint_R \div \bfF\, dV, $$ where $\bfn$ is the outer unit normal on $\partial R$.

Sketch of the proof. (optional!)

The outline of the proof is the same as that of Green's Theorem:

  1. We will first consider regions of a simple form, and for that class of region, we will prove that the theorem is true for vector fields of a simple form.

    As with Green's Theorem, we will do this by just writing out both sides of the equality that we want to prove, and applying the Fundamental Theorem of Calculus to check that the two sides are equal.

  2. The general case follows from the above special case by cutting a general domain up into pieces that satisfy the hypotheses of the simple case described above; applying the theorem on all of these pieces, then adding things up.

We will go over the first step in some detail. To get started, let's say a region $R\subset\R^3$ is $xy$-simple if it has the form $$ R = \{(x,y,z)\in \R^3 : (x,y)\in W , \ \psi(x,y)\le z \le \phi(x,y)\} $$ for some compact $W\subset \R^2$, where $\psi$ and $\phi$ are $C^1$ functions on an open set containing $W$. We will also assume that $R$ is piecewise smooth, which (it turns out) means that $\partial W$ is a piecewise smooth curve.

We will show that the theorem is true if $R$ is $xy$-simple and if, in addition, $\bfF$ has the form $\bfF(\bfx) = (0,0, F_3(x,y,z))$.

To do this, first we'll write out $\iint_{\partial R} \bfF\cdot \bfn \, dA$. We can split $\partial R$ into $3$ pieces:

It turns out (we omit the details) that at points on $S_{side}$, the unit normal $\bfn$ is parallel to the $xy$-plane, so the special form of $\bfF$ implies that $\bfF\cdot \bfn = 0$ on $S_{side}$, and hence $\iint_{S_{side}} \bfF\cdot\bfn \, dA = 0$. (See exercises).

We can parametrize $S_{top}$ by $\bfG(u,v) := (u,v,\phi(u,v))$ for $(u,v)\in W$. Here the outer unit normal $\bfn$ points upward, which agrees with $\partial_u \bfG\times \partial_v\bfG = (-\partial_u\phi , - \partial_v \phi, 1)$, and it follows that

$$ \iint_{S_{top}} \bfF\cdot \bfn \, dA = \iint_W (0,0,F_3(x,y,\phi(x,y)) \cdot (-\partial_x\phi , - \partial_y \phi, 1) \, dA = \iint_W F_3(x,y,\phi(x,y)) \, dA. $$

The contribution from $S_{bottom}$ is almost the same, except that the outer unit normal now points downward, so taking account of orientation gives rise to a minus sign. Putting these together, we find that \begin{equation}\label{dtat} \iint_{\partial R}\bfF\cdot \bfn \, dA = \iint_W \big[F_3(x,y,\phi(x,y)) - F_3(x,y,\psi(x,y))\big]\ dA. \end{equation} On the other hand, the form of $\bfF$ implies that $\div \bfF = \partial_z F_3$, so $$ \iiint_R \div \bfF\, dV = \iint_{(x,y)\in W}\left( \int_{\psi(x,y)}^{\phi(x,y)} \partial_z F_3(x,y,z)\, dz \right) \, dA. $$ By the Fundamental Theorem of Calculus, this exactly equals the right-hand side of \eqref{dtat}.

This completes the proof under the restrictive assumptions we have made here.

The next step is to define domains that are $xz$-simple or $xz$-simple, (you can figure out what the definitions should be, if you're interested) and to prove that the theorem holds for $\bfF$ of the form $\bfF = (0, F_2(x,y,z), 0)$ if $R$ is $xz$-simple, and for $\bfF$ of the form $(F_1(x,y,z), 0,0)$ if $R$ is $yz$-simple. This is exactly like the argument we have given above.

Once that is done, the theorem is proved for sets $R$ that are $xy$- , $xz$- and $yz$-simple. (This includes the unit ball, the unit cube, any ellipsoid, or indeed any convex set.)

It still remains to partition a general set into regions with all these properties, invoke the theorem on each piece, and add up the results to conclude; we called this Step 2 above. We completely omit the details. $\quad \Box$

Some examples

The Divergence Theorem is very important in applications. Most of these applications are of a rather theoretical character, such as proving theorems about properties of solutions of partial differential equations from mathematical physics. Some examples were discussed in the lectures; we will not say anything about them in these notes. (In fact, some of the applications are simply to proving theorems in other realms of pure mathematics.) These uses of the Divergence Theorem are very interesting, if you like math, but they are also difficult and often time-consuming.

For this reason, it is traditional in vector calculus classes to devote some attention to a different kind of application of the Divergence Theorem: using it to convert complicated-looking integrals into simpler integrals. We will follow this tradition, because students need practice and the really important uses of the theorem are too hard to pick up quickly. But you should not conclude that the main point of the theorem is to let instructors disguise easy integrals as hard integrals, and to let you undo the disguise.

(Example 2 illlustrates a more theoretical use of the Divergence Theorem, as do the exercises involving the vector field $\bfF(\bfx) = \frac{\bfx}{|\bfx|^3}$, which has very interesting properties.)

Example 1 Let $S := \{ (x,y,z)\in \R^3 : x^2+y^2+z^2 = 1\}$, with the unit normal $\bfn$ pointing outward, and compute $$ \iint_S \bfF\cdot \bfn \, dA, \quad\mbox{ for }\bfF = (x+ y, x-y\sin(yz), z\sin(yz)). $$

Solution. Let $R$ be the unit ball $R = \{ \bfx\in \R^3 : |\bfx|\le 1\}$ and notice that $S=\partial R$. Then the Divergence Theorem implies that $$ \iint_S \bfF\cdot \bfn \, dA = \iiint_R \nabla\cdot \bfF\, dV =\cdots = \iiint_R 1 dV = \frac 4 3 \pi. $$

Example 2 (Volume of a cone, revisited). Many examples of uses of the Divergence Theorem are a bit artificial -- complicated-looking problems that are designed to simplify once the theorem is used in a suitable way. Here is a less articifial example:

Assume that $A$ is a measurable subset of the $xy$-plane with piecewise smooth boundary, and for $h>0$ $$ R := \{( sx, sy, sh )\in \R^3 : 0\le s\le 1, (x,y)\in A\}. $$ Thus $R$ is an upside-down cone of height $h$, whose vertex is at the origin, and whose base is a copy of $A$ sitting in a copy of the $xy$-plane a height $h$ above the origin. Use the Divergence Theorem to compute the volume of $R$ in terms of the area of $A$.

(In Section 4.4 we computed the volume of a cone by a different technique. That was probably easier, but this approach is interesting....)

Let $\bfF$ be the vector field $\bfF = (x,y,z)$. Since $\nabla\cdot\bfF = 3$, the Divergence Theorem implies that $$ \mbox{Vol}(R) = \frac 13 \iiint_R \nabla\cdot \bfF\, dV = \frac 13\iint_{\partial R} \bfF\cdot \bfn\, dA. $$ Let's write $\partial R = S_{top}\cup S_{side}$, with $$ \begin{aligned} S_{top} &:= \{( x, y, h)\in \R^3 : (x,y)\in A \}, \\ S_{side} &:= \{( sx, sy, sh ) \in\R^3 : 0\le s\le 1, (x,y)\in \partial A\}. \end{aligned} $$ We claim that \begin{equation}\label{claim} \iint_{S_{side}} \bfF\cdot \bfn \, dA = 0. \end{equation} Roughly speaking, this is true because $\bfF\cdot \bfn = 0$ on $S_{side}$ You may be able to see this in your mind's eye -- give it a try. It may help to close your (corporal) eyes. If after this you still want a proof,

click here.

For a proof, we have to parametrize $S_{side}$. To do this, let $(x(t), y(t))$, $a\le t\le b$ be a parametrization of $\partial A$ (which is a $C^1$ curve in $\R^2$). Then $S_{side}$ is parametrized by $$ \bfG(s,t) := (s x(t), s y(t), sh) , \quad 0\le s \le 1, \quad a\le t\le b. $$ Since the definition of $\bfF$ may be written $\bfF(\bfx) = \bfx$, we see that $\bfF(\bfG(s,t)) = \bfG(s,t)$. Also, it is clear that $\partial_s \bfG(s,t) = \frac 1 s \bfG(s,t)$ for $0<s\le 1$. Thus (because it is always true that $\bfv\cdot(\bfv\times {\bf w})=0$) it follows that $$ \bfF(\bfG(s,t)) \cdot ( \partial_s\bfG\times \partial_t\bfG)(s,t) = \bfG(s,t)\cdot( \frac 1 s \bfG\times \partial_t\bfG)(s,t) = 0. $$ This shows that $\bfF\cdot \bfn = 0$ on $S_{side}$, as claimed. Then \eqref{claim} follows easily.

On the other hand, it is straightforward to check that $\bfF\cdot\bfn = h$ on $S_{top}$, and hence that $$ \iint_{S_{top}} \bfF\cdot \bfn \, dA = h \, \mbox{area}(A). $$ (For example, if you wish you can parametrize $S_{top}$ by $\bfG(s,t) = (s,t,h)$ for $(s,t)\in A$, and then use the standard formula for computing a surface integral via a parametrization.) Putting all this together, one finds that for a cone $R$, $$ \mbox{Vol}(R) = \frac 13 \, h \cdot \mbox{Area}(A) = \frac 13\mbox{height}\times \mbox{ area of base}. $$

Example 3: moving the surface. Let $S := \{(x,y,z) :x^2+y^2\le 1, z = 1- x^2-y^2 \} $, with the unit normal oriented upward, and compute $$ \iint_S \bfF\cdot \bfn\, dA\quad\mbox{ for }\bfF = (e^{yz}, \frac {x^2}{1+z^2}, 2z). $$

Here is what $S$ looks like:

bowl$\qquad\qquad$

Solution: Let $R :=\{(x,y,z)\in \R^3 : x^2+y^2\le 1, 0\le z \le 1 - x^2-y^2\}$, with the unit normal oriented outward. Thus $R$ is the region between $S$ and the $xy$-plane, and $\partial R = S\cup S'$, where $S' = \{(x,y,z) :x^2+y^2\le 1, z = 0 \}$ (with the unit normal oriented downward on $S'$). So $$ \iiint_{R} \nabla \cdot \bfF \, dV = \iint_{\partial R} \bfF\cdot \bfn \, dA = \iint_{S} \bfF\cdot \bfn \, dA + \iint_{S'} \bfF\cdot \bfn \, dA. $$ So $$ \iint_{S} \bfF\cdot \bfn \, dA = \iiint_{R} \nabla \cdot \bfF\, dV -\iint_{S'} \bfF\cdot \bfn \, dA, $$ and these are both straightforward to evaluate. Indeed, $$ \iiint_{R} \nabla \cdot \bfF\, dV = \iiint_{R}2 \, dV = 2\mbox{Vol}(R) = \int_0^1 \int_0^{2\pi} \int_0^{1-r^2} 2\,r\, dz\,d\theta\, dr =\pi . $$ Also, we can see that $\bfn = (0,0,-1)$ on $S'$ and hence that $\bfF\cdot \bfn = -2z$ on $S'$. Since $z=0$ on $S'$, it follows that $ \iint_{S'} \bfF\cdot \bfn \, dA = 0. $ We conclude that $$\iint_S \bfF\cdot \bfn \, dA = \pi. $$

Example 4. Assume that $R$ is a regular region in $\R^3$ with a piecewise smooth boundary, and let $\bfF$ be a vector field that is $C^2$ on an open set containing $R$. Compute $$ \iint_{\partial R} (\nabla \times \bfF)\cdot \bfn \, dA. $$

Note that when we integrate over the boundary of a regular region, the default assumption is that $\bfn$ is oriented outward. Since there is a clear default, we do not always bother to specify the direction of $\bfn$.</font./

Solution. By the Divergence Theorem, $$ \iint_{\partial R} (\nabla\times \bfF)\cdot \bfn\, dA = \iiint_R \nabla\cdot(\nabla \times \bfF) \, dV = 0 $$ since the divergence of a curl always equals zero.

Example 5. How to make a (rather easy) question involving the Divergence Theorem:

  1. start with a moderately complicated vector field, say $\bfF = (e^{yz}, xyz, \cos(xz))$.
  2. compute its curl and call it $\bfG$. $$ \nabla \times \bfF = ( -xy , ye^{yz} + z\sin(xz), yz-ze^{yz}) =:\bfG $$
  3. Make up a complicated region satisfying the hypotheses in the Divergence Theorem, say $$ R := \{ (x,y,z)\in \R^3 : 0 \le z\le 5- x^4- y^6 , x+y+z\ge 0 \}. $$
  4. Ask someone to compute $$ \iint_{\partial R} \bfG\cdot \bfn \, dA, $$ for $\bfG$ and $R$ as above (without mentioning that $\bfG$ is the curl of some other vector field.)

According to Example 4, it must be the case that the integral equals zero, and indeed it is easy to use the Divergence Theorem to check that this is the case.

Example 6. How to make a (slightly less easy) question involving the Divergence Theorem:

  1. Follow steps 1-2 as above to come up with a complicated-looking vector field that is the curl of some other vector field $\bfF$, and hence that is guaranteeed to have divergence equal to $0$, say $( -xy , ye^{yz} + z\sin(xz), yz-ze^{yz})$ as above.

  2. Add a simple vector field whose divergenec is (for example) constant, such as $(x,0,0)$ and call the result $\bfG$: $$ \bfG = (x -xy , ye^{yz} + z\sin(xz), yz-ze^{yz}). $$ Then for this example, we can see that $\div \bfG = \div (x,0,0) + \div(\cdots) = 1$.

  3. Make up a region whose volume is easy to compute, for example $R = $ the cone in $\R^3$ whose base is the rectangle $2\le x \le 3, 4 \le y \le 9$ and whose vertex is the point $(0,0,2)$.

  4. Ask someone to compute $$ \iint_{\partial R} \bfG\cdot \bfn \, dA. $$ Then the Divergence Theorem and the choice of $\bfG$ guarantees that this integral equals the volume of $R$, which we know is $\frac 13(\mbox{area of rectangle})\times \mbox{height} = \frac{10}3$. The person evaluating the integral should figure this out pretty easily.

Problems

Basic skills

Use the Divergence Theorem to evaluate integrals, either by applying the theorem directly or by using the theorem to move the surface. For example,

Other questions

  1. Assume that $R$ is a subset of $\R^3$ satisfying the assumptions of the Divergence Theorem. Also assume that $f$ is a function and $\bfG$ is a vector field, both of them $C^1$ on an open set containing $R$. Prove that $$ \iiint_R \nabla f \cdot \bfG \,dV = -\iiint_R f \nabla \cdot \bfG\,dV + \iint_{\partial R} f \bfG\cdot \bfn \, dA . $$

  2. Assume that $R$ is a subset of $\R^3$ satisfying the assumptions of the Divergence Theorem. Also assume that $\bfF$ and $\bfG$ are $C^1$ vector fields on an open set containing $R$. Prove that $$ \iiint_R (\nabla\times \bfF) \cdot \bfG \,dV = \iiint_R F\cdot (\nabla \times \bfG)\,dV + \iint_{\partial R} (\bfF\times \bfG)\cdot \bfn \, dA . $$

  3. Assume that $R\subset \R^3$ has the form $$ R = \{(x,y,z)\in \R^3 : (x,y)\in W , \ \psi(x,y)\le z \le \phi(x,y)\} $$ for some compact $W\subset \R^2$, where $\psi$ and $\phi$ are $C^1$ functions on an open set containing $W$. Also assume that $\partial W$ is a smooth closed curve. (Thus, $R$ is $xy$-simple, in terminology we used when describing the proof of the Divergence Theorem.)
    Without using the Divergence Theorem, prove that if $\bfF$ has the form $\bfF = (0,0,F_3(x,y,z))$, then $\iint_{S_{side}} \bfF\cdot \bfn \ dA = 0$, where $$ S_{side} := \{ (x,y,z)\in \R^3 : (x,y)\in\partial W , \psi(x,y)\le z \le \phi(x,y)\} $$ with $\bfn$ oriented outward (though it ends up not mattering).

Since you can't use the theorem, you have to evaluate the integral. To do this, you have to parametrize $S_{side}$. This is similar to issues that arise in Example 2, though actually a little easier.

$\Leftarrow$  $\Uparrow$  $\Rightarrow$