# Calculate integral applying Stokes' theorem

I am trying to solve the following exercise:

Let $F$ be the vector field defined by $F(x,y,z)=(-y,yz^2,x^2z)$ and $S \subset \mathbb R^3$ the surface defined as $S=\{x^2+y^2+z^2=4, z\geq 0\}$, oriented according to the exterior normal vector. Calculate: $\iint_S (\nabla\times F).dS$.

The attempt at a solution:

I've calculated the curl, it's not an easy integral to calculate.

I can't apply Stokes' theorem because it is not a closed surface, but if I consider the surface $S^{*}=\{x^2+y^2+z^2=4, z\geq 0\} \cup \{ x^2+y^2\leq 4, z=0\}$, then this is a closed surface and $F$ is of class $C^1$, so Stokes'theorem says that:

$\iint_S^{*} (\nabla\times F).dS=\int_CF.ds$ where $C$ is the boundary of the surface $S^{*}$.

Now, my original integral is

$\iint_S (\nabla\times F).dS=\iint_S^{*} (\nabla\times F).dS-\iint_D (\nabla\times F).dS$, where $D=\{ x^2+y^2\leq 4, z=0\}$. But as $D$ is a closed surface, I can also apply Stokes' theorem, so

$\iint_D (\nabla\times F).dS=\int_{C'} F.ds$, where $C'$ is the boundary of $D$.

Now, my question is: isn't $C=C'$?, I mean, the curve boundary of $S^{*}$ is the same boundary than the one of $D$. If this is the case

$\iint_S (\nabla\times F).dS=\int_C F.ds-\int_{C'} F.ds=\int_C F.ds-\int_{C} F.ds=0$.

Could someone tell me if my solution is correct?

You are confusing Stokes's theorem in $\mathbb{R}^3$ with Gauss's. You do not need a closed surface in order to apply Stokes's theorem, quite on the contrary: if you had a closed surface its boundary would be empty and the integral would be zero.
$$\iint\limits_{S} (\nabla \times \vec{F} ) \cdot d \vec{S} = \iiint\limits_{V} \nabla \cdot (\nabla \times \vec{F} ) \, dV,$$
but we have the vector identity $\nabla \cdot (\nabla \times \vec{F}) = 0,$ or $\text{div} (\text{rot}(\vec{F})) = 0$, as desired.)
That said, the boundary of your surface is pretty easy: it's the circle with radius 2 in the plane $z=0$, which can be parametrized as $\vec{r}(t) = (x(t),y(t),z(t)) = (2 \cos t, 2 \sin (t), 0).$ We can now use Stokes's theorem, yielding
\begin{align} \iint\limits_{S} (\nabla \times \vec{F}) \cdot d \vec{S} & = \int\limits_{C} \vec{F}(\vec{r}(t)) \cdot d \vec{r}(t) \\ & = \int_0^{2 \pi} (- 2 \sin (t)) \cdot (-2 \sin (t)) \, dt \\ & = \int_0^{2 \pi} 4 \sin^2 (t) \, dt \\ & = 4 \cdot \int_0^{2 \pi} \sin^2 (t) \, dt = 4 \pi. \end{align}