If $\vec{F}=4x \hat{i}-2y^{2}\hat{j}+z^{2}\hat{k}$ taken over the region bounded by the cylinder $x^{2}+y^{2}=4$, $z=0$ and $z=3$. Verify Divergence theorem.
Attempted Solution:
Here is what I've done as yet. To verify the theorem, we have to compute $\iiint_{V}\nabla\cdot \vec{F}\mathrm dV$ and $\iint_{S}\vec{F}\cdot \hat{n}\mathrm dS$ and show that they're equal.
$$\iiint_{V}\nabla\cdot\vec{F}\mathrm dV =\int_{0}^{3}\int_{-2}^{+2}\int_{-\sqrt{4-x^{2}}}^{+\sqrt{4-x^{2}}}(4-4y+2z)\mathrm dy\mathrm dx\mathrm dz$$
As for the surface integral, we need to consider the three surfaces, viz., two disks and a curved surface. I'm having slight trouble computing the integral over the curved surface.
$$\begin{aligned} x^{2}+y^{2}&=4 \\ \phi(x,y)&=x^{2}+y^{2}-4 \\ \hat{n}&=\frac{\nabla \phi}{|\nabla\phi|}=\frac{x\hat{i}+y\hat{j}}{2} \\ I&=\iint_{C}(2x^{2}-y^{3})\mathrm dS \end{aligned}$$
I don't know how to proceed. I'm having trouble writing $\mathrm dS$ in terms of Cartesian coordinates and that is the source of confusion. If I were to project it onto the plane, would I make separate cases for each, or is there some neat way to solve this compactly. Thanks in advance.
The divergence of $\vec{F}$ is the scalar $$\nabla\cdot \vec{F}=\frac{\partial (4x)}{\partial y}+\frac{\partial (-2y^2)}{\partial y}+\frac{\partial (z^2)}{\partial z}=4-4y+2z$$ and therefore we have to compute $$\iiint_{V}\nabla\cdot\vec{F}\mathrm dV =\iiint_{V}(4-4y+2z)dxdydz \\=\int_{z=0}^3\int_{r=0}^2\int_{\theta=0}^{2\pi}(4-4r\sin(\theta)+2z)rd\theta dr dz$$ where we used the cylindrical coordinates $x=r\cos(\theta)$, $y=r\sin(\theta)$, $z=z$.
As regards the flux through the lateral surface $C$ of the cylinder, we apply again the cylindrical coordinates. From your work $$\iint_{C}\vec{F}\cdot \hat{n}\mathrm dS=\iint_{C}(2x^{2}-y^{3})\mathrm dS=\int_{z=0}^3\int_{\theta=0}^{2\pi}(2(2\cos(\theta))^{2}-(2\sin(\theta)^{3})2d\theta dz.$$ It is easy to see that the flux through the disc at $z=0$ is $0$ and the one through the disc at $z=3$ is $9\cdot 4\pi=36\pi$.
Can you take it from here? Finally, for both computations you should find $84\pi$.