- The Divergence Theorem
- Examples
- Problems

\(\Leftarrow\)\(\Uparrow\)\(\Rightarrow\)

## The Divergence Theorem

How can we generalize Green’s Theorem to higher dimensions? For a suitable set \(S\), we want to compare \(\int\cdots\int_S f d^nV^n\) to \(\int\cdots\int_{\partial S} \mathbf F\cdot \mathbf n d^{n-1}V^{n-1}\), where \(f\) and \(\mathbf F\) are related, and \(\mathbf n\) is a unit vector that is normal to the surface. The two dimensional case is Green’s Theorem, in the second formulation, where \(f=\frac{\partial}{\partial x}F_1 + \frac{\partial}{\partial y}F_2\). Note that this is what we have called the *divergence* of \(F\), hence the generalization will be

Let \(R\subseteq \R^3\) be a regular region with piecewise smooth boundary. If \(\mathbf F\) is a vector field that is \(C^1\) on an open set containing \(R\), then \[\iint_{\partial R} \mathbf F\cdot \mathbf n\,dA = \iiint_R \div \mathbf F\, dV,\] where \(\mathbf n\) is the outer unit normal on \(\partial R\).

## Sketch of the proof.

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

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

- 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\subseteq\R^3\) is \(xy\)-simple if it has the form \[R = \left\{(x,y,z)\in \R^3 : (x,y)\in W , \ \psi(x,y)\le z \le \phi(x,y)\right\} \] for some compact \(W\subseteq \R^2\), where \(\psi\) and \(\phi\) are \(C^1\) functions on an open set containing \(W\). We will also suppose 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, \(\mathbf F\) has the form \(\mathbf F(\mathbf x) = (0,0, F_3(x,y,z))\).

To do this, write out \(\iint_{\partial R} \mathbf F\cdot \mathbf n \, dA\). We can split \(\partial R\) into \(3\) pieces:

- \(S_{top} = \left\{ (x,y,z)\in \R^3 : (x,y)\in W , \ z = \phi(x,y)\right\}\)
- \(S_{bottom} = \left\{ (x,y,z)\in \R^3 : (x,y)\in W , \ z = \psi(x,y)\right\}\)
- \(S_{side} = \left\{ (x,y,z)\in \R^3 : (x,y)\in\partial W , \psi(x,y)\le z \le \phi(x,y)\right\}\)

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

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

\[\iint_{S_{top}} \mathbf F\cdot \mathbf n \, 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}\mathbf F\cdot \mathbf n \, 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 \(\mathbf F\) implies that \(\div \mathbf F = \partial_z F_3\), so \[\iiint_R \div \mathbf F\, 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 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, and to prove that the theorem holds for \(\mathbf F\) of the form \(\mathbf F = (0, F_2(x,y,z), 0)\) if \(R\) is \(xz\)-simple, and for \(\mathbf F\) 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 any convex set.

## Examples

The Divergence Theorem has many applications. The most important are not simplifying computations but are theoretical applications, such as proving theorems about properties of solutions of partial differential equations. Some examples were discussed in the lectures; we will not say anything about them in these notes. Some of the applications are to prove theorems in other areas of pure mathematics. These uses of the Divergence Theorem are very interesting, but they are also difficult and often time-consuming.

For this reason, it is traditional in vector calculus courses use the Divergence Theorem to convert complicated 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 is to disguise easy integrals as hard integrals**, and to let you undo the disguise. These are non-practical applications which serve to demonstrate how the theorem works.

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

### Example 1

Let \(S = \left\{(x,y,z)\in \R^3 : x^2+y^2+z^2 = 1\right\}\), with the unit normal \(\mathbf n\) pointing outward. Compute \[\iint_S \mathbf F\cdot \mathbf n \, dA, \quad\text{ for }\mathbf F = (x+ y, x-y\sin(yz), z\sin(yz)).\]## Solution.

Let \(R\) be the unit ball \(R = \left\{ \mathbf x\in \R^3 : |\mathbf x|\le 1\right\}\) and notice that \(S=\partial R\). Then the Divergence Theorem implies that \[\iint_S \mathbf F\cdot \mathbf n \, dA = \iiint_R \nabla\cdot \mathbf F\, 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:

Suppose that \(A\) is a measurable subset of the \(xy\)-plane with piecewise smooth boundary, and for \(h>0\) \[R = \left\{( sx, sy, sh )\in \R^3 : 0\le s\le 1, (x,y)\in A\right\}.\] 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, Example 5, we computed the volume of a cone by a different technique. That was easier, but this approach is interesting.

## Solution

Let \(\mathbf F\) be the vector field \(\mathbf F = (x,y,z)\). Since \(\nabla\cdot\mathbf F = 3\), the Divergence Theorem implies that \[\text{Vol}(R) = \frac 13 \iiint_R \nabla\cdot \mathbf F\, dV = \frac 13\iint_{\partial R}\mathbf F\cdot \mathbf n\, dA.\] Let’s write \(\partial R = S_{top}\cup S_{side}\), with \[\begin{aligned}S_{top} &= \left\{( x, y, h)\in \R^3 : (x,y)\in A \right\}, \\S_{side} &= \left\{( sx, sy, sh ) \in\R^3 : 0\le s\le 1, (x,y)\in \partial A\right\}.\end{aligned}\] We claim that \[\begin{equation}\label{claim}\iint_{S_{side}} \mathbf F\cdot \mathbf n \, dA = 0.\end{equation}\] Roughly speaking, this is true because \(\mathbf F\cdot \mathbf n = 0\) on \(S_{side}\) You may be able to*see*this in your mind’s eye – give it a try. If after this you still want a proof:

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 \[\mathbf G(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 \(\mathbf F\) may be written \(\mathbf F(\mathbf x) = \mathbf x\), we see that \(\mathbf F(\mathbf G(s,t)) = \mathbf G(s,t)\). Also, it is clear that \(\partial_s \mathbf G(s,t) = \frac 1 s \mathbf G(s,t)\) for \(0<s\le 1\). Thus (because it is always true that \(\mathbf v\cdot(\mathbf v\times {\bf w})=0\)) it follows that \[\mathbf F(\mathbf G(s,t)) \cdot ( \partial_s\mathbf G\times \partial_t\mathbf G)(s,t) =\mathbf G(s,t)\cdot( \frac 1 s \mathbf G\times \partial_t\mathbf G)(s,t) = 0.\] This shows that \(\mathbf F\cdot \mathbf n = 0\) on \(S_{side}\), as claimed. Then \(\eqref{claim}\) follows easily.

### Example 3: “Moving the Surface.”

Let \(S = \left\{(x,y,z) :x^2+y^2\le 1, z = 1- x^2-y^2 \right\}\), with the unit normal oriented upward.

Here is what \(S\) looks like:

## Solution

Let \(R =\left\{(x,y,z)\in \R^3 : x^2+y^2\le 1, 0\le z \le 1 - x^2-y^2\right\}\), 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' = \left\{(x,y,z) :x^2+y^2\le 1, z = 0 \right\}\) (with the unit normal oriented downward on \(S'\)). So \[\iiint_{R} \nabla \cdot \mathbf F \, dV = \iint_{\partial R} \mathbf F\cdot \mathbf n \, dA = \iint_{S} \mathbf F\cdot \mathbf n \, dA+ \iint_{S'} \mathbf F\cdot \mathbf n \, dA.\] So \[\iint_{S} \mathbf F\cdot \mathbf n \, dA= \iiint_{R} \nabla \cdot \mathbf F\, dV-\iint_{S'} \mathbf F\cdot \mathbf n \, dA,\] and these are both straightforward to evaluate. Indeed, \[ \iiint_{R} \nabla \cdot \mathbf F\, dV = \iiint_{R}2 \, dV = 2\text{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 \(\mathbf n = (0,0,-1)\) on \(S'\) and hence that \(\mathbf F\cdot \mathbf n = -2z\) on \(S'\). Since \(z=0\) on \(S'\), it follows that $ _{S’} Fn , dA = 0. $ We conclude that \[\iint_S \mathbf F\cdot \mathbf n \, dA = \pi. \]### Example 4.

Suppose that \(R\) is a regular region in \(\R^3\) with a piecewise smooth boundary, and let \(\mathbf F\) be a vector field that is \(C^2\) on an open set containing \(R\). Compute \[\iint_{\partial R} (\nabla \times \mathbf F)\cdot \mathbf n \, dA.\]

Note that when we integrate over the boundary of a regular region, the default assumption is that \(\mathbf n\) is oriented outward. Since there is a clear default, we do not always bother to specify the direction of \(\mathbf n\).

## Solution.

By the Divergence Theorem, \[\iint_{\partial R} (\nabla\times \mathbf F)\cdot \mathbf n\, dA = \iiint_R \nabla\cdot(\nabla \times \mathbf F) \, dV = 0\] since the divergence of a curl always equals zero.### Example 5.

Here is a method to make a question involving the Divergence Theorem:

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

### Example 6.

Here is a method to make another question involving the Divergence Theorem:

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

Add a simple vector field whose divergence is simple, such as \((x,0,0)\) and call the result \(\mathbf G:\) \[\mathbf G = (x -xy , ye^{yz} + z\sin(xz), yz-ze^{yz}).\] Then for this example, we can see that \(\div \mathbf G = \div (x,0,0) + \div(\curl \mathbf F) = 1\).

Make up a region whose volume is easy to compute, for example let \(R\) be 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)\).

Ask someone to compute \[\iint_{\partial R} \mathbf G\cdot \mathbf n \, dA.\]

The Divergence Theorem and the choice of \(\mathbf G\) guarantees that this integral equals the volume of \(R\), which we know is \(\frac 13(\text{area of rectangle})\times \text{height} = \frac{10}3\). The person evaluating the integral will see this quickly by applying Divergence Theorem, or will slog through some difficult computations otherwise.

## Problems

### Basic

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

Let \(S\) be the ellipse \((\frac x a)^2 + (\frac yb)^2 + (\frac zc)^2 = 1\), with \(\mathbf n\) oriented outwards, and compute \(\iint_S \mathbf F\cdot \mathbf n\, dA\) for \(\mathbf F = (-a^2y,b^2x,z^2)\).

Let \(S\) be the half-ellipse described by \[\left(\frac x a\right)^2 + \left(\frac yb\right)^2 + \left(\frac zc\right)^2 = 1, \qquad z\ge 0\] with \(\mathbf n\) oriented upwards, and compute \(\iint_S \mathbf F\cdot \mathbf n\, dA\) for \(\mathbf F = (-a^2y+e^z,b^2x,z^2)\).

For \(R = \left\{(x,y,z) : |x| + 2|y| + 3|z| \le 4 \right\}\), compute \[\iint_{\partial R} \mathbf F\cdot \mathbf n\, dA\] for \(\mathbf F(x,y,z) = (x+ y^2z ,\frac {yz}{\sqrt{1+z^2}} - y, -\sqrt{1+z^2} )\).

For \(S = \left\{(x,y,z) : |x| + 2|y| + 3|z| = 4, z\ge 0 \right\}\), with \(\mathbf n\) pointing upward, compute \[\iint_{S} \mathbf F\cdot \mathbf n\, dA\] for \(\mathbf F(x,y,z) = \left(x+ y^2z ,\dfrac{yz}{\sqrt{1+z^2}} - y, -\sqrt{1+z^2}\right)\).

Let \(W\) be a compact subset of \(\R^2\) with piecewise smooth boundary, and suppose that \(\phi:W\to \R\) is a \(C^1\) function, and suppose that \(\phi(x,y)>0\) for all \((x,y)\in W\). Let \(R = \left\{(x,y,z)\in \R^3 : 0\le z \le \phi(x,y)\right\}\), and let \[\begin{aligned}S_{top} &= \left\{(x,y,z)\in \R^3 : (x,y)\in W, z = \phi(x,y) \right\} \\S_{side} &= \left\{(x,y,z)\in \R^3 : (x,y)\in \partial W,0 \le z \le \phi(x,y)\right\} \\S_{bottom} &= \left\{(x,y,z)\in \R^3 : \ (x,y)\in W, z=0 \right\} .\end{aligned}\]

Let \(\mathbf F\) denote the constant vector field \(\mathbf F = (0,0,1)\).

- Explain to yourself why \(\mathbf F\cdot \mathbf n = 0\) on \(S_{side}\).
- Using \(\mathbf F\cdot \mathbf n = 0\) on \(S_{side}\), expresss \(\iint_{\partial R}\mathbf F \cdot \mathbf n\, dA\) as a linear combination of \(\iint_{S_{top}}\mathbf F \cdot \mathbf n \, dA\) and \(\iint_{S_{bottom}}\mathbf F \cdot \mathbf n \, dA\).
- Use the Divergence Theorem to evaluate \(\iint_{\partial R}\mathbf F \cdot \mathbf n\, dA\).
- Compute \(\iint_{S_{bottom}}\mathbf F \cdot \mathbf n \, dA\).
- Conclude from the above considerations that \[\begin{equation}\label{projarea}\iint_{S_{top}} (0,0,1) \cdot \mathbf n \, dA = \text{Area}(W).\end{equation}\]This can also be proved, more easily in fact, by directly evaluating the integral on the left. This was an exercise in Section 5.3. But this way of looking at it provides conceptual perspective.

Let \(S\) be the portion of the surface \(z = \sin^2 (xe^y)\) within the cylinder \(x^2+y^2 = 1\). Evaluate the integral \[\iint_S (0,0,1)\cdot \mathbf n \, dA\qquad\text{ with }\mathbf n\text{ oriented upwards}.\]

## Hint

Look around for inspiration.Let \(S\) be the portion of the surface \(y = \sin^2 (xe^z)\) within the cylinder \(x^2+z^2 = 1\). Evaluate the integral \[\iint_S (0,1,0)\cdot \mathbf n \, dA\qquad\text{ with }\mathbf n\text{ oriented in thepositive }y\text{ direction}.\]

Let \(R\subseteq \R^3\) be any ball centered at the origin, \(R =\left\{(x,y,z) \in \R^3 : x^2+y^2+z^2 \le a^2 \right\}\), and let \(\mathbf F\) be the vector field \(\mathbf F(\mathbf x) = \dfrac {\mathbf x}{|\mathbf x|^3}\).

- compute \(\nabla \cdot \mathbf F\).
- evaluate \(\iint_{\partial R} \mathbf F\cdot \mathbf n \, dA\) directly (that is, without using the Divergence Theorem.)
- Is it true that \[\iint_{\partial R} \mathbf F\cdot \mathbf n \, dA = \iiint_R \nabla \cdot \mathbf F\, dV \ \ ?\] If not, does this contradict the theorem?

Let \(R\subseteq \R^3\) be any regular region with piecewise smooth boundary such that \({\bf 0}\subseteq R^{int}\). Show that \[\iint_{\partial R} \mathbf F\cdot \mathbf n \, dA = 4\pi \qquad\text{ for }\mathbf F(\mathbf x) = \frac {\mathbf x}{|\mathbf x|^3}.\]

## Hint

Choose \(a>0\) such that \(B(a, {\bf 0})\subseteq R^{int}\) and apply the Divergence Theorem to \(R_1 = R \setminus B(a, {\bf 0})\). Use facts established in the previous problem.Make up a complicated-looking integral that can be easily computed using the Divergence Theorem. Post it on Quercus.

### Advanced

Suppose that \(R\) is a subset of \(\R^3\) satisfying the assumptions of the Divergence Theorem. Also suppose that \(f\) is a function and \(\mathbf G\) is a vector field, both of them \(C^1\) on an open set containing \(R\). Prove that \[\iiint_R \nabla f \cdot \mathbf G \,dV =-\iiint_R f \nabla \cdot \mathbf G\,dV + \iint_{\partial R} f \mathbf G\cdot \mathbf n \, dA .\]

Suppose that \(R\) is a subset of \(\R^3\) satisfying the assumptions of the Divergence Theorem. Also suppose that \(\mathbf F\) and \(\mathbf G\) are \(C^1\) vector fields on an open set containing \(R\). Prove that \[\iiint_R (\nabla\times \mathbf F) \cdot \mathbf G \,dV =\iiint_R F\cdot (\nabla \times \mathbf G)\,dV + \iint_{\partial R} (\mathbf F\times \mathbf G)\cdot \mathbf n \, dA.\]

Suppose that \(R\subseteq \R^3\) has the form \[R = \left\{(x,y,z)\in \R^3 : (x,y)\in W , \psi(x,y)\le z \le \phi(x,y)\right\} \] for some compact \(W\subseteq \R^2\), where \(\psi\) and \(\phi\) are \(C^1\) functions on an open set containing \(W\). Also suppose 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 \(\mathbf F\) has the form \(\mathbf F = (0,0,F_3(x,y,z))\), then \(\iint_{S_{side}} \mathbf F\cdot \mathbf n \ dA = 0\), where \[S_{side} = \left\{ (x,y,z)\in \R^3 : (x,y)\in\partial W , \psi(x,y)\le z \le \phi(x,y)\right\}\] with \(\mathbf n\) oriented outward (though it ends up not mattering).

## Hint

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\)

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Canada License.