OpenStax Calculus 3

Chapter 6: Vector Calculus

6.8 The Divergence Theorem

Study guide for Calculus Volume 3 (Gilbert Strang, 2016 edition)

Independent study guide. Not affiliated with OpenStax or Rice University.

Big idea

This is the last member of the family and the one that raises the dimension as far as it goes. A solid region in space has a closed surface as its boundary, and the theorem says that the outward flux of a field through that surface equals the triple integral of the divergence of the field over the solid. As before, an integral of a derivative over a region is traded for an integral of the field itself over the region’s boundary.

Laid next to the rest of the chapter the arrangement is clean. The fundamental theorem for line integrals took a curve to its two endpoints with the gradient. Green’s theorem took a plane region to its boundary curve, with the two derivative combinations that became curl and divergence. Stokes’ theorem took a surface in space to its rim, with the curl. This one takes a solid to its skin, with the divergence. The dimension of the region rises one step at a time, and the derivative operator changes to match, but the sentence never changes.

The physical reading makes the statement almost obvious. Divergence measures the rate at which the field creates new material per unit volume. Add that rate up over a solid and you get the total rate of creation inside. The only way material can leave a sealed region is through its surface, so the total must equal the net outward flow across the boundary. The theorem is a conservation statement, and in that form it is how the laws of electromagnetism and fluid mechanics are converted between their integral and differential versions.

In practice the theorem is used in both directions, but one direction dominates. A closed surface usually splits into several pieces, each needing its own parametrization, its own normal and its own integral, while the solid inside is often a ball or a cylinder in which one triple integral finishes the job. When a surface is not closed, close it by hand with a flat cap, apply the theorem to the sealed solid, and subtract the cap.

Decoder

The outward flux of a vector field through the closed surface bounding a solid region equals the triple integral of the divergence of the field over that region.

“Closed” and “outward” are the two hypotheses to check before anything else. The surface must actually enclose the solid, with no openings, and every normal must point away from the enclosed material. A surface with a hole in it does not bound a region, and a surface with the normal chosen inward gives the negative of the right answer.

The field also has to have continuous partial derivatives everywhere inside, not just on the surface. The inverse square field is the standard cautionary case: it has zero divergence away from the origin, yet its outward flux through a sphere centered at the origin is not zero, because the origin, where the field blows up, lies inside. Exclude that point and the theorem is silent about the sphere.

The most common computational error is mixing units of the two sides. The left side is a surface integral of a vector field against a normal, so its integrand is a dot product; the right side is a triple integral of a scalar. If you find yourself dotting something inside a triple integral, a step has gone wrong.

Definitions and results

The divergence theorem. Let $E$ be a solid region in space whose boundary surface $S$ is piecewise smooth and closed, oriented with the outward normal, and let $\mathbf{F}$ have continuous partial derivatives on an open region containing $E$. Then $$ \iint_{S} \mathbf{F}\cdot d\mathbf{S} = \iiint_{E} \left(\operatorname{div}\mathbf{F}\right)dV $$

Outward orientation. On a closed surface the outward normal points away from the enclosed solid at every point. On a sphere of radius $a$ centered at the origin it is $\mathbf{r}/a$; on the top of a cylinder it is $\mathbf{k}$ and on the bottom it is $-\mathbf{k}$.

Divergence as flux density. Applying the theorem to a small ball of volume $V$ around a point and dividing by $V$ shows that divergence is the limiting outward flux per unit volume. This is the coordinate free description of the operator.

Surfaces in several pieces. If $S$ consists of several smooth pieces, compute the flux through each with its own outward normal and add. Boundaries where the pieces meet contribute nothing.

Closing an open surface. If $S_1$ is not closed, choose a cap $S_2$ so that $S_1 \cup S_2$ encloses a solid $E$, orient both outward, apply the theorem, and then recover the piece you wanted: $$ \iint_{S_1} \mathbf{F}\cdot d\mathbf{S} = \iiint_E \left(\operatorname{div}\mathbf{F}\right)dV - \iint_{S_2}\mathbf{F}\cdot d\mathbf{S} $$ A flat disk or a flat lid is usually the cheapest cap, since a constant normal makes its flux integral almost trivial.

Incompressible fields. If $\operatorname{div}\mathbf{F} = 0$ throughout a region, the net outward flux through every closed surface inside it is zero: whatever enters leaves. In particular the flux of any curl through a closed surface is zero, since the divergence of a curl vanishes.

Solids with cavities. If $E$ lies between an outer surface and an inner one, the boundary is both surfaces, each oriented away from $E$, so the inner normal points toward the cavity. The difference of the two outward fluxes is then the triple integral over the shell.

Gauss’s law. For an inverse square field the flux through any closed surface enclosing the source is the same constant, independent of the shape of the surface, because the divergence is zero in the region between any two such surfaces. This is the reason the law is stated for arbitrary surfaces.

Worked examples

Both sides on a cylinder

Let $\mathbf{F} = \langle x, y, z\rangle$ and let $E$ be the solid cylinder $x^2+y^2\le 1$, $0\le z\le 2$.

The triple integral is immediate: $\operatorname{div}\mathbf{F} = 1+1+1 = 3$, and the volume of the cylinder is $\pi(1)^2(2) = 2\pi$, so $$ \iiint_E 3\,dV = 3(2\pi) = 6\pi $$

The surface has three pieces. On the curved side the outward normal at $\langle\cos\theta,\sin\theta,z\rangle$ is $\langle\cos\theta,\sin\theta,0\rangle$, and the field there dots with it to give $1$, so that flux is the lateral area $4\pi$. On the top disk $z=2$ the outward normal is $\mathbf{k}$ and $\mathbf{F}\cdot\mathbf{k} = z = 2$, so the flux is $2$ times the area $\pi$, that is $2\pi$. On the bottom disk $z=0$ the outward normal is $-\mathbf{k}$ and $\mathbf{F}\cdot(-\mathbf{k}) = -z = 0$, so that piece contributes nothing. The total is $4\pi + 2\pi + 0 = 6\pi$, matching.

A surface computation that would be miserable

Find the outward flux of $\mathbf{F} = \langle x^3, \; y^3, \; z^3\rangle$ through the unit sphere.

Done directly, each component would have to be dotted against the position vector and integrated in spherical coordinates against $\sin\phi$, producing three separate fourth-power trigonometric integrals. Through the theorem, $\operatorname{div}\mathbf{F} = 3x^2+3y^2+3z^2 = 3\rho^2$, and spherical coordinates on the ball give $$ \iiint_E 3\rho^2\,dV = 3\int_0^{2\pi}\!\!\int_0^{\pi}\!\!\int_0^1 \rho^2\cdot\rho^2\sin\phi\;d\rho\,d\phi\,d\theta = 3(2\pi)(2)\left(\frac15\right) = \frac{12\pi}{5} $$ The whole computation is one elementary integral in each variable.

Closing an open surface with a cap

Find the upward flux of $\mathbf{F} = \langle x, \; y, \; z+1\rangle$ through the paraboloid $z = 1-x^2-y^2$ with $z \ge 0$.

This surface is open at the bottom. Cap it with the disk $S_2$: $x^2+y^2\le1$ in the plane $z=0$, oriented downward so that both pieces point away from the solid $E$ between them. The divergence is $1+1+1 = 3$, and the volume of $E$ is $$ \int_0^{2\pi}\!\!\int_0^1 \left(1-r^2\right)r\,dr\,d\theta = 2\pi\left(\frac12 - \frac14\right) = \frac{\pi}{2} $$ so the triple integral is $3(\pi/2) = 3\pi/2$. On the cap the outward normal is $-\mathbf{k}$ and $\mathbf{F}\cdot(-\mathbf{k}) = -(z+1) = -1$ at $z=0$, so the cap flux is $-\pi$. Therefore the flux through the paraboloid is $$ \frac{3\pi}{2} - (-\pi) = \frac{5\pi}{2} $$

Verify directly. As a graph the upward normal element is $\langle 2x, 2y, 1\rangle\,dA$, and on the surface $\mathbf{F}\cdot\langle 2x,2y,1\rangle = 2x^2+2y^2 + (1-x^2-y^2) + 1 = r^2+2$. Then $$ \int_0^{2\pi}\!\!\int_0^1 \left(r^2+2\right)r\,dr\,d\theta = 2\pi\left(\frac14 + 1\right) = \frac{5\pi}{2} $$ which confirms the value and, incidentally, confirms the sign convention on the cap.

A field with nothing to add up

Let $\mathbf{F} = \langle -y, \; x, \; 0\rangle$ and let $S$ be any closed piecewise smooth surface. The divergence is $0 + 0 + 0 = 0$, so the outward flux is zero through every such surface, whatever its shape. The picture agrees: this field is a rigid rotation, so it carries material around a closed surface without ever pushing any across it. Circulation and flux are independent measurements, and a field can have plenty of one and none of the other.

Practice

These problems ask you to compute outward flux through closed surfaces by converting to a triple integral, to run the conversion backwards when the solid is harder than its skin, and to close open surfaces with caps. Check that the surface is closed and every normal points outward before you write the equality down, and check that the field has no singularity inside the solid.

Practice

Generated problems for this section, graded instantly.

Quiz

Five items on applying the divergence theorem, orienting a closed surface, closing an open surface with a cap, and recognizing when the hypotheses fail.

Quiz

5 problems with a score at the end.