Compute $\iint (x+y)\,dx\, dy$ with circle constraint $x^{2}+y^{2}=x+y$ I have a double integral:
$$\iint (x+y)\,dx\, dy$$
with circle constraint:
$$x^{2}+y^{2}=x+y$$
I tried to calculate it with transition to polar coordinates:
$$x^{2}+y^{2}=x+y$$
$$\left(x-\frac{1}{2}\right)^{2}+\left(y-\frac{1}{2}\right)^{2}=\frac{1}{2}$$
In polar coordinates:
$$r^{2}(\cos(\varphi))^{2} + r^{2}(\sin(\varphi))^{2} = r\cos(\varphi) + r\sin(\varphi)$$
$$r = \cos(\varphi) + \sin(\varphi)$$
Graph looks like this:

But i don't understand how to find polar radius change interval here. If i separate circle into two, for first half circle for example it will go from $\textbf{some point}$ to $\frac{\pi}{2}$. I don't understand how to find that $\textbf{some point}$, cause it starts from point ($\frac{1}{2}-\frac{1}{\sqrt{2}} = -0.2071$).
 A: There are 3 possible answers I can see, depending on what you meant.
1: What you said—a 2D integral over a 1D set. In this case the answer is 0, no working required.
2: A line integral over the curve $C:x^2+y^2=x+y$. We can parametrise this curve as $(x,y)=r(\theta)=\left(\frac{1}{\sqrt{2}}\cos\theta+\frac{1}{2},\frac{1}{\sqrt{2}}\sin\theta+\frac{1}{2}\right)$ for $\theta\in[0,2\pi]$. A quick check shows that $|r'(\theta)|=\frac{1}{\sqrt{2}}$. So then the integral is
$$\int_Cf(x,y)ds = \int_0^{2\pi}f(r(\theta))|r'(\theta)|d\theta = \int_0^{2\pi}\left(\frac{1}{2}(\cos\theta+\sin\theta)+\frac{1}{\sqrt{2}}\right)d\theta,$$
which I'm sure you can work out.
3: A genuine double integral over the disc $D:x^2+y^2\leq x+y$. We can parametrise this in (I believe) a clearer way than has already been given: $(x,y)=\left(r\cos\theta+\frac{1}{2},r\sin\theta+\frac{1}{2}\right)$, for $\theta\in[0,2\pi]$ and $r\in[0,1/\sqrt{2}]$. Recall that the area element in polar coordinates is $dxdy=rdrd\theta$. Thus the integral is:
$$\iint_D(x+y)dxdy=\int_0^{2\pi}\int_0^{1/\sqrt{2}}\left(r^2(\cos\theta+\sin\theta)+r\right)drd\theta.$$
This splits into two terms and each term is simply the product of 2 1-variable integrals, so I'm sure you can work this out as well.
A: We are asked to evaluate the integral, $I$, of the function $f(x,y)=x+y$ over the disk defined by the boundary circle $x^2+y^2= x+y$.  We can express $I$ in Cartesian coordinates as
$$I=\int_{1/2-1/\sqrt2}^{1/2+1/\sqrt2} \int_{1/2-\sqrt{1/2-(y-1/2)^2}}^{1/2+\sqrt{1/2-(y-1/2)^2}} (x+y)\,dx\,dy$$
If we make a brute force transformation to polar coordinates, $(r,\phi)$, then the locus of points on the boundary of the disk are given by $r=\cos(\phi)+\sin(\phi)$ with $\phi\in [-\pi/4,3\pi/4]$ serving as a parameter.  Then, we have
$$\begin{align}
I&=\int_{-\pi/4}^{3\pi/4} \int_0^{\cos(\phi)+\sin(\phi)}(r\cos(\phi)+r\sin(\phi))\,r\,dr\,d\phi\\\\
\end{align}$$
Can you finish now?
A: Assuming, that we integrate on $x^2+y^2\leqslant x+y$, as noted by @Tom Sharpe, we can obtain all necessary limits from $0 \leqslant r = \sin \phi + \cos \phi$
For example, let's obtain limits for $\phi$:
we have $\sin \phi + \cos \phi = \sqrt{2} \cos \left(\frac{\pi}{4} - \phi \right)$. Now most simple is draw graphic of this function and see where is it positive - we will see $[-\frac{\pi}{4},\frac{3\pi}{4}] $ as one possible solution, which agrees with geometrical view from $Oxy$ plane, that circle is in one side of $y=-x$ line. Obviously any other solution, from periodic nature of trigonometric function, is acceptable. Another way is take formal definition of $\cos$ and find mentioned segment from it. Result will be same.
$$\int\limits_{-\frac{\pi}{4}}^{\frac{3\pi}{4}}\int\limits_{0}^{\sin \phi + \cos \phi}r^2(\sin \phi + \cos \phi)d \phi dr$$
I would like to say that the path indicated by  @Alexey Burdin is closer to my heart, although, the decisive factor here, may be, is question what better to optimize - the limits of the integral or the integrand.
