web analytics
Skip to main content

Section 12.1 The Divergence Theorem

We stated the divergence theorem in Section 11.1 for piecewise smooth plane domains. We omitted the quite difficult proof that every piecewise smooth domain can be decomposed into domains of the form as those shown in Figure 10.4 Figure 10.5. Subsets \(D\) of \(\mathbb R^3\) are more complicated, so it is not clear what definition of piecewise smooth we should use. By smooth we mean that \(\partial D\) is a smooth surface, possibly having several components. This is not general enough, as for instance a cube does not have a smooth boundary. Instead of introducing piecewise smooth domains we just introduce simple domains.

Definition 12.1. Simple domains.

We call a \(D\subset\mathbb R^3\) an \(xy\)-simple domain if there exist continuously differentiable functions \(\varphi(x,y)\leq\psi(x,y)\) such that
\begin{equation} D=\bigl\{(x,y,z)\in D_0\colon\varphi(x,y)\leq z\leq\psi(x,y)\bigr\}\text{,}\tag{12.1} \end{equation}
where \(D_0\) is the projection of \(D\) onto the \(xy\)-plane. Similarly we define \(yz\)-simple and \(xz\)-simple. We call a domain simple if it is \(xy\)-simple, \(yz\)-simple and \(xz\)-simple at the same time.
An \(xy\)-simple surface is depicted in Figure 12.2. We will prove the divergence theorem for disjoint unions of simple domains.
Figure 12.2. An \(xy\)-simple domain.
Let us note that every bounded domain whose boundary is a smooth surface can be written as a finite union of simple domains, but this is not so clear for `piecewise smooth' domains in general. As an example consider a decomposition of a torus (or doughnut) into a union of four simple domains as shown in Figure 12.3.
Figure 12.3. A torus and a possible decomposition into simple domains.
We gave plane domains an orientation, and we want to do that for piecewise smooth domains \(D\subset\mathbb R^3\) as well. The boundary \(\partial D\) consists of finitely many smooth surfaces. We take the orientation given by the unit normal field pointing out of \(D\text{.}\) We call this the outward pointing unit normal field.
The proof of the divergence theorem is very similar to the proof of Green's theorem. We start with very simple vector fields and domains, and then combine everything to get the general formula. Hence suppose that \(D\) is an \(xy\)-simple domain \(D\subset\mathbb R^3\) with projection \(D_0\) onto the \(xy\)-plane. Moreover let \(\varphi,\psi\) be smooth functions such that \(D\) has the form (12.1). Finally assume that
\begin{equation*} \vect f=(0,0,f_3)\text{.} \end{equation*}
We then compute the surface integral
\begin{equation*} \int_{\partial D}\vect f\cdot\vect n\,dS\text{.} \end{equation*}
The boundary of \(D\) can be written as the union of three surfaces, namely \(S_1:=\graph(\psi)\text{,}\) \(S_2:=\graph(\varphi)\) and the vertical pieces, \(S_3\text{.}\) Denote the unit normal vector to \(\partial D\) by \(\vect n=(n_1,n_2,n_3)\text{.}\) As \(n_3=0\) on \(S_3\) it follows that \(\vect f\cdot\vect n=f_3n_3=0\text{.}\) Hence
\begin{equation*} \int_{S_3}\vect f\cdot\vect n\,dS =\int_{S_3}f_3n_3\,dS=0 \end{equation*}
We next compute the integral over \(S_1\text{.}\) According to Proposition 9.32 we have
\begin{align*} \int_{S_1}f_3n_3\,dS \amp=\int_{S_1}\vect f\cdot\vect n\,dS\\ \amp=\iint_{D_0}f_3\bigl(x_1,x_2,\psi(x_1,x_2)\bigr)\,dx_1\,dx_2 \end{align*}
Using the same formula we get
\begin{align*} \int_{S_2}f_3n_3\,dS \amp=\int_{S_2}\vect f\cdot\vect n\,dS\\ \amp=-\iint_{D_0}f_3\bigl(x_1,x_2,\varphi(x_1,x_2)\bigr)\,dx_1\,dx_2, \end{align*}
where the negative sign appears because \(S_2\) is oriented downwards. Adding up the three integrals we get
\begin{equation*} \int_{\partial D}f_3n_3\,dS =\iint_{D_0}f_3\bigl(x_1,x_2,\psi(x_1,x_2)\bigr) -f_3\bigl(x_1,x_2,\varphi(x_1,x_2)\bigr)\,dx_1\,dx_2\text{.} \end{equation*}
Setting \(g(x_3):=f_3(x_1,x_2,x_3)\) it follows from the fundamental theorem of calculus and the definition of partial derivatives that
\begin{align*} f_3\bigl(x_1,x_2,\psi(x_1,x_2)\bigr)\amp-f_3\bigl(x_1,x_2,\varphi(x_1,x_2)\bigr)\\ \amp=g(\psi(x_1,x_2)\bigr)-g\bigl(\varphi(x_1,x_2)\bigr)\\ \amp=\int_{\varphi(x_1,x_2)}^{\psi(x_1,x_2)}\frac{d}{dx_3}g(x_3)\,dx_3\\ \amp=\int_{\varphi(x_1,x_2)}^{\psi(x_1,x_2)}\frac{\partial}{\partial x_3}f_3(x_1,x_2,x_3)\,dx_3 \end{align*}
If we substitute the above into the previous formula and apply Fubini's Theorem 6.2 we get
\begin{align} \int_{\partial D}f_3n_3\,dS \amp=\iint_{D_0}\Bigl(\int_{\varphi(x_1,x_2)}^{\psi(x_1,x_2)} \frac{\partial}{\partial x_3}f_3(x_1,x_2,x_3)\,dx_3\Bigr)\,dx_1\,dx_2\notag\\ \amp=\int_D\frac{\partial}{\partial x_3}f_3(\vect x)\,d\vect x\text{.}\tag{12.2} \end{align}
If \(D\) is \(xz\)-simple we can apply the same procedure with \(x_1,x_2\) replaced by \(x_1,x_3\) and the vector field \(\vect f=(0,f_2,0)\text{.}\) Hence
\begin{equation} \int_{\partial D}f_2n_2\,dS =\int_D\frac{\partial}{\partial x_2}f_2(\vect x)n_2\,d\vect x\text{.}\tag{12.3} \end{equation}
Likewise we get for a \(yz\)-simple domain and \(\vect f=(f_1,0,0)\) that
\begin{equation} \int_{\partial D}f_1n_1\,dS =\int_D\frac{\partial}{\partial x_1}f_1(\vect x)n_1\,d\vect x\text{.}\tag{12.4} \end{equation}
Now assume that \(D\) is simple. By definition \(D\) is \(xy\)-simple, \(xz\)-simple and \(yz\)-simple at the same time. Hence if \(\vect f=(f_1,f_2,f_3)\) we can apply (12.2) to \((0,0,f_3)\text{,}\) then (12.3) to \((0,f_2,0)\) and finally (12.4) to \((f_1,0,0)\text{.}\) Adding up the three identities and using the definition of the divergence (see Definition 11.3 we get
\begin{align*} \int_{\partial D}\vect f\cdot\vect n\,dS \amp=\int_{\partial D}f_1n_1+f_2n_2+f_3n_3\,dS\\ \amp=\int_D\frac{\partial}{\partial x_1}f_1(\vect x) +\frac{\partial}{\partial x_2}f_2(\vect x) +\frac{\partial}{\partial x_3}f_3(\vect x)\,d\vect x\\ \amp=\int_D\divergence\vect f\,d\vect x\text{.} \end{align*}
This proves the divergence theorem for simple domains. If \(D\) is a domain which can be decomposed into simple domains then the integrals over all adjoining interior boundaries appear twice in opposite orientations. Hence the corresponding surface integrals have opposite signs and therefore cancel when we add them up over all sub-domains. Hence the Divergence Theorem follows.
Again we need to be careful about making sure the vector field is smooth in the whole region.

Remark 12.5.

As with Green's theorem the assumption that \(\vect f\) be smooth in \(D\) is essential. Consider the vector field
\begin{equation*} \vect f(\vect x):=\frac{\vect x}{\|\vect x\|^3} \end{equation*}
which has a singularity at \(\vect 0\text{.}\) Computing the partial derivative of the \(i\)-th component we get
\begin{equation*} \frac{\partial}{\partial x_i}\frac{x_i}{\|\vect x\|^3} =\frac{\|\vect x\|^2-3x_i^2}{\|\vect x\|^5}, \end{equation*}
so the divergence of \(\vect f\) is
\begin{align*} \divergence\vect f(\vect x) \amp=\frac{1}{\|\vect x\|^5} \sum_{i=1}^3\bigl(\|\vect x\|^2-3x_i^2\bigr)\\ \amp=\frac{1}{\|\vect x\|^5} \Bigl(3\|\vect x\|^2-3\sum_{i=1}^3x_i^2\Bigr)\\ \amp=\frac{3}{\|\vect x\|^5}\bigl(\|\vect x\|^2-\|\vect x\|^2\bigr) =0\text{.} \end{align*}
Hence if \(B\) is a ball of radius \(R\) centred at the origin then
\begin{equation*} \int_B\divergence\vect f(\vect x)\,d\vect x =\int_B0\,d\vect x =0\text{.} \end{equation*}
On the other hand we saw in Example 9.34 that
\begin{equation*} \int_{\partial B}\vect f\cdot\vect n\,dS=4\pi\text{.} \end{equation*}
The two results are obviously not equal, and the reason is that \(\vect f\) has a singularity in \(B\text{.}\) The example given here is not a pathological one. The field is, up to a constant, that of the gravitational field of a `point mass' concentrated at the origin. From the present example one can derive Gauss' law for the gravitational field. Physicists say that the mass is the source of the gravitational field. A similar phenomenon appears for the electrical field in electrostatics.