Question:
I am trying to test my understanding of Stokes' theorem by calculating the left and right hand side of the theorems equality by way of example and seeing whether they equal each other. They don't, which leads me to question my understanding of the theorem and where I am making an error or whether the example does not satisfy the conditions to apply Stokes theorem?
Example Question:
To test Stokes' theorem, I'm using the following example: A surface $S = \{(x, y, z) | z = 3 - x^2 - y^2; z >= 2\}$ is oriented upwards which is located within a vector field $F(x, y, z) = (-y, x, 1)$.
Applicability of Stokes theorem: Surface S is smooth, oriented surface whose orientated boundary C is smooth, simple closed, curve. Furthermore, vector field F is smooth 3-dimensional vector field whose domain is a region in $\mathbb R^3$ that contains S. Therefore we can apply Stokes theorem:
$\iint_S (\underline{curl} \underline{F}) \cdot \underline n dS$ = $\int_C \underline F \cdot d\underline r$
Calculating the LHS of Stokes equation:
$ \underline{curlF} = $$ \begin{vmatrix} \underline i & \underline j & \underline k \\ \frac{\partial}{\partial x} & \frac{\partial}{\partial y} & \frac{\partial}{\partial z} \\ -y & x & 1 \\ \end{vmatrix} $$ = (0, 0, 2) $
Let $G(x, y, z) = z - (3 - x^2 - y^2) = z - 3 + x^2 + y^2$
$\nabla G(x,y,z) = (2x, 2y, 1)$
$\underline n(x,y,z) = \frac{\nabla G(x,y,z)}{\lVert \nabla G(x,y,z)\rVert} $
$\underline n(x,y,z) = \frac{(2x, 2y, 1)}{\sqrt{4x^2 + 4y^2 + 1}} $
$\iint_S (\underline{curl} \underline{F}) \cdot \underline n dS = (0, 0, 2) \cdot \frac{(2x, 2y, 1)}{\sqrt{4x^2 + 4y^2 + 1}}$
$\iint_S (\underline{curl} \underline{F}) \cdot \underline n dS = \frac{2}{\sqrt{4x^2 + 4y^2 + 1}}$
$dS = \sqrt{\frac{\partial z}{\partial x}^2 + \frac{\partial z}{\partial y}^2 + \frac{\partial z}{\partial z}^2} dA$
$dS = \sqrt{4x^2 + 4y^2 + 1} dA$
$\iint_S (\underline{curl} \underline{F}) \cdot \underline n dS = \iint_R 2 dA$
$=\int_0^{2\pi}\int_0^1 2 r dr d\theta$
$=\int_0^{2\pi}[r^2]_0^1d\theta$
$=\int_0^{2\pi}1d\theta$
$=2\pi$
Calculating the RHS of Stokes equation should also give 2Pi:
Parametising C gives us: $(x,y,z) = (2\sin t, y = 2\cos t, z = 2), t \in [0, 2\pi]$
$\int_C \underline F \cdot d\underline r = \int_C -y dx + x dy + dz $
where... $dx = 2\cos t dt$
$dy = -2\sin t dt$
$dz = 0 $
$=\int_0^{2\pi} (-2\cos t) (2 \cos t) dt + (2\sin t) (- 2\sin t) dt$
$=\int_0^{2\pi} -4\cos^2 t - 4\sin^2 tdt$
$=-4\int_0^{2\pi} \sin^2 t + \cos^2 tdt$
$=-4\int_0^{2\pi} 1dt$
$=-4[t]_0^{2\pi} $
$-8\pi$
LHS doesnt equal RHS and I don't know why