The Divergence Theorem

The Divergence Theorem relates flux of a vector field through the boundary of a region to a triple integral over the region. In particular, let $\vec{F}$ be a vector field, and let R be a region in space. Then

$$\dint_{\partial R} \vec{F} \cdot \bvec{dS} = \tint_R \diverg \vec{F}\,dV.$$

Here are some examples which should clarify what I mean by the boundary of a region.

If R is the solid sphere $x^2
   + y^2 + z^2 \le 1$ , its boundary $\partial R$ is the sphere $x^2 + y^2 + z^2 = 1$ .

$$\hbox{\epsfysize=2in \epsffile{divergence-theorem-1.eps}}$$

Suppose R is the solid cylinder

$$x^2 + y^2 \le 1, \quad 0 \le z \le 1.$$

$$\hbox{\epsfysize=2in \epsffile{divergence-theorem-2.eps}}$$

The boundary $\partial R$ consists of the cylinder $x^2 + y^2 = 1$ for $0 \le z \le 1$ , the top $x^2 + y^2 \le 1$ , $z = 1$ , and the bottom $x^2 + y^2 \le 1$ , $z = 0$ .

$$\hbox{\epsfysize=2in \epsffile{divergence-theorem-3.eps}}$$

Suppose R is the solid cone $\sqrt{x^2 + y^2} \le 1$ .

$$\hbox{\epsfysize=2in \epsffile{divergence-theorem-4.eps}}$$

The boundary $\partial R$ consists of the top $x^2 + y^2 \le 1$ , $z = 1$ and the conical surface $z = \sqrt{x^2 +
   y^2}$ for $0 \le z \le 1$ .

$$\hbox{\epsfysize=2in \epsffile{divergence-theorem-5.eps}}\hskip0.5in\quad\halmos$$


Here are some examples which show how the Divergence Theorem is used.


Example. Apply the Divergence Theorem to the radial vector field $\vec{F}
   = (x, y, z)$ over a region R in space.

$$\diverg \vec{F} = 1 + 1 + 1 = 3.$$

The Divergence Theorem says

$$\dint_{\partial R} \vec{F} \cdot \bvec{dS} = \tint_R 3\,dV = 3 \cdot (\hbox{the volume of R}).$$

This is similar to the formula for the area of a region in the plane which I derived using Green's theorem.


Example. Let R be the box

$$\left\{\matrix{ 0 \le x \le 1 \cr 0 \le y \le 2 \cr 0 \le z \le 2 \cr}\right\}$$

Find the flux of $\vec{F} =
   (x^2, 4 y, 6 y z)$ out of the boundary of R.

$$\hbox{\epsfysize=1.75in \epsffile{divergence-theorem-6.eps}}$$

$$\diverg \vec{F} = 2 x + 4 + 6 y.$$

By the Divergence Theorem, the flux is

$$\dint_{\partial R} \vec{F} \cdot \bvec{dS} = \int_0^2 \int_0^2 \int_0^1 (2 x + 6 y + 4)\,dx\,dy\,dz = \int_0^2 \int_0^2 \left[x^2 + 6 x y + 4 x\right]_0^1\,dy\,dz =$$

$$\int_0^2 \int_0^2 (6 y + 5)\,dy\,dz = \int_0^2 \left[3 y^2 + 5 y\right]_0^2\,dz = \int_0^2 22\,dz = 44.\quad\halmos$$


Example. Let R be the region bounded above by $z = 4 - x^2 - y^2$ and bounded below by the x-y-plane.

Find the flux of $\vec{F} =
   (2 x, 2 y, 4 z)$ out of the boundary of R.

$$\hbox{\epsfysize=1.75in \epsffile{divergence-theorem-7.eps}}$$

$$\diverg \vec{F} = 2 + 2 + 4 = 6.$$

I'll convert to cylindrical. Note that

$$z = 4 - x^2 - y^2 = 4 - r^2.$$

The region is

$$\left\{\matrix{ 0 \le \theta \le 2 \pi \cr 0 \le r \le 2 \cr 0 \le z \le 4 - r^2 \cr}\right\}$$

By the Divergence Theorem, the flux is

$$\dint_{\partial R} \vec{F} \cdot \bvec{dS} = \int_0^{2 \pi} \int_0^2 \int_0^{4 - r^2} 6 r\,dz\,dr\,d\theta = 12 \pi \int_0^2 r \left[\dfrac{1}{2} z^2\right]_0^{4 - r^2}\,dr = 6 \pi \int_0^2 r (4 - r^2)^2\,dr =$$

$$6 \pi \int_0^2 (16 r - 8 r^3 + r^5)\,dr = 6 \pi \left[8 r^2 - 2 r^4 + \dfrac{1}{6} r^6\right]_0^2 = 64 \pi = 201.06192 \ldots.\quad\halmos$$


Here is an interpretation of $\diverg \vec{F}$ which is based on the Divergence Theorem. Construct a small solid sphere R centered at the point P. If $\diverg \vec{F} = 0$ at P, then by the Divergence Theorem

$$\dint_{\partial R} \vec{F} \cdot \bvec{dS} \approx 0.$$

That is, there is approximately no net flux out through the boundary of the sphere. Likewise, if $\diverg \vec{F} > 0$ , then $\displaystyle\dint_{\partial R} \vec{F} \cdot \bvec{dS} > 0$ --- there is net flux out through the boundary. And if $\diverg \vec F < 0$ , then $\displaystyle\dint_{\partial R} \vec{F} \cdot \bvec{dS} < 0$ --- there is net flux in through the boundary.


Example. Prove that the flux of $\curl \vec{F}$ through the boundary of a region is 0.

Note that $\diverg \curl
   \vec{F} = 0$ .

Hence, if R is a region,

$$\dint_{\partial R} \curl\vec{F} \cdot \bvec{dS} = \tint_R \diverg \curl \vec{F}\,dV = 0.$$

This is analogous to the result that the line integral of a convervative field around a closed curve is 0.


Example. Find the flux of $\vec{F} = (x^2, y^2, -z^2)$ out through the surface of the cube

$$\left\{\matrix{ 0 \le x \le 1 \cr 0 \le y \le 1 \cr 0 \le z \le 1 \cr}\right\}$$

Let R denote that cube and $\partial R$ its boundary, using the outward normal. Now $\diverg \vec{F} = 2 x + 2 y - 2 z$ , so by the Divergence Theorem the flux is

$$\dint_{\partial R} \vec{F} \cdot \bvec{dS} = \int_0^1 \int_0^1 \int_0^1 = (2 x + 2 y - 2 z)\,dx\,dy\,dz = 1.$$

The alternative would be to compute the flux through each of the 6 sides and add up the results.


Example. Find the flux of $\vec{F} = (x^2 y + 2 x, 3 - x^2
   y, x^2 z - 2 x y z)$ outward through the surface of the region R bounded by the paraboloids

$$z = x^2 + y^2 \quad\hbox{and}\quad z = 2 - x^2 - y^2.$$

$$\hbox{\epsfysize=2in \epsffile{divergence-theorem-8.eps}}$$

$$\diverg \vec{F} = 2 x y + 2 - x^2 + x^2 - 2 x y = 2.$$

The paraboloids intersect in $x^2 + y^2 = 1$ , so the projection of R into the x-y plane is the unit disk $x^2 + y^2 \le 1$ . Convert to cylindrical; the region is

$$\left\{\matrix{ 0 \le r \le 1 \cr 0 \le \theta \le 2 \pi \cr r^2 \le z \le 2 - r^2 \cr}\right\}$$

By the Divergence Theorem, the flux is

$$\dint_{\partial R} \vec{F} \cdot \bvec{dS} = \int_0^1 \int_0^{2 \pi} \int_{r^2}^{2 - r^2} 2 r\,dz\,d\theta\,dr = 2 \pi = 6.28318 \ldots.\quad\halmos$$


Example. Find the flux of the unit radial vector field $\vec{F} =
   \dfrac{\vec r}{|\vec r|}$ outward through the surface of the sphere $x^2 + y^2 + z^2 \le a^2$ .

Let R be the solid sphere $x^2 + y^2 + z^2 \le a^2$ . By the Divergence Theorem,

$$\dint _{\partial R} \vec{F} \cdot \bvec{dS} = \tint_R \diverg \vec{F} dV.$$

Convert to spherical; the region is

$$\left\{\matrix{ 0 \le \rho \le a \cr 0 \le \phi \le \pi \cr 0 \le \theta \le 2 \pi \cr}\right\}$$

Now $\vec{F} =
   \dfrac{1}{\sqrt{x^2 + y^2 + z^2}} (x, y, z)$ , so

$$\diverg \vec{F} = \dfrac{2}{\sqrt{x^2 + y^2 + z^2}} = \dfrac{2}{\rho}.$$

Hence,

$$\tint_R \diverg \vec{F} dV = \int_0^{2 \pi} \int_0^\pi \int_0^a \dfrac{2}{\rho} \rho^2 \sin \phi\,d\rho\,d\phi\,d\theta = 4 \pi a^2.\quad\halmos$$


Example. Use the Divergence Theorem to find the volume of the ellipsoid

$$\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} + \dfrac{z^2}{c^2} = 1.$$

$$\hbox{\epsfysize=2in \epsffile{divergence-theorem-9.eps}}$$

I can parametrize the ellipsoid by

$$x = a \sin p \cos t, \quad y = b \sin p \sin t, \quad z = c \cos p, \quad 0 \le p \le \pi, \quad 0 \le t \le 2 \pi.$$

(This is similar to spherical coordinates, if you think about it.)

The normal is

$$\vec{T}_p \times \vec{T}_t = \left|\matrix{ \ihat & \jhat & \khat \cr a \cos p \cos t & b \cos p \sin t & -c \sin p \cr -a \sin p \sin t & b \sin p \cos t & 0 \cr}\right| = (b c (\sin p)^2 \cos t, a c (\sin p)^2 \sin t, a b \sin p \cos p).$$

I'll use the radial field:

$$\vec{F} = (x, y, z) = (a \sin p \cos t, b \sin p \sin t, c \cos p).$$

Then

$$\vec{F} \cdot (\bvec{T_p} \times \bvec{T_t}) = a b c \sin p.$$

By symmetry, I can take the flux out of the part in the first octant and multiply by 8:

$$8 \int_0^{\pi/2} \int_0^{\pi/2} a b c \sin p\,dp\,dt = 4 \pi a b c.$$

By the Divergence Theorem, this is 3 times the volume, so the volume is $\dfrac{4}{3} \pi a b c$ .


Example. Find the flux of $\vec{F} = (x^2 y + z, xz - y,
   z^2)$ out through the boundary of the solid wedge in the first octant bounded by $z = y$ , $z = 0$ , $x = 0$ , $x = 1$ , $y = 0$ , and $y =
   1$ .

$$\hbox{\epsfysize=2in \epsffile{divergence-theorem-10.eps}}$$

$$\diverg \vec{F} = 2 x y - 1 + 2 z.$$

The region is

$$\left\{\matrix{ 0 \le x \le 1 \cr 0 \le y \le 1 \cr 0 \le z \le y \cr}\right\}$$

By the Divergence Theorem, the flux is

$$\int_0^1 \int_0^1 \int_0^y (2 x y - 1 + 2 z)\,dz\,dy\,dx = \dfrac{1}{6}.\quad\halmos$$


Example. Find the flux of $\vec{F} = (x^3, y^3, z)$ out through the boundary of the solid $x^2 + y^2 \le z \le
   1$ .

$$\hbox{\epsfysize=2in \epsffile{divergence-theorem-11.eps}}$$

$$\diverg \vec{F} = 3 x^2 + 3 y^2 + 1.$$

The projection of the solid into the x-y plane is the disk $x^2 + y^2 \le 1$ . I'll convert to cylindrical. The region is

$$\left\{\matrix{ 0 \le r \le 1 \cr 0 \le \theta \le 2 \pi \cr r^2 \le z \le 1 \cr}\right\}$$

The divergence is $\vec{F} =
   3 r^2 + 1$ . By the Divergence Theorem, the flux out through the boundary is

$$\int_0^1 \int_0^{2 \pi} \int_{r^2}^1 (3 r^2 + 1) r\,dz\,d\theta\,dr = \pi = 3.14159 \ldots.\quad\halmos$$


Example. Let S be the surface which consists of all the faces of the following cube except for the bottom:

$$\left\{\matrix{ 0 \le x \le 1 \cr 0 \le y \le 1 \cr 0 \le z \le 1 \cr}\right\}$$

Find the flux of $\vec{F} =
   (x^2 y - x^3, y^2 - x y^2, 3 x^2 z)$ outward through S.

$$\hbox{\epsfysize=2in \epsffile{divergence-theorem-12.eps}}$$

Because the bottom is missing, this is not a closed surface. Normally, I'd compute the flux by computing the flux through each of the five remaining faces, then adding up the results. However, it seems like too much work to do five integrals (even though the normal vectors will be very simple).

Instead, I will force the Divergence Theorem to apply by tossing in the missing bottom face.

$$\hbox{\epsfysize=2in \epsffile{divergence-theorem-13.eps}}$$

With the bottom face included, the new surface $S'$ is a closed surface enclosing the solid cube. The Divergence Theorem applies.

$$\diverg \vec{F} = 2 x y - 3 x^2 + 2 y - 2 x y + 3 x^2 = 2 y.$$

The flux out through $S'$ is

$$\int_0^1 \int_0^1 \int_0^1 2 y\,dx\,dy\,dz = 1.$$

To find the flux through S, I must compensate by subtracting off the flux out through the bottom, which I will compute directly. The bottom is $z = 0$ for $0 \le x \le 1$ and $0 \le y \le 1$ .

The downward normal is

$$\vec N = (0, 0, -1).$$

(I need the downward normal because I'm computing the flux out through the bottom.)

Then since $z = 0$ ,

$$\vec{F} \cdot \vec N = 3 x^2 z = 0.$$

The flux out through the bottom is 0, so the flux of $\vec{F}$ out through S is $1 - 0 = 1$ .


Definition. A vector field $\vec{F}$ is solenoidal if $\diverg \vec{F} = 0$ .

Recall that if $\curl
   \vec{F} = \vec 0$ , then $\vec{F} = \nabla f$ for some f. Something similar works for solenoidal fields (with the usual fine print stating the the components must be continuously differentiable).

Proposition. If $\vec{F}$ is a vector field whose components have continuous partial derivatives and $\diverg \vec{F} = 0$ , then $\vec{F} = \curl \vec{G}$ for some vector field $\vec{G}$ .

Proof. I'll simply give a formula for computing $\vec{G}$ , which you're emphatically not supposed to memorize! If $\vec{F} = (F_1, F_2, F_3)$ , then $\vec{F} = \curl \vec{G}$ for $\vec{G} = (G_1, G_2, G_3)$ . The components of $\vec{G}$ are given by

$$G_1 = \int_0^z F_2(x, y, t)\,dt - \int_0^y F_3(x, t, 0)\,dt,$$

$$G_2 = -\int_0^z F_1(x, y, t)\,dt,$$

$$G_3 = 0.$$

I'll leave it to you to verify that this field $\vec{G}$ works.

You may be worried that the third component is always 0 --- this seems a bit strange! In fact, it isn't: If $\vec{F} = \curl \vec{G}$ and f is any differentiable function,

$$\curl (\vec{G} + \nabla f) = \curl \vec{G} + \curl \nabla f = \vec{F} + \vec 0 = \vec{F}.$$

That is, I can get other fields that work by adding gradient fields to $\vec{G}$ --- and in this way, I can get $\vec{G}$ 's with nonzero z component.

Example. Suppose $\vec{F} = (x^2 y - x z, y z, -2
   x y z)$ .

(a) Prove that $\vec{F}$ is solenoidal.

(b) Find $\vec{G}$ such that $\vec{F} = \curl \vec{G}$

(a)

$$\diverg \vec{F} = 2 x y - z + z - 2 x y = 0.\quad\halmos$$

(b) I'll use the formulas above to find $\vec{G}$ .

I have $G_3 = 0$ , and

$$G_1 = \int_0^z y t\,dt - \int_0^y 0\,dt = \dfrac{1}{2} y z^2$$

$$G_2 = - \int_0^z (x^2 y - x t)\,dt = -x^2 y z + \dfrac{1}{2} x z^2$$

If you're confused about the integrands, consider as an example the integral for $G_2$ . The integrand in the formula for $G_2$ is $F_1(x,
   y, t)$ . Now $F_1(x, y, z) = x^2 y - x z$ --- it's the first component of $\vec{F}$ . So "$F_1(x, y, t)$ " means: Substitute x for x, substitute y for y, and substitute t for z. This gives

$$F_1(x, y, t) = x^2 y - x t.$$

That is what I integrated to get $G_2$ .

Thus, the field is

$$\vec{G} = \left(\dfrac{1}{2} y z^2, -x^2 y z + \dfrac{1}{2} x z^2, 0\right).\quad\halmos$$


Contact information

Bruce Ikenaga's Home Page

Copyright 2018 by Bruce Ikenaga