# Math Insight

### Divergence theorem examples

#### Example 1

Compute $\dsint$ where \begin{align*} \vc{F}=(3x+z^{77}, y^2-\sin x^2z, xz+ye^{x^5}) \end{align*} and $\dls$ is surface of box \begin{align*} 0 \le x \le 1, \quad 0 \le y \le 3, \quad 0 \le z \le 2. \end{align*} Use outward normal $\vc{n}$.

Solution: Given the ugly nature of the vector field, it would be hard to compute this integral directly. However, the divergence of $\dlvf$ is nice: \begin{align*} \div \dlvf = 3 + 2y +x. \end{align*} We use the divergence theorem to convert the surface integral into a triple integral \begin{align*} \dsint = \iiint_B \div \dlvf \, dV \end{align*} where $B$ is the box \begin{align*} 0 \le x \le 1, \quad 0 \le y \le 3, \quad 0 \le z \le 2. \end{align*} We compute the triple integral of $\div \dlvf = 3 + 2y +x$ over the box $B$: \begin{align*} \dsint & = \int_0^1 \int_0^3 \int_0^2 (3+2y+x) dz\,dy\,dx\\ &= \int_0^1\int_0^3 (6+4y+2x) dy\, dx\\ &= \int_0^1 (18+18+6x) dx\\ &= 36+3 = 39. \end{align*}

#### Example 2

For $\dlvf = (xy^2, yz^2, x^2z)$, use the divergence theorem to evaluate \begin{align*} \dsint \end{align*} where $\dls$ is the sphere of radius 3 centered at origin. Orient the surface with the outward pointing normal vector.

Solution: Since I am given a surface integral (over a closed surface) and told to use the divergence theorem, I must convert the surface integral into a triple integral over the region inside the surface.

Since $\div \dlvf = y^2+z^2+x^2$, the surface integral is equal to the triple integral \begin{align*} \iiint_B (y^2+z^2+x^2) dV \end{align*} where $B$ is ball of radius 3.

To evaluate the triple integral, we can change variables to spherical coordinates. In spherical coordinates, the ball is \begin{align*} 0 \le \rho \le 3, \quad 0 \le \theta \le 2\pi, \quad 0 \le \phi \le \pi. \end{align*} The integral is simply $x^2+y^2+z^2 = \rho^2$. For spherical coordinates, we know that the Jacobian determinant is $dV = \rho^2 \sin\phi\, d\phi\,d\theta\,d\rho$. Therefore, the integral is \begin{align*} \int_0^3 \int_0^{2\pi} \int_0^{\pi} \rho^4 \sin\phi\, d\phi\,d\theta\,d\rho &= \int_0^3 \int_0^{2\pi} \left.\left[ -\rho^4 \cos\phi\right]_{\phi = 0}^{\phi = \pi}\right. d\theta\,d\rho\\ &= \int_0^3 \int_0^{2\pi} 2\rho^4 d\theta\,d\rho\\ &= \int_0^3 4\pi \rho^4 d\rho = \left.\left.\frac{4\pi \rho^5}{5}\right|_0^3\right. = \frac{972 \pi}{5}. \end{align*}