Verifying Stokes' theorem on the surface of a torus "Let $0 < a < b$. Verify Stokes' theorem when $\mathbf{F} = (y,z,x)$ and $\Sigma$ is the upper half of the torus generated by rotating the circle $(x-b)^2 + z^2 = a^2$ about the $z$-axis".
I parametrized the torus as $\left((b+a\cos\theta)\cos\phi,(b+a\cos\theta)\sin\phi,a\sin\theta\right)$ and obtained $\pi a(a+2b)$ for the surface integral. For the line integral, I got two semicircles with radii $b-a$ and $b+a$, and got $2\pi ab$, which is different. Can someone assist with identifying the mistake (or set out a correct solution)?

Your parametrization $(\phi,\theta)\mapsto{\bf f}(\phi,\theta)$ of the torus surface is fine.  For the upper half $S$ of this surface the parameter domain is $0\leq\phi\leq2\pi$, $\>0\leq\theta\leq \pi$. The boundary $\partial S$ does not consist of two half circles, but of two full circles in the $(x,y)$-plane, having radii $a+b$ and $a-b$. These two circles are differently oriented, e.g., the outer circle counterclockwise when seen from above, and the inner circle clockwise. This orientation of the circles corresponds to a surface normal ${\bf n}$ on $S$ having positive $z$-component. You will have to check whether ${\bf f}_\phi\times{\bf f}_\theta$ satisfies this.
