Line integral of $F = r \times k$ on hemisphere

Exam revision -

Verify Stokes theorem directly by explicit calculation of the surface and line integrals for the hemisphere $r=c$, with $z \geq 0$, where $F = r \times k$ and $k$ is the unit vector in the positive z-direction.

Attempt:

$$F = r \times k = r Cos(\theta) \ \hat{\phi}$$

Where $r, \theta, \phi$ are defined in the normal way.

We need to check that

$$\int^{}_{C}F.dl = \int^{}_{S}\nabla \times F.ds$$

I'm getting stuck even on the line integral.

$$dl = dr \ \hat{r} + r d\theta \ \hat{\theta} + r Sin(\theta) d\phi \ \hat{\phi}$$

$$\int^{\frac{\pi}{2}}_{0} r^2 Cos(\theta) Sin(\theta) d \phi$$

$$\frac{\pi}{2}r^2 Cos(\theta) Sin(\theta)$$

This seems wrong to me but I can't figure out why?

Use the fact that

$$\mathbf{r} = \sin{\theta} \cos{\phi} \mathbf{x} + \sin{\theta} \sin{\phi} \mathbf{y} + \cos{\theta} \mathbf{z}$$

$$\mathbf{\theta} = \cos{\theta} \cos{\phi} \mathbf{x} + \cos{\theta} \sin{\phi} \mathbf{y} - \sin{\theta} \mathbf{z}$$

$$\mathbf{\phi} = -\sin{\phi} \mathbf{x} + \cos{\phi} \mathbf{y}$$

to derive

$$\mathbf{F} = \mathbf{r} \times \mathbf{z} = -r \sin{\theta} \, \mathbf{\phi}$$

In cartesians

$$\mathbf{F} = y \mathbf{x} - x \mathbf{y}$$

You can show that

$$\nabla \times \mathbf{F} = -2 \mathbf{z}$$

Then the surface integral is

$$\int_S dS\: \mathbf{r} \cdot \nabla \times \mathbf{F} = -4 \pi c^2 \int_0^{\pi/2} d\theta \: \sin{\theta} \cos{\theta} = -2 \pi c^2$$

The line integral comes from the simple expression for $\mathbf{F}$ in sphericals, at $\theta = \pi/2$:

$$\oint_{\partial S} \mathbf{F}\cdot c d\phi = -c^2 \int_0^{2 \pi} d\phi = -2 \pi c^2$$

as expected from Stoke's Theorem.