I'm asked to calculate the work of the vector field $K(x,y,z)=(-y,x+z,-y+y^3+z)$ along the curve which is the intersection of the sphere of radius 1 and the plane $x=z$ :
a) directly
b) using Stoke's theorem
My problem is that I obtain different results in both cases.
For a) (correction : see edit 1 below), I use as parametrization $(\cos(\theta),\sin(\theta),\cos(\theta))$. The gradient is $(-\sin(\theta),\cos(\theta),-\sin(\theta))$. The dot product of that with our vector field in polar coordinates $(-\sin(\theta),2\cos(\theta),-\sin(\theta)+\sin^3(\theta)+\cos(\theta))$ is simply $2-\sin^4(\theta)-\sin(\theta)\cos(\theta)$. If we integrate that from $0$ to $2\pi$, we get $\frac{13\pi}{4}$ noting that $\sin(\theta)\cos(\theta)$ vanishes.
For b), the curl of our vector field is $(3y^2-2,0,2)$. Our parametrization is $(r\cos(\theta),r\sin(\theta),r\cos(\theta))$. The cross product of the partial derivatives is simply $(-r,0,r)$. The dot product of that with our curl in polar coordinates is $4r-3r^3\sin^2(\theta)$. So now, we have $$\int_{0}^{2\pi}\int_{0}^{1}(4r-3r^3\sin^2(\theta))rdrd\theta=\pi\int_{0}^{1}(8r^2-3r^4)rdr=\frac{31\pi}{15}$$
So I don't see where I did something wrong, or where I forgot something.
Thanks for your help !
Edit 1:
Okay, as was pointed out in the comments and in one answer, I used a wrong parametrization in a). I should use $\frac{\cos(\theta)}{\sqrt{2}}$ instead of $\cos(\theta)$ for the parametrization of $x$ and $z$.
In this case, we get the dot product of $(-\sin(\theta), \sqrt{2}\cos(\theta), -\sin(\theta)+\sin^3(\theta)+\frac{\cos(\theta)}{\sqrt{2}})$ and $(\frac{-\sin(\theta)}{\sqrt{2}}, \cos(\theta),\frac{-\sin(\theta)}{\sqrt{2}}) $ which yields $$\frac{\sin^2(\theta)}{\sqrt{2}}+\sqrt{2}\cos^2(\theta)+\frac{\sin^2(\theta)}{\sqrt{2}}-\frac{\sin^4(\theta)}{\sqrt{2}}-\frac{\sin(\theta)\cos(\theta)}{2}$$. If we integrate that from $0$ to $2\pi$, the last term vanishes and using the common trig identity, we simply integrate $\sqrt{2}-\frac{\sin^4(\theta)}{\sqrt{2}}$. So we get $\frac{13\pi}{4\sqrt{2}}$. But it's still different fom b) though.
Edit 2 :
As was pointed out in the comments, I also need to use the new parametrization for part b). But even so, I get $\frac{31\pi}{15\sqrt{2}}$
The cross product of the derivatives is $(\frac{-r}{\sqrt{2}},0,\frac{r}{\sqrt{2}})$. We need to integrate from $0$ to $2\pi$ $d\theta$ and from $0$ to $1$ $dr$ the following (the curl remains the same): $(\frac{4r}{\sqrt{2}}-\frac{3r^3sin^2(\theta)}{\sqrt{2}})r=\frac{4r^2}{\sqrt{2}}-\frac{3r^4sin^2(\theta)}{\sqrt{2}}$ which yields $\frac{8\pi r^3}{3\sqrt{2}}-\frac{3\pi r^5}{5\sqrt{2}}$ evaluated from $0$ to $1$ and so we get $\frac{31\pi}{15\sqrt{2}}$
Edit 3 : problem solved. I multiplied by an extra $r$ in b). I should not have $(\frac{4r}{\sqrt{2}}-\frac{3r^3sin^2(\theta)}{\sqrt{2}})r$ but simply $(\frac{4r}{\sqrt{2}}-\frac{3r^3sin^2(\theta)}{\sqrt{2}})$ See my answer below.
Hint
Your parametrization is wrong in a) since it should be $$\left({\cos \theta\over\sqrt 2},{\sin\theta},{\cos \theta\over\sqrt 2}\right)$$