$1)$Use the divergence theorem to evaluate the flux $\int_S \underline{F} \cdot \underline{dS} $where the vector field $\underline{F} = xz\, e_1 + 3x\, e_2 - 2z \,e_3$
i)$S$ is the closed cylinder bounded by the surface $x^2 + y^2 = 1$ and the planes $z=0$ and $z=3$.
ii)$S$ is the open curved cylindrical surface $x^2 + y^2 = 1,\,\, 0 \leq z \leq 3$
i) is fine, but I am unsure about how top use the div theorem for ii). What I did was compute $\int_V \nabla \cdot F\,dV$ for both the top and bottom circles and subtract their contributions from i). This gives an answer of $3 \pi/2$. My worry is that when I do the actual surface integral I get something completely different.
My working for the surface integral: On the curved surface; $\underline{dS} = cos \phi\, e_1 + sin \phi\,e_2\,d\phi dz $ So, $F \cdot dS = (cos^2 \phi z + 3 cos\phi sin \phi)d \phi dz. $ Integrating with $z \in [0,3]$ and $\phi \in [0,2\pi]$ gives $9\pi/2.$
Similarly, on top surface I get $F \cdot dS = -6 d\phi d\rho$ which gives $-12 \pi$ and $0$ contribution from the bottom surface. Adding these do not give the $-3\pi/2$ attained in i)
Many thanks.