I want to verify Stokes’ Theorem by evaluating both the left and right side of the following eqn.
$$\int_C \vec F \cdot d\vec r = \int \int_S curl \vec F \cdot d\vec S$$
where $\vec F = \left< -y,x,-2\right>$ and $S$ is the region defined by $z^2 = x^2 + y^2, \space z \in [0,4]$.
When I use the parameterization $\vec r = \left< \cos \theta, \sin \theta, z\right>$
I get a normal vector $\vec n = \left< \cos\theta, \sin \theta,0\right>$ and since $curl \vec F = \left<0,0,2 \right>$
$$curlf \vec F \cdot \vec n = 0$$
so the right hand side equals zero.
Here is what I am not sure since it has been a while since I have evaluated line integrals.
I believe that $C$ is the projection of $S$ onto the $xy$-plane, so it will be a circle with radius $16$.
So, the parameterization I choose is $\vec r = \left< 4\cos \theta, 4\sin \theta, 0\right>$
and because $\vec F = \left<-4\sin\theta, 4\cos\theta,-2 \right>$
$$\vec F \cdot \vec r = 0$$
hence the left side is equal to zero.
Can anyone confirm that I did this correctly?
No, both RHS and LHS have mistakes that have led to you getting integrals as zero.
A) For RHS, your parametrization is not correct. The correct parametrization is
$\vec r(\rho,\theta) = (\rho \cos\theta, \rho \sin\theta, \rho)$, as $z = \rho$ from the equation of the cone.
$r'_{\rho} \times r'_{\theta} = (\rho \cos\theta, \rho \sin \theta, - \rho)$
$0 \leq \rho \leq 4, 0 \leq \theta \leq 2\pi$.
Can you now complete the integral?
B) For LHS which is line integral, you should have the $z$ component in your parametrization though it would not matter here.
$\vec r(\theta) = (4\cos\theta, 4\sin\theta, 4)$
Now we are supposed to do $\vec F \cdot \vec {r} \ '$ and not $\vec F \cdot \vec r$. That was the mistake in your working of LHS.
$r'_{\theta} = (- 4 \sin\theta, 4 \cos\theta, 0)$
$0 \leq \theta \leq 2\pi$.
Can you complete the working now?
Last point - the outward normal vector for the given cone surface is pointing downward and that is why we have taken $z$ component negative in the first working. Now align the orientation of the boundary curve to the orientation of the surface in your line integral.