<s>[INST] Evaluate $\iint_{\{(x,y)\mid (x-1)^2+y^2\leq1\}}\sqrt{x^2+y^2} dxdy$ [Background]: I'm trying to find the volume of the region bounded by the $xy$-plane, the cone $z^2=x^2+y^2$ and the cylinder $(x-1)^2+y^2=1$.
[Attempt]: I tried to use the polar coordinate:
\begin{align*}
\iint_{\{(x,y)\mid (x-1)^2+y^2\leq1\}}\sqrt{x^2+y^2} dxdy &= \int_0^{2\pi}\int_0^1 \sqrt{(1+r\cos{\theta})^2+(r\sin{\theta})^2}rdrd\theta\\
&= \int_0^{2\pi}\int_0^1 \sqrt{1+2r\cos\theta+r^2}r drd\theta
\end{align*}
Then I cannot continue. Could you give me a hint?
 [/INST] Hint Writing the domain in polar coordinates gives
$$(r \cos \theta - 1)^2 + (r \sin \theta)^2 \leq 1 .$$
Expanding and using the Pythagorean identity gives
$$r^2 - 2 r \cos \theta + 1 \leq 1,$$
rearranging gives
$$r^2 \leq 2 r \cos \theta ,$$
and for $r \neq 0$, dividing by $r$ gives
$$r \leq 2 \cos \theta .$$
So, in polar coordinates the integral becomes
$$\int_{-\pi / 2}^{\pi / 2} \int_0^{2 \cos \theta} \underbrace{r}_{\sqrt{x^2 + y^2}} \cdot \underbrace{r \,dr \,d\theta}_{dx\,dy} = \int_{-\pi / 2}^{\pi / 2} \int_0^{2 \cos \theta} r^2 \,dr \,d\theta .$$
</s>