Converting unit square domain in (x,y) to polar coordinates I have the following double integral
$\int_{0}^{1}\int_{0}^{1}\frac{x}{\sqrt{x^2+y^2}}dxdy$
The integrand is fairly simple: $\frac{x}{\sqrt{x^2+y^2}}dxdy=\frac{r\cos(\theta )}{\sqrt{r^2}}rd\theta{}dr=r\cos{(\theta)}d\theta{}dr$
My trouble is with the limits of integration. I've tried: 
$0 \leq y \leq 1$ means $0 \leq{} r\sin(\theta{}) \leq 1$ so  $0 \leq \theta \leq arcsin(1/r)$
But why isn't it just $0<\theta < \pi{}/2$ since the unit square is in the first quadrant?
My hunch for $r$ is that it varies within $1 \leq r \leq \sqrt{2}$
So we have $\int_{1}^{\sqrt{2}}\int_{0}^{\arcsin(1/r)}r\cos{(\theta)}d\theta{}dr=\int_{1}^{\sqrt{2}}1dr=\sqrt{2}-1$
My book gives 
$2 (\ln(\sqrt{2} + 1) + \sqrt{2} − 1)$
Any advice on how to visualize this is much appreciated. 
 A: $$\int_{0}^{\pi /4}\int_{0}^{csc\theta }r\cos\theta drd\theta +\int_{\pi /4}^{\pi /2}\int_{0}^{sec\theta }r\cos\theta drd\theta$$
A: If you divide the square along its diagonal and use $x=1\implies r=\sec\theta$ and $y=1\implies r=\csc\theta$, 
you get $\displaystyle\int_0^{\frac{\pi}{4}}\int_0^{\sec\theta}r\cos\theta dr d\theta+\int_{\frac{\pi}{4}}^{\frac{\pi}{2}}\int_0^{\csc\theta}r\cos\theta dr d\theta$
$\hspace{.3 in}=\displaystyle\int_0^{\frac{\pi}{4}}\frac{1}{2}\sec\theta d\theta+\int_{\frac{\pi}{4}}^{\frac{\pi}{2}}\frac{1}{2}\cot\theta\csc\theta d\theta$
$\hspace{.3 in}=\frac{1}{2}\big[\ln(\sec\theta+\tan\theta)\big]_0^{\pi/4}+\frac{1}{2}\big[-\csc\theta\big]_{\pi/4}^{\pi/2}$
A: It is much easier to work out the integral directly than move to polar coordinates. We have
$$\int_0^1 \dfrac{xdx}{\sqrt{x^2+y^2}} = \dfrac12 \int_0^1 \dfrac{dt}{\sqrt{t+y^2}} = \sqrt{1+y^2}-y$$
Hence,
\begin{align}
\int_0^1 \int_0^1 \dfrac{xdx}{\sqrt{x^2+y^2}} dy & = \int_0^1 \sqrt{1+y^2}dy - \int_0^1 y dy = \int_0^{\sinh^{-1}(1)} \cosh^2(t)dt - \dfrac12\\
& = \dfrac{\sqrt2 + \sinh^{-1}(1) - 1}2
\end{align}
