Evaluate $\int \int_{S} \vec {F} \cdot \vec {n} ds$ for $\vec {F} = x \vec{i} - y \vec {j} + (z^{2} - 1) \vec {k}$ Evaluate $\int \int_{S} \vec {F} \cdot \vec{n} ds$ for $\vec {F} = x \vec{i} - y \vec {j} + (z^{2} - 1) \vec {k}$ where $S$ is the surface bounded by the cylinder $x^{2} + y^{2} = 4$ and the planes $z = 0$ and $z = 1$.
My Attempt:
Let $\phi = x^{2} + y^{2} - 4$ then
$$\textrm {grad} (\phi) = \nabla \phi = 2x \vec{i} + 2y \vec {j}$$
$$|\textrm {grad} (\phi) | = \sqrt{4x^2 + 4y^2} $$
$$= \sqrt{4(x^2 + y^2)}$$
$$= \sqrt{4 * 4} = 4$$
Then the unit normal vector
$$\vec {n} = \frac {\textrm {grad} (\phi)}{|\textrm {grad} (\phi) |}$$
$$ = \frac { x \vec{i} + y \vec{j}}{2}$$
We then have:
$$\vec {F} . \vec {n} = \frac {x^2 - y^2}{2}$$
How to proceed from here?
 A: Continuing from where you stopped,
$i$) Outward flux through cylindrical surface
You found $\vec {F} . \hat {n} = \frac {x^2 - y^2}{2}$
Please note the symmetry of the region about $z$-axis and that the integral of $x^2$ will be same as the integral of $y^2$. That leads to flux through the cylindrical surface being zero. Considering that was not the case, you could set it up in cylindrical coordinates using parametrization $x = 2 \cos\theta, y = 2 \sin\theta$.
The integral to find flux can be written as,
$ \displaystyle \iint_S  (\vec F \cdot \hat n) ~ ds =  \int_0^{2\pi} \int_0^1 \frac{4 \cos2\theta}{2} \cdot 2 ~ dz ~ d\theta = 0$
$ii$) Based on the wording of the question, it suggests the surface includes the bottom and top discs at $z = 0$ and $z = 1$. If so,
For the top surface at $z = 1, \vec F = (x, - y, 0)$
The outward normal vector is $(0, 0, 1)$ and hence $\vec F \cdot \hat n = 0$. So the flux through the top disc is zero.
For the bottom disc surface at $z = 0, \vec F = (x, - y, -1)$ and outward normal vector is $(0, 0, -1)$ so,
$\vec F \cdot \hat n = 1$ so the flux is simply equal to the surface area of the disc, which is $4 \pi$.

If the surface includes top and bottom discs, you could have applied divergence theorem easily as well. As we have a closed surface, the outward flux through the closed surface is equivalent to the volume integral of the divergence of the vector field.
Here, $\nabla \cdot \vec F = 2 z$
Flux $ = \displaystyle \iiint_{V} (\nabla \cdot \vec F) ~ dV = \int_0^1 4 \pi \cdot 2 z ~ dz = 4 \pi$
