How do I verify divergence theorem for given vector field and surface? The vector field is ${\bf{F}}\left( {x,y,z} \right) = x{y^2}{\bf{i}} + y{x^2}{\bf{j}} + e{\bf{k}}$ and the surface $S$ is bounded by $z = \sqrt {{x^2} + {y^2}} $ and $z = 4$.
 A: The surface is in cylindrical coordinates $z=r$, so, $\nabla\cdot{\bf F}=y^2+x^2=r^2$
$$\int_V\nabla\cdot{\bf F}dv=\int_0^{2\pi}\int_0^4\int_0^zr^3drdzd\theta=$$
$$=\int_0^{2\pi}\int_0^4\dfrac{z^4}{4}dzd\theta=512\pi/5$$
The flux of a vector crossing a surface is surely sometimes important to know, we apply the theorem and with three lines we are done. Now, compare with the direct calculation for the flux. The difference gives a good hint about the importance the theorem has.
The part for the surface of the divergence theorem:
For the cone: As $z=r$, the vector pointing to points in the surface is in cartesian coordinates ${\bf r}=(u\cos v,u\sin v,u)$, $0\leq v\lt2\pi$ and $0\lt u\lt4$. ${\bf} F=(u^3\cos v\sin^2v,u^3\sin v\cos^2v,e)$. For the tangent vectors:
${\bf r}_u=\dfrac{\partial {\bf r}}{\partial u}=(\cos v,\sin v,1)$
${\bf r}_v=\dfrac{\partial {\bf r}}{\partial v}=(-u\sin v,u\cos v,0)$
We need the normal vector pointing outward. As ${\bf r}_u$ points to increasing $r$, ${\bf r}_v$ points anticlockwise and they are orthogonal, the normal pointing outward is ${\bf r}_v\times{\bf r}_u$
${\bf r}_v\times{\bf r}_u=(u\cos v,u\sin v,-u)$ and $d{\bf S}=(u\cos v,u\sin v,-u)dudv$
${\bf F}\cdot{\bf r}_v\times{\bf r}_u=2u^4\cos^2v\sin^2v-eu$
$$\int_{S_1}{\bf F}\cdot d{\bf S}=\int_{S_1}{\bf F}\cdot{\bf r}_v\times{\bf r}_ududv=\int_0^{2\pi}\int_0^4(2u^4\cos^2v\sin^2v-eu)dudv$$
For the disk: The vector pointing to points in the surface is ${\bf r}=(u\cos v,u\sin v,4)$, $0\leq v\lt2\pi$ and $0\lt u\lt4$.
${\bf r}_u=\dfrac{\partial {\bf r}}{\partial u}=(\cos v,\sin v,0)$
${\bf r}_v=\dfrac{\partial {\bf r}}{\partial v}=(-u\sin v,u\cos v,0)$
With a similar reasonig as before, the normal vector pointing outward is 
${\bf r}_u\times{\bf r}_v=(0,0,u)$ and $d{\bf S}=(0,0,u)dudv$
${\bf F}\cdot{\bf r}_u\times{\bf r}_v=eu$
$$\int_{S_2}{\bf F}\cdot d{\bf S}=\int_{S_2}{\bf F}\cdot{\bf r}_v\times{\bf r}_ududv=\int_0^{2\pi}\int_0^4eu\;dudv$$
And for the total flux:
$$\int_{S}{\bf F}\cdot d{\bf S}=\int_{S_1}{\bf F}\cdot d{\bf S}+\int_{S_2}{\bf F}\cdot d{\bf S}=\int_0^{2\pi}\int_0^42u^4\cos^2v\sin^2v\;dudv=512\pi/5$$
