Evaluate $\vec{F}=z\vec{i}+x\overrightarrow{j}-{{y}^2}z\vec{k}$ and $S$ is the surface $x^2+y^2=1$ in the first octant between $z=0$ and $z=2$. Problem:
Evaluate $\int \int_S \overrightarrow{F}.\widehat{n}$   where $\overrightarrow{F}=z\overrightarrow{i}+x\overrightarrow{j}-{{y}^2}z\overrightarrow{k}$ and $S$ is the surface of the cylinder $x^2+y^2=1$ in the first octant between $z=0$ and $z=2$.
My attempt:
$\int \int_S \overrightarrow{F}.\widehat{n}$ = $\int \int \int_V \Delta.\overrightarrow{F}\,dz\,dy\,dx$
= $\int_{0}^1 \int_{0}^\sqrt{1-x^2} \int_{0}^2 -y^2\,dz\,dy\,dx$
= $\int_{0}^1 \int_{0}^\sqrt{1-x^2} -2y^2dy\,dx$
=$\int_{0}^1\frac{-2(1-x^2)^{\frac{3}{2}}}{3}\,dx$
Let $x=sin\,t$ and then $t=sin^{-1}x$
=$\frac{-2}{3}\int_{0}^{\frac{\pi}{2}}cos^4 \,t \,dt$
=$\frac{-2}{3}\int_{0}^{\frac{\pi}{2}}(\frac{cos4t}{8} + \frac{cos4t}{2}+\frac{3}{8})\,dt$
=$\frac{-2}{3}[\frac{sin4t}{32}+\frac{sin2t}{4}+\frac{3t}{8}]_{0}^{\frac{\pi}{2}}$
=$\frac{-\pi}{8}$
But the given result is $3$.
Thanks in Advance
 A: You cannot use the divergence theorem here because your surface $S$ is not closed. In your calculation you're finding the flux of $\vec{F}$ through the boundary of the solid $E$ defined by $$E=\big\{x^2+y^2 < 1\big\}\cap\big\{0 < z < 2\big\}\cap (0,\infty)^3$$ The boundary of $E$ includes the top, bottom, and sides of the surface $S$ in your problem, which you should notice is a closed surface. You're also assuming that the normal vector $\vec{n}$ is outward pointing (which is what I will assume in my subsequent calculations.) In order to find the flux of $\vec{F}$ through $S$ in your problem, define $$\vec{r}(u,v)=\Big<\cos(u),\sin(u),v\Big>$$ on the domain $0<u<\pi/2$ and $0<v<2$. With a few calculations we get $$\vec{r}_u \times \vec{r}_v=\Big<\cos(u),\sin(u),0\Big>$$ $$\vec{F}\Big(\vec{r}(u,v)\Big)=\Big<v,\cos(u),-v\sin^2(u)\Big>$$ $$\vec{n}=\frac{\vec{r}_u\times \vec{r}_v}{||\vec{r}_u\times \vec{r}_v||}=\Big<\cos(u),\sin(u),0\Big>$$ $$dS=||\vec{r}_u\times \vec{r}_v||dudv=dudv$$ Hence $$\int \int _{S}\vec{F}\cdot \vec{n}dS=\int_0^2 \int _{0}^{\pi/2}\Big[v\cos(u)+\sin(u)\cos(u)\Big]dudv=3$$
