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$. To verify Divergence theorem, I have doubt to find the surface integral on the lateral surface $S_3$ ...
Solved in Regarding verifying Gauss-Divergence theorem
Doubt:
On $S_3$, $\hat n=(xi+yj)/2$, $F.\hat n=2x^2-y^3=8\cos^2\theta-\sin^3\theta$
What is $dS?$
Taking projection on $xz$ plane $$dS=\frac{dxdz}{|n.j|}=\frac{2}{y}dxdz=\frac{2d\theta dz}{\sin\theta}$$
Then $$\iint_{S_3}\vec{F}.\hat n\,dS=\int_{z=0}^3\int_{\theta=0}^{2\pi}\frac{(2(2\cos(\theta))^{2}-(2\sin(\theta)^{3})2d\theta dz}{\sin\theta}$$
It is not matching with Regarding verifying Gauss-Divergence theorem
Means, my calculation is not right. What is happening here? Why they are considering $$dS=2d\theta dz$$...Please write in full...

If $x=2\cos\theta$ then $dx=-2\sin\theta d\theta$. Also, $|n\cdot j|=|\sin\theta|$. So $$dS=\frac{2|\sin\theta|d\theta dz}{|\sin\theta|}=2d\theta dz$$
The alternative approach, the area element $dS$ is equal to the length element along the base, multiplied with the height element $$dS=dl dz$$ For the length element, use polar coordinates $$dl=rd\theta=2d\theta$$