I am trying to answer the following question, but am having difficulty getting the same result for each side of Stokes' theorem.
Question:
Verify Stokes' Theorem for the hemisphere $D: x^2 + y^2 + z^2 = 9, z\geq0$ its bounding circle $C: x^2 + y^2 = 9, z=0$ and the vector field $\overrightarrow{A} = y\overrightarrow{i} - x\overrightarrow{j}$.
LHS:
$\oint_{C} \overrightarrow{A} \cdot d\overrightarrow{r} = \oint_{C} ydx - xdy = -9\int_{0}^{2\pi}sin^2\theta + cos^2\theta \quad d\theta = \quad ...\quad = -18\pi$
I'm not sure how correct this is so apologies if I have made a mistake here.
RHS: For the RHS whichever way I work it I keep getting -18 as the solution and I'm not sure where I'm going wrong. This is the kind of working I have done, I'm definitely doing something wrong here:
$\int_{S} curl(\overrightarrow{A}) \cdot \overrightarrow{n} dS = \cdots = -2 \int_{R}dxdy = \cdots = -18\int_{0}^{2\pi} cos\theta sin\theta - sin\theta d\theta = \cdots $
Let's clarify our setting first. Note that a normal vector to the sphere of radius $3$ at $\vec{x}$ is $\vec{n}=\frac{\vec{x}}{\|\vec{x}\|}=\frac{\vec{x}}{3}$. Our hemisphere is given by $$ S=\{(x,y,\varphi(x,y)): x^2+y^2\le 9\}, $$ with $\varphi(x,y)=\sqrt{9-x^2-y^2}$. Therefore the surface measure is $$ dS(\vec{x})=\sqrt{1+\|\nabla \varphi(\vec{x})\|^2}=\sqrt{1+\frac{x^2+y^2}{9-x^2+y^2}}=\frac{3}{\sqrt{9-x^2+y^2}} $$ and the integration against $dS$ is given for $f:\mathbb{R}^3\rightarrow \mathbb{R}$ by $$ \int_S f dS= \int_{\{x^2+y^2\le 9\}} f\left(x,y,\sqrt{9-x^2+y^2}\right)\frac{3}{\sqrt{9-x^2+y^2}}\,dx\,dy $$ Finally, the curl of the vector field $\vec{A}$ is $(0,0,-2)$. Therefore we have \begin{align*} \int_{S} curl(\vec{A}) \cdot \vec{n}\, dS&=\int_S (0,0,-2)\cdot \frac{\vec{x}}{3}\,dS (\vec{x})\\ &=\frac{-2}3 \int_{\{x^2+y^2\le 9\}} \sqrt{9-x^2+y^2} \frac{3}{\sqrt{9-x^2+y^2}}\,dx\,dy \\ &=-2 |\{(x,y)\in\mathbb{R}^2: x^2+y^2\le 9\}|=-18\pi. \end{align*}