The divergence theorem relates an integral over a set to one on the boundary of the set. It is also called Gauss’s theorem.
Definition 27.3.1 A subset V of ℝ^{3} is called cylindrical in the x direction if it is of the form

where D is a subset of the yz plane. V is cylindrical in the z direction if

where D is a subset of the xy plane, and V is cylindrical in the y direction if

where D is a subset of the xz plane. If V is cylindrical in the z direction, denote by ∂V the boundary of V defined to be the points of the form
The following picture illustrates the above definition in the case of V cylindrical in the z direction. Also labeled are the z components of the respective outer unit normals on the sides and top and bottom.
Of course, many three dimensional sets are cylindrical in each of the coordinate directions. For example, a ball or a rectangle or a tetrahedron are all cylindrical in each direction. The following lemma allows the exchange of the volume integral of a partial derivative for an area integral in which the derivative is replaced with multiplication by an appropriate component of the unit exterior normal.
Lemma 27.3.2 Suppose V is cylindrical in the z direction and that ϕ and ψ are the functions in the above definition. Assume ϕ and ψ are C^{1} functions and suppose F is a C^{1} function defined on V . Also, let n =

Proof: From the fundamental theorem of calculus,
Now the unit exterior normal on the top of V , the surface

This follows from the observation that the top surface is the level surface z −ψ

Similarly, the unit normal to the surface on the bottom is

and so on the bottom surface,

Note that here the z component is negative because since it is the outer normal it must point down. On the lateral surface, the one where
The area element on the top surface is dA =



the last term equaling zero because on the lateral surface, n_{z} = 0. Therefore, this reduces to ∫ _{∂V }Fn_{z}dA as claimed. ■
The following corollary is entirely similar to the above.
Corollary 27.3.3 If V is cylindrical in the y direction, then

and if V is cylindrical in the x direction, then

With this corollary, here is a proof of the divergence theorem.
Theorem 27.3.4 Let V be cylindrical in each of the coordinate directions and let F be a C^{1} vector field defined on V . Then

Proof: From the above lemma and corollary,
The divergence theorem holds for much more general regions than this. Suppose for example you have a complicated region which is the union of finitely many disjoint regions of the sort just described which are cylindrical in each of the coordinate directions. Then the volume integral over the union of these would equal the sum of the integrals over the disjoint regions. If the boundaries of two of these regions intersect, then the area integrals will cancel out on the intersection because the unit exterior normals will point in opposite directions. Therefore, the sum of the integrals over the boundaries of these disjoint regions will reduce to an integral over the boundary of the union of these. Hence the divergence theorem will continue to hold. For example, consider the following picture. If the divergence theorem holds for each V _{i} in the following picture, then it holds for the union of these two.
General formulations of the divergence theorem involve Hausdorff measures and the Lebesgue integral, a better integral than the old fashioned Riemannn integral which has been obsolete now for almost 100 years. When all is said and done, one finds that the conclusion of the divergence theorem is usually true and the theorem can be used with confidence.
Example 27.3.5 Let V =

You can certainly inflict much suffering on yourself by breaking the surface up into 6 pieces corresponding to the 6 sides of the cube, finding a parametrization for each face and adding up the appropriate flux integrals. For example, n = k on the top face and n = −k on the bottom face. On the top face, a parametrization is

Example 27.3.6 This time, let V be the unit ball,

As in the above you could do this by brute force. A parametrization of the ∂V is obtained as

where
Example 27.3.7 Suppose V is an open set in ℝ^{3} for which the divergence theorem holds. Let F

This follows from the divergence theorem.

The message of the divergence theorem is the relation between the volume integral and an area integral. This is the exciting thing about this marvelous theorem. It is not its utility as a method for evaluations of boring problems. This will be shown in the examples of its use which follow.