# Evaluate $\iint_D2x-2y \ dxdy$ using polar coordinates.

Evaluate $$\int_{\gamma}y^2dx+x^2dy,$$

where $\gamma:(x-a)^2+(y-b)^2=r^2$, running one revolution counterclockwise.

I have that $(P,Q)=(y^2,x^2)$ and $\frac{\partial Q}{\partial x}=2x$, $\frac{\partial P}{\partial y}=2y.$ By Greens theorem I have

$$\int_{\gamma}Pdx+Qdy=\iint_D\left(\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}\right) \ dxdy=\iint_D(2x-2y) \ dxdy.$$

Polar coordinates:

$$\left\{ \begin{array}{rcr} x & = & R\cos{\theta}+a \\ y & = & R\sin{\theta}+b\\ \end{array} \right.\implies E:\left\{ \begin{array}{rcr} 0 \leq R \leq r \\ 0 \leq \theta \leq 2\pi \\ \end{array} \right.$$

So my integral is

$$2\iint_Dx-y \ dxdy=\int_0^{2\pi}\int_0^r R(\cos{\theta}-\sin{\theta})+a-b =4\pi r(a-b).$$

The correct answer is $2\pi r^2(a-b),$ I'm off by a factor of $\dfrac r2$. Can't find the error.

Note that passing in polar coordinates we need a factor $Rd\theta dR=dxdy$, then
$$2\iint_Dx-y \ dxdy=2\int_0^{2\pi}\int_0^r R^2(\cos{\theta}-\sin{\theta})+(a-b)R\,dR\,d\theta =4\pi \frac{r^2}2(a-b)$$
In polar coordinates the element of area is $RdR d\theta$ instead of the cartesian element of $dxdy$.
Note that $RdR d\theta$ is the Jacobian of the transformation $$(x,y)\to (Rcos(\theta), Rcos(\theta))$$ from Cartesian to Polar.