Calculate the work done by the force field $\mathbf{f}(x,y,z)=(y-z)\mathbf{i}+(z-x)\mathbf{j}+(x-y)\mathbf{k}$ along the curve of intersection of the sphere $x^2 + y^2 + z^2 = 4$ and the plane $z=y\tan\theta$, where $0<\theta<\pi/2$. The path is traversed in a direction that appears counterclockwise when viewed from high above the $xy$-plane.
My approach:
Since the sphere and the plane intersect along an ellipse, we put $z=y\tan\theta$ in $x^2 + y^2 + z^2 = 4$ to obtain
$x^2+y^2+y^2\tan^2\theta = 4\implies x^2 + y^2(1+\tan^2\theta) = 4\implies\frac{x^2}{4}+\frac{y^2}{4\cos^2\theta} = 1$, which is the equation of the required ellipse.
The parameterization is therefore $(x,y)=(2\cos t,2\cos\theta \sin t)$.
Thus, $\alpha(t) = 2\cos t\mathbf{i}+2\cos\theta\sin t\mathbf{j}$
$\implies \alpha'(t) = -2\sin t\mathbf{i} + 2\cos\theta\cos t\mathbf{j}$
$\therefore \mathbf{f}(\alpha(t)) = 2\cos\theta\sin t\mathbf{i}-2\cos t\mathbf{j}+(2\cos t - 2\cos\theta\sin t)\mathbf{k}$
and
$\mathbf{f}(\alpha(t))\cdot\alpha'(t) = -4\cos\theta\sin^2t-4\cos\theta\cos^2t = -4\cos\theta(\sin^2t+\cos^2t) = -4\cos\theta$
Thus $\int_a^b\mathbf{f}(\alpha(t))\cdot\alpha'(t)dt = \int_0^{2\pi}-4\cos\theta dt = -8\pi\cos\theta $
But the answer given in the book is $8\pi(\sin\theta - \cos\theta)$. What am I doing wrong?
Your problem is that you are setting the $z$-component to $0$ after already having said that $z=y\tan\theta$. Your equation should read $$\vec r(t)=\langle2\cos t,2\cos\theta\sin t,2\sin\theta\sin t\rangle$$ so $$d\vec r(t)=\langle-2\sin t,2\cos\theta \cos t,2\sin\theta\cos t\rangle dt$$ And $$\vec f(t)=\langle2\cos\theta\sin t-2\sin\theta\sin t,2\sin\theta\sin t-2\cos t,2\cos t-2\cos\theta\sin t\rangle$$ And since the average value of $\sin^2 t$ and $\cos^2 t$ is $1/2$ and the average value of $\sin t\cos t$ is $0$ we have $$w=\oint\vec f\cdot d\vec r=2\pi\left(-2\cos\theta+2\sin\theta+0-2\cos\theta+2\sin\theta-0\right)=8\pi(\sin\theta-\cos\theta)$$