# Divergence Theorem

## Theorem

Let $U$ be a subset of $\R^3$ which is compact and has a piecewise smooth boundary.

Let $\mathbf F: \R^3 \to \R^3$ be a smooth vector function defined on a neighborhood of $U$.

Then:

$\displaystyle \iiint \limits_U \left({\nabla \cdot \mathbf F} \right) d V = \iint \limits_{\partial U} \mathbf F \cdot \mathbf n \ d S$

where $\mathbf n$ is the normal to $\partial U$.

## Proof

It suffices to prove the theorem for rectangular prisms; the Riemann-sum nature of the triple integral then guarantees the theorem for arbitrary regions.

Let:

$R = \left\{{(x,y,z)|a_1 \leq x \leq a_2, b_1 \leq y \leq b_2, c_1 \leq z \leq c_2 }\right\}$

and let $S = \partial R$, oriented outward.

Then :

$S = A_1 \cup A_2 \cup A_3 \cup A_4 \cup A_5 \cup A_6$

where $A_1, A_2$ are those sides perpendicular to the $x$-axis, $A_3, A_4$ perpendicular to the $y$ axis, and $A_5, A_6$ are those sides perpendicular to the $z$-axis, and in all cases the lower subscript indicates a side closer to the origin.

Let:

$\mathbf F = M \mathbf i + N \mathbf j + P \mathbf k$

where $M, N, P: \R^3 \to \R$. Then:

 $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle \iiint_R \nabla \cdot \mathbf F\ dV$$ $$=$$ $$\displaystyle$$ $$\displaystyle \iiint_R \left({ \frac{\partial M}{\partial x} + \frac{\partial N}{\partial y} + \frac{\partial P}{\partial z} }\right)\ dx dy dz$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$=$$ $$\displaystyle$$ $$\displaystyle \iiint_R \frac{\partial M}{\partial x}\ dxdydz + \iiint_M \frac{\partial N}{\partial y}\ dxdydz + \iiint_M \frac{\partial P}{\partial z}\ dxdydz$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$=$$ $$\displaystyle$$ $$\displaystyle \int_{c_1}^{c_2} \int_{b_1}^{b_2} \left({ M(a_2,y,z)-M(a_1,y,z) }\right)\ dydz + \int_{c_1}^{c_2} \int_{a_1}^{a_2} \left({ N(x,b_2,z)-N(x,b_1,z) }\right)\ dxdz + \int_{b_1}^{b_2} \int_{a_1}^{a_2} \left({ P(x,y,c_2)-P(x,y,c_1) }\right)\ dxdy$$ $$\displaystyle$$ $$\displaystyle$$

Thus:

$\displaystyle\iiint_R \nabla \cdot \mathbf F dV =\iint_{A_2} M\ dydz - \iint_{A_1} M\ dydz + \iint_{A_4} N\ dxdz - \iint_{A_3} N\ dxdz + \iint_{A_6} P\ dxdy - \iint_{A_5} P\ dxdy$

We turn now to examine $\mathbf n$:

• On $A_1, \mathbf n = (-1,0,0)$
• On $A_2, \mathbf n = (1,0,0)$
• On $A_3, \mathbf n = (0,-1,0)$
• On $A_4, \mathbf n = (0,1,0)$
• On $A_5, \mathbf n = (0,0,-1)$
• On $A_6, \mathbf n = (0,0,1)$.

Hence:

• On $A_1, \mathbf F \cdot \mathbf n = -M$
• On $A_2, \mathbf F \cdot \mathbf n = M$
• On $A_3, \mathbf F \cdot \mathbf n = -N$
• On $A_4, \mathbf F \cdot \mathbf n = N$
• On $A_5, \mathbf F \cdot \mathbf n = -P$
• On $A_6, \mathbf F \cdot \mathbf n = P$.

We also have:

• On $A_1$ and $A_2$, the area element is $dS=dydz$
• On $A_3$ and $A_4$, the area element is $dS = dxdz$
• On $A_5$ and $A_6, dS= dxdy$

This is true because each side is perfectly flat, and constant with respect to one coordinate. Hence:

$\displaystyle \iint_{A_2} M\ dydz= \iint_{A_2} \mathbf F \cdot \mathbf n\ dS$

and in general:

 $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle \iint_{A_2} M\ dydz$$ $$=$$ $$\displaystyle$$ $$\displaystyle \iint_{A_2} M\ dydz - \iint_{A_1} M\ dydz + \iint_{A_4} N\ dxdz - \iint_{A_3} N\ dxdz + \iint_{A_6} P\ dxdy - \iint_{A_5} P\ dxdy$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$\displaystyle$$ $$=$$ $$\displaystyle$$ $$\displaystyle \sum_{i=1}^6 \iint_{A_i} \mathbf F\cdot \mathbf n\ dS$$ $$\displaystyle$$ $$\displaystyle$$

and so:

$\displaystyle \iiint_R \nabla \cdot \mathbf F\ dV = \iint_{\partial R} \mathbf F\cdot \mathbf n\ dS$

$\blacksquare$