# Divergence theorem

A novice might find a proof easier to follow if we greatly restrict the conditions of the theorem, but carefully explain each step. For that reason, we prove the divergence theorem for a rectangular box, using a vector field that depends on only one variable.

Fig. 1: A region V bounded by the surface S = ∂V with the surface normal n
Fig. 2: Using only the fundamental theorem of calculus in one dimension, students can verify the divergence theorem by direct integration.

The Divergence (Gauss-Ostrogradsky) theorem relates the integral over a volume, ${\displaystyle {\mathsf {V}}}$, of the divergence of a vector function, ${\displaystyle \mathbf {\vec {F}} }$, and the integral of that same function over the the volume's surface:

${\displaystyle \int _{\mathsf {V}}\underbrace {\left(\mathbf {\vec {\nabla }} \cdot \mathbf {\vec {F}} \right)\,dV} _{\text{triple integral}}=\oint _{\mathsf {S}}\underbrace {\left(\mathbf {\vec {F}} \cdot \mathbf {\hat {n}} \right)\,dS} _{\text{double integral}}.}$

(1)

### Special case of a field that depends on only one variable:

Figure 2 shows a vector field using red arrows to denote the field's direction and magnitude. The field occupies all three dimensions, but is only directed in the x or y directions. And, the field varies only along the x-axis. In other words, ${\displaystyle \mathbf {\vec {F}} }$ is of the form,

${\displaystyle \mathbf {\vec {F}} =F_{x}(x)\mathbf {\hat {i}} +F_{y}(x)\mathbf {\hat {j}} }$

(2)

where ${\displaystyle F_{x}}$ and ${\displaystyle F_{y}}$ are arbitrary "smooth" functions of only the variable ${\displaystyle x.}$ A z-component, ${\displaystyle F_{z}(x)}$, could be included in (2) without adding any complexity to the proof, except that the third component could not easily be depicted in Figure 2.

### Volume integral

Our first task is to use the fundamental theorem of calculus to perform this integral over the volume of the box. Despite the fact that the vector field points in two directions, the divergence operator ${\displaystyle \mathbf {\vec {\nabla }} }$ removes any involvement of the y-component, since the field does not depend on ${\displaystyle y}$:

${\displaystyle \mathbf {{\vec {\nabla }}\cdot {\vec {F}}} ={\frac {\partial F_{x}}{\partial x}}={\text{ a function of }}x{\text{ only.}}}$

(3)

Integrals over three-dimensional boxes are easy to perform:

${\displaystyle \int \left(\mathbf {{\vec {\nabla }}\cdot {\vec {F}}} \right)\,dV=\int _{x_{1}}^{x_{2}}dx\int _{y_{1}}^{y_{2}}dy\int _{z_{1}}^{z_{2}}dz\left({\frac {\partial F_{x}}{\partial x}}\right)}$

(4)

Since ${\displaystyle \partial F_{x}/\partial x}$ does not depend on ${\displaystyle y}$ or ${\displaystyle z,}$ the partial derivative may be treated as a constant with regard to those to variables. The integrations in (4) are structured so that they may be performed in any order, which permits us to write:

${\displaystyle \int \left(\mathbf {{\vec {\nabla }}\cdot {\vec {F}}} \right)\,dV=}$${\displaystyle \underbrace {\int _{x_{1}}^{x_{2}}dx\left({\frac {\partial F_{x}}{\partial x}}\right)} _{F_{x}(x_{2})-F_{x}(x_{1})}\;\underbrace {\int _{y_{1}}^{y_{2}}dy} _{y_{2}-y_{1}}\;\underbrace {\int _{z_{1}}^{z_{2}}dz} _{z_{2}-z_{1}}\,}$${\displaystyle =\,\left[F_{x}(x_{2})-F_{x}(x_{1})\right]\cdot A}$,

(5)

where ${\displaystyle A=(y_{2}-y_{1})(z_{2}-z_{1})}$ is the area of the two sides at ${\displaystyle x=x_{1}}$ and ${\displaystyle x=x_{2}}$ as shown in Figure 2.

### Surface integrals

Now we calculate the surface integral and verify that it yields the same result as (5). The surface integral over the box involves six rectangles. One way to define a two-dimensional surface in three-dimensions is to state one equation involving the three variables.[1] The six surfaces of the box in Figure 2 can be labeled by the set of six (infinite) planes: ${\displaystyle \{x=x_{1},x=x_{2},y=y_{1},y=y_{2},z=z_{1},z=z_{2}\}}$. In contrast with one-dimensional integrals, surface and volume integrals require much more than simply stating the two endpoints associated with a one dimensional integral. Each of the six surfaces must be integrated separately, and the integral over the entire surface equals the sum of the six individual integrals. A common shorthand for surface integrals is, ${\displaystyle {\hat {\mathbf {n} }}\,d\mathbf {S} =d{\vec {A}}}$, where ${\displaystyle {\hat {\mathbf {n} }}}$ the outward unit normal, and ${\displaystyle d\mathbf {S} =\left|d{\vec {A}}\right|.}$

${\displaystyle \int \underbrace {(\,.\,.\,.)} _{\text{6 sides}}=\overbrace {\int \underbrace {(\,.\,.\,.)} _{x=x_{1}}+\int \underbrace {(\,.\,.\,.)} _{x=x_{2}}} ^{\text{x-pair}}+\overbrace {\int \underbrace {(\,.\,.\,.)} _{y=y_{1}}+\int \underbrace {(\,.\,.\,.)} _{y=y_{2}}} ^{\text{y-pair}}+\overbrace {\int \underbrace {(\,.\,.\,.)} _{z=z_{1}}+\int \underbrace {(\,.\,.\,.)} _{z=z_{2}}} ^{\text{z-pair}}}$

(6)

#### Integration over x-pair surfaces

The two most important surfaces are the pair already discussed, with area ${\displaystyle A}$, and outward unit normals in the x-direction, shown as the left and right ends of the box shown in Figure 2. Since ${\displaystyle x}$ is constant over each of these two surfaces, the the surface integral of anything that depends only on ${\displaystyle \mathbf {\vec {F}} (x)}$ is trivial, and depends only on the area, which is the same area, ${\displaystyle A}$, shown in Figure 2 and also at (5). The algebra for the surface at ${\displaystyle x=x_{1}}$ is:

${\displaystyle \underbrace {\int \left(\mathbf {\vec {F}} \cdot \mathbf {\hat {n}} \right)dS} _{x=x_{1}}=\underbrace {\left(\mathbf {\vec {F}} \cdot \mathbf {\hat {n}} \right)} _{-F_{x}(x_{1})}\cdot \underbrace {\int \,dS} _{A}=-F_{x}(x_{1})\cdot A}$.

(7)

To understand how ${\displaystyle \mathbf {\vec {F}} \cdot \mathbf {\hat {n}} }$ was evaluated in (7), recall that the outward unit normal points in the negative x direction on that side. Also, when a vector is dotted with a unit vector, only one component of the vector survives:[2]

${\displaystyle \underbrace {\mathbf {\vec {F}} \cdot \mathbf {\hat {n}} } _{x=x_{1}}=\left(F_{x}\mathbf {\hat {i}} +F_{y}\mathbf {\hat {j}} \right)\cdot \left(-\mathbf {\hat {i}} \right)=-F_{x}}$,

(8)

since, ${\displaystyle \mathbf {\hat {n}} =-\mathbf {\hat {i}} }$, at ${\displaystyle x=x_{1}.}$ On the other side, ${\displaystyle \mathbf {\hat {n}} }$ points in the opposite direction, so that combining (5) with (7) establishes that (1) is true, but only if we can establish that the other four surface integrals vanish.

#### Integration over the y-pair and z-pair surfaces

We begin with the y-pair of surfaces, i.e., those that occupy a portion of the ${\displaystyle y=y_{1}}$ or the ${\displaystyle y=y_{2}}$ planes. Since the vector field ${\displaystyle \mathbf {\vec {F}} (x,y,z)}$ depends on the ${\displaystyle x}$-variable, the integral is not trivial. By the reasoning used at (7) and (8), we only need integrate the ${\displaystyle y}$-component, ${\displaystyle F_{y}}$, because the unit vector points in the ${\displaystyle \pm \mathbf {\hat {j}} }$ direction. Fortunately, the absence of a ${\displaystyle y}$-dependence of our vector field ensures that the following two integrals are equal:

${\displaystyle \underbrace {\iint F_{y}(x)dS} _{y=y_{1}}=\underbrace {\iint F_{y}(x)dS} _{y=y_{2}}=\int _{z_{1}}^{z_{2}}dz\int _{x_{1}}^{x_{2}}F_{y}(x)dx=(z_{2}-z_{1})\int _{x_{1}}^{x_{2}}F_{y}(x)dx}$

(9)

Since the outward unit normals, ${\displaystyle \mathbf {\hat {n}} =\pm \mathbf {\hat {j}} ,}$ are equal and opposite on both sides, the pair of surface integrals at (9) cancel. The same argument can be the ${\displaystyle z}$-pair of surfaces.

### Conclusion

Although we have proven the divergence theorem on a rectangular box for a small subset of all possible differentiable vector fields ${\displaystyle {\vec {F}}({\vec {r}})}$, we have established the essential role played by the fundamental theorem of calculus in one-dimension. Essentially, we have placed the two endpoints of segment along the x-axis by the six surfaces that form the boundary of a three-dimensional box. Also, the reader who can grasp this proof is probably capable of developing a proof for any vector field ${\displaystyle {\vec {F}}({\vec {r}})}$ for which the divergence is well defined. It just takes a lot of algebra.

## Footnotes

1. For example, ${\displaystyle x^{2}+y^{2}+z^{3}=1}$ is the surface of a unit sphere.
2. Here we adopt the notation that ${\displaystyle (\mathbf {\hat {i}} ,\mathbf {\hat {j}} ,\mathbf {\hat {k}} )}$ refer to unit vectors in the ${\displaystyle (x,y,z)}$ directions, respectively.

Subpages: