Multivariable calculus double integral to polar coordinates The task is to note down $\iint_D F(x,y)\mathrm dy\mathrm dx$ lane rows in polar coordinates. And region D is defined by $x^2 + y^2 = ax,\, a > 0 $ and $x^2 + y^2 = by,\, b > 0 $ intersection.
The answer should be:
$$\int _0^{\tan^{-1}\left(\frac{a}{b}\right)}\int _0^{b \sin (\gamma )}\rho  F(\rho \cos (\gamma ),\rho \sin (\gamma ))\,\mathrm d\rho\mathrm d\gamma +\int _{\tan^{-1}\left(\frac{a}{b}\right)}^{\frac{\pi }{2}}\int _0^{a \cos (\gamma )}\rho  F(\rho \cos (\gamma ),\rho  \sin (\gamma ))\,\mathrm d\rho\mathrm d\gamma$$
Now I can solve everything else, but: radius upper bound. I know there was a simple solution, but can't seem to remember what it was. 
 A: $x^2+y^2 = ax$ is equivalent to $(x-\frac{a}{2})^2 + y^2 = \frac{a^2}{4}$ and $x^2+y^2 = by$ is equivalent to $x^2 + (y-\frac{b}{2})^2 = \frac{b^{2}}{4}$. So you have a circle centered at $(\frac{a}{2},0)$ with radius $\frac{a}{2}$ intersecting a circle centered at $(0,\frac{b}{2})$ with radius $\frac{b}{2}$. 
In polar coordinates, the first circle has the equation $r=a\cos\gamma$, while the second circle has equation $r = b\sin\gamma$. If you draw a picture you'll see that for the angles between $\gamma=0$ and the angle given by the point of intersection (which is $\arctan(a/b)$) the boundary lies in the second circle, so the values of $r$ range between $0$ and $b\sin\gamma$. For the second half of the region, which occurs between $\gamma=\arctan(a/b)$ and $\gamma=\pi/2$, the region is bounded by the first circle, so the radius ranges between $0$ and $r=a\cos\gamma$.
As to how to figure out that $r=a\cos\gamma$ gives the circle with radius $\frac{a}{2}$ centered at $(\frac{a}{2},0)$, multiplying through by $r$ you get $r^2=ar\cos\gamma$, and substituting $r^2=x^2+y^2$ and $x=r\cos\gamma$ gives you the equation; likewise, from $x^2+y^2=by$ you get $r^2 = br\sin\gamma$, hence $r=b\sin\gamma$. 
