Example Find the surface integral using divergence theorem.

$\displaystyle \iint_{S} (xz^2{\bf i} + (x^2 y - z^3){\bf j} + (2xy + y^2 z){\bf k})\cdot{\bf n}dS$

Here, $S$ is composed of two surfaces $S_{1} : z = \sqrt{a^2 - x^2 - y^2}, x^2 + y^2 \leq a^2$ and $S_{2} : z = 0, x^2 + y^2 \leq a^2$

Answer ${\bf F} = xz^2{\bf i} + (x^2 y - z^3){\bf j} + (2xy + y^2 z){\bf k}$. So,

$\displaystyle {\rm div}{\bf F} = \nabla \cdot {\bf F} = z^2 + x^2 +y^2$

Let the inside of the upper sphere $S$ be $V$. Then by the divergence thereom,


$\displaystyle \iint_{S}{\bf F}\cdot {\bf n}dS$ $\displaystyle =$ $\displaystyle \iiint_{V}{\rm div}{\bf F}dV$  
  $\displaystyle =$ $\displaystyle \iiint_{V}(x^2 + y^2 + z^2)dV$  

To evaluate this integral, we use the polar coordinates. Note that $\theta$ is the angle from the $x$-axis,$\phi$ is the angle from the $z$-axis.
$\displaystyle x$ $\displaystyle =$ $\displaystyle \rho \sin{\phi}\cos{\theta}$  
$\displaystyle y$ $\displaystyle =$ $\displaystyle \rho \sin{\phi}\sin{\theta}$  
$\displaystyle z$ $\displaystyle =$ $\displaystyle \rho \cos{\phi}$  

Now

$\displaystyle x^2 + y^2 + z^2 = \rho^2 \sin^{2}{\phi}\cos^{2}{\theta} + \rho^2 \sin^{2}{\phi}\sin^{2}{\theta} + \rho^2 \cos^{2}{\phi} = \rho^2$

Jacobian is given by the followings:

$\displaystyle J = \begin{array}{\vert lll\vert}
x_{\rho} & x_{\phi} & x_{\theta...
...os{\theta}\\
\cos{\phi} & -\rho \sin{\phi} & 0
\end{array} = \rho^2 \sin{\phi}$

Since $S$ is upper sphere, $\theta$ ranges $0 \leq \theta \leq 2\pi$ and the $\phi$ ranges $0 \leq \phi \leq \pi$. Finally, the radius goes from $0 \leq \rho \leq a$. Thus, we have

$\displaystyle \iiint_{V}(x^2 + y^2 + z^2)dV$ $\displaystyle =$ $\displaystyle \int_{\theta = 0}^{2\pi}\int_{0}^{\pi}\int_{0}^{a}\rho^2 \rho^2 \sin{\phi}d\rho d\phi d\theta$  
  $\displaystyle =$ $\displaystyle \int_{0}^{2\pi}d\theta \int_{0}^{\pi}\sin{\phi}d\phi \int_{0}^{a}\rho^4d \rho$  
  $\displaystyle =$ $\displaystyle (2\pi)(2)(\frac{a^5}{5}) = \frac{4 \pi a^5}{5}$