Calculate $$\int_C \frac{x^2-y^2}{x^2+y^2}ds$$ where C is the circle $x^2 + y^2 = 4$ from $A = ({2,0})$ to $B = (-1, \sqrt{3})$
I calculated $\,\,\,\,r = (2\cos{t},2\sin{t})\,\,\,\,$ and $\,\,\,\,||r'(t)|| = 2\,\,\,\,$ so we have: $$2\int_0^\frac{2\pi}{3}(\cos^2{t}-\sin^2{t})dt = -\frac{\sqrt{3}}{2}$$
Since the author gave the points and explicitly said "from A to B" I suppose I got right, however the result is negative, that seems wrong
$ \displaystyle 2\int_0^\frac{2\pi}{3}(\cos^2{t}-\sin^2{t}) ~ dt = -\frac{\sqrt{3}}{2} ~ $ and that is the correct answer.
$\cos^2t - \sin^2t = \cos2t, 0 \leq t \leq \frac{2\pi}{3}$ and if we rewrite $u = 2t$,
we have $~ \cos u, 0 \leq u \leq \frac{4 \pi}{3}$. We know $\cos u$ is positive in the first quadrant and negative in the second and given $|\cos u| = |\cos(\pi-u)|$, the integral in the first and second quadrant will cancel out. So the integral only depends on third quadrant $\pi \leq u \leq \frac{4\pi}{3}$ and $\cos$ function is negative in the third quadrant. So clearly, the answer should be negative.
Finally, note that in line integral of a scalar function, orientation of the curve is not relevant. You have to integrate over the curve, just like you integrate to find area of a region. The only difference being that in this case, you have an integrand that may be negative over the arc.