I need a help on the following exercise:
Consider the following surface
$$S= \{(x,y,z): x^2+y^2+z^2 = 4, x^2+y^2 \leq 2, z>0 \}$$
Compute the flux of $\nabla \times G$ exiting from $S$, where $G(x,y,z)=(xy,zx,x^2+y^2)$
First of all, it's clear that $S$ can be parametrized with $\sigma(x,y)=(x,y,x^2+y^2)$, where $(x,y) \in B_{\sqrt{2}}(0,0)$. However, that surface integral is not so short to compute, so it's better to use Stokes' theorem and compute $$\int_{\partial S^+} G \cdot dr$$ where $\partial S$ is the boundary of the surface $S$.
The question is: what is the boundary of $S$, or better, how may it be parametrized? My guess is that it is parametrized by $r(t)=(\sqrt{2} \cos(t), \sqrt{2} \sin(t),\sqrt{2})$ with $t \in [0, 2 \pi)$. So, the integral to compute is $$\int_{\partial S} G \cdot dr = \int_0^{2 \pi} (\sin(2t),2 \cos(t),2) \cdot (-\sqrt{2} \sin(t), \sqrt{2} \cos(t),0) dt = \text{computations} = 0$$
Is everything correct?
Please note your parametrization is correct. Also note that the surface is above $z \geq \sqrt2$ as $x^2 + y^2 \leq 2, z \gt 0$ so based on your integral, the orientation of the boundary and the surface also matches. But your integral is not zero.
$\displaystyle \int_{C} \vec{G} \cdot d\vec{r} = \int_0^{2 \pi} (\sin(2t),2 \cos(t),2) \cdot (-\sqrt{2} \sin(t), \sqrt{2} \cos(t),0) \, dt$
$\displaystyle = 2\sqrt2\int_0^{2\pi} (\cos^2t- \sin^2t \cos t) \, dt = 2 \sqrt2 \, \pi$
By the way the double integral is not very complicated either.
$\nabla \times \vec{G} = (2y-x, -2x, z-x)$. Unit normal vector to the surface is $(\frac{x}{2}, \frac{y}{2}, \frac{z}{2})$
In spherical coordinates $x = 2 \cos \theta \sin \phi, y = 2 \sin \theta \sin \phi, z = 2 \cos \phi$
So your integral becomes,
$8 \displaystyle \int_0^{2\pi} \int_{0}^{\pi/4} (cos^2\phi - cos^2 \theta \sin^2\phi - 2 \cos \theta \sin\phi \cos\phi) sin\phi \, d\phi \, d\theta = 2 \sqrt2 \, \pi$