# Verification of Stokes Theorem

I want to verify Stokes Theorem for the surface $$\Phi = \{ (x,y,z) \in \mathbb R^3 : z = x^2 - y^2, x^2 + y^2 \le 1 \}$$ and the vector field $F(x,y,z) := (y,z,x)$. For this I use the parametrisation $$\varphi(r, \theta) = \begin{pmatrix} r\cos \theta \\ r \sin \theta \\ r^2(\cos^2 \theta - \sin^2\theta) \end{pmatrix} = \begin{pmatrix} r\cos \theta \\ r \sin \theta \\ r^2(2\cos^2\theta - 1) \end{pmatrix}$$ with $0 \le r \le 1, 0 \le \theta < 2\pi$.

Then $$\varphi_r(r, \theta) = \begin{pmatrix} \cos\theta \\ \sin\theta \\ 2r(2\cos^2\theta - 1) \end{pmatrix} \qquad \varphi_{\theta}(r,\theta) = \begin{pmatrix} -r\sin\theta \\ r\cos\theta \\ -4r^2 \cos\theta \sin\theta \end{pmatrix}$$ and $$\varphi_r \times \varphi_{\theta} = \begin{pmatrix} -2r^2\cos\theta \\ 2r^2\sin\theta \\ r \end{pmatrix}.$$ and also $$\mbox{rot}(F) = \begin{pmatrix} -1\\ -1\\ -1 \end{pmatrix}$$ So now I have everything at hand to compute the two sides of $$\int_{\Phi} \mbox{rot}(F) \cdot \vec{n} ~ dS = \int_{\partial \Phi} F(r) \cdot dr.$$ For the RHS I have \begin{align*} \int_0^{2\pi} F(\varphi(1, \theta)) \cdot \varphi_{\theta}(1, \theta) & = r^3 \int_0^{2\pi} \cos\theta(2\cos^2\theta - 1) d\theta - r^2 \int_0^{2\pi} \sin\theta d\theta - 4r^3 \int_0^{2\pi} \cos^2\theta \sin\theta d\theta \\ & = 0 \end{align*} and for the LHS: \begin{align*} \int_0^1 \int_0^{2\pi} \begin{pmatrix} -1\\-1\\-1\end{pmatrix} \cdot \begin{pmatrix} -2r^2\cos\theta \\ 2r^2\sin\theta \\ r \end{pmatrix} d\theta dr & = - \int_0^1 \int_0^{2\pi} 2r^2(\sin(\theta)-\cos(\theta)) + r d\theta dr \\ & = - \int_0^1 \int_0^{2\pi} r d\theta dr = \pi \end{align*} so these are not equal. But I looked at the calculations several times and I am sure they are right, so do you see what went wrong?

The main thing is that for your line integral you should have (remember that $r=1$) $$\int_0^{2\pi} \big((\sin\theta)(-\sin\theta) + (2\cos^2\theta-1)(\cos\theta) + (\cos\theta)(-4\cos\theta\sin\theta)\big)\,d\theta = -\pi,$$ and you lost a minus sign in the surface integral at the end. I think you just made a copying error in part of it.