Where am I making mistakes in verifying the divergence thereom I am just looking for anyone to please possibly see where I could be making the mistake. If it is a correct answer of $48 \pi$, why do I keep evaluating the triple integral to be more then it
I am trying to verify the divergence theorem ( ie show that both ways of evaluating give the same answer) for
$$\bar F=4x\hat i-2y^2\hat j+z^2\hat k$$ in the cylindrical region $x^2+y^2=4$ bound below by $xy$ plane and above by the plane $z=3$
That is , I want to evaluate the volume integral of the divergence of $F$ and also evaluate the surface integral of $\bar F \bullet \hat n$ and show that they both come out to the same final value.
First I tried the triple integral volume form, I calculated the divergence to be $4-4y+2z$ and then converted to polar and integrated theta from $0$ to $2\pi$, r from $0$ to $2$ and $z$ from $0$ to $3$.  Doing this I came to a final answer of $84 \pi$.
For more details: I integrated $4-4y+2z$ over that region ,ie
$\iiint_{V}(4-4\sin\theta+2z)rdzdrd\theta$
but when I try to do it for surface version, I get a normal by setting $G(x,y,z)=x^2+y^2-4=0$ and calculating the gradient of G divided by its norm, I chose the plus sign because that seems to be the correct version. $\frac{x\hat i+y \hat j}{2}$ using that $x^2+y^2=4$ on the cylinder , then calculating for the lateral surface I get $12\pi$, for the bottom $0$ using a normal of $- \hat k$ and for the top $36\pi$ using that $z=3$ here and a normal of $\hat k$ , but that doesn't sum out correctly. is there another surface I must account for?
 A: I have a different way of setting up surface integrals which seems much more intuitive to me. As an example, let's attempt the integral over the sides. Along that surface, we may parameterize the position vector as
$$\vec r=\langle2\cos\theta,2\sin\theta,z\rangle$$
Then we compute its differential as
$$d\vec r=\langle-2\sin\theta,2\cos\theta,0\rangle d\theta+\langle0,0,1\rangle dz$$
Those two infinitesimals are what you get for differential excursions in $\theta$ and $z$ along the surface. Therefore the vector area element is
$$\begin{align}d^2\vec A & =\pm\langle-2\sin\theta,2\cos\theta,0\rangle d\theta\times\langle0,0,1\rangle dz=\pm\langle2\cos\theta,2\sin\theta,0\rangle dz\,d\theta \\
 & =\langle2\cos\theta,2\sin\theta,0\rangle dz\,d\theta\end{align}$$
When we consider that the area element must point out. Also we need $\vec F$ along the surface:
$$\vec F=\langle4\cdot2\cos\theta,-2\cdot4\sin^2\theta,z^2\rangle$$
So now we are ready for:
$$\begin{align}\int_{sides}\vec F\cdot d^2\vec A & =\int_0^{2\pi}\int_0^3\langle4\cdot2\cos\theta,-2\cdot4\sin^2\theta,z^2\rangle\cdot\langle2\cos\theta,2\sin\theta,0\rangle dz\,d\theta \\
 & =\int_0^{2\pi}\int_0^3\left(16\cos^2\theta-16\sin^3\theta\right)dz\,d\theta\\
 & =(16)\left(\frac12\right)(2\pi)(3)-(16)(0)(2\pi)(3)\\
 & =48\pi\end{align}$$
Where we have used the average value for $\cos^2\theta$ of $\frac12$ and the average value for $\sin^3\theta$ of $0$ and the length of the $\theta$ interval of integration is $2\pi$. The $z$ integrals are all $3$. I hope you like my method. Notice that it got me the right answer in this case.
