Use greens theorem to calculate $\int_{\gamma}y\,dx+x^2dy$ where $\gamma$ is the following closed path: (a) The circle given by $g(t) = (\cos(t), \sin(t)), 0 \le t \le 2\pi$.
What I have tried:
Using the following $$\int_\gamma P\,dx+Q\,dy = \int_D\left(\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y} \right)$$
I have that $$\frac{\partial (x^2)}{\partial x}-\frac{\partial (y)}{\partial y} = 2x-1$$
Replacing $x = \cos(t)$ I then have:
$$\int_0^{2\pi}(2\cos(t)-1)\,dt=-2\pi$$
But the answer in my book show $-\pi$, so I have tried replacing $x = \cos(t), y = \sin(t), dx = -\sin(t), dy = \cos(t)$ in the integral but that gives me $\pi$. Have I made a mistake?