I am having problems getting my head around this problem:
Evaluate the surface integral $$\int_S \vec F\bullet d\vec s$$ where $\vec F=x \vec i-y \vec j +z \vec k$ and where the surface S is the cylinder defined by $x^2+y^2\le 4$ and $0\le z \le 1$. Verify your answer using the Divergence Theorem.
The thing I am confused about is do we integrate over the ends of the cylinder and if so how? I think that we should since the divergence theorem requires a closed surface, but if I am right how do we do the surface integral since the normal changes direction (with a non-continuous derivative) between the top and bottom and the curved edges and therefore I cannot see how split the surface integral up into the three sections (top, bottom and curved side), how do we do this?