I have problem with solving the following integral.
Given that $D = \{(x,y)| x^2 + y^2 \leq 2(x+y)\}$, evaluate the double integral:
$$\iint_D|x - y|\mathrm{d}x\mathrm{d}y$$
I think I should convert $D$ to polar coordinates using the formulas $x = r\cos(\theta)$ and $y = r\sin(\theta)$, but I can't find the range of $\theta$.
Thanks in advance!
Note that $D$ is a circle tangential to the line $y+x=1$ at the origin. In polar coordinates, $D = \{(r,\theta)| r< 2(\cos\theta+\sin\theta)\}$ with $\theta \in (-\frac\pi4, \frac{3\pi}4)$
\begin{align} &\iint_D|x - y|\mathrm{d}x\mathrm{d}y\\ =& \int_{-\frac\pi4}^{\frac{3\pi}4 }\int_0^{2(\cos\theta+\sin\theta)} r|\cos\theta - \sin\theta|\ rdrd\theta\\ =& \ 2\int_{-\frac\pi4}^{\frac{\pi}4 }\int_0^{2(\cos\theta+\sin\theta)}(\cos\theta - \sin\theta)r^2 dr d\theta\\ = & \ \frac{16}3\int_{-\frac\pi4}^{\frac{\pi}4 }(\cos\theta - \sin\theta)(\cos\theta+\sin\theta)^3d\theta=\frac{16}3 \end{align}