Double integral - changing order of integration I am trying to change the order of integration of the following double integral $$\int _0^{2a} dx\int _{\sqrt{2ax-x^2}}^{\sqrt{4ax}} f(x,y) \ dy .$$ (a>0)
I've sketched the domain but am struggling to change it from type 1 domain to type 2 domain. Any help?

I've attached an image of the geometry of the domain and I've shaded it. (Well the image shows the case when a=1.)
 A: Let $y=\sqrt{4ax}$ ($0\le x\le 2a$) and then $x=\frac{y^2}{4a}$. Let $y=\sqrt{2ax-x^2}$ ($0\le x\le 2a$) and then
$$ x=a\pm\sqrt{a^2-y^2}. $$ 
Thus the area is divided into three parts:
(1). $\frac{y^2}{4a}\le x\le a-\sqrt{a^2-y^2}, 0\le y\le a$;
(2). $a+\sqrt{a^2-y^2}\le x\le 2a, 0\le y\le a$;
(3). $\frac{y^2}{4a}\le x\le 2a, a\le y\le 2\sqrt 2a$.
So
\begin{eqnarray}
&&\int _0^{2a} dx\int _{\sqrt{2ax-x^2}}^{\sqrt{4ax}} f(x,y) \ dy\\
&=&\int _0^{a} dy\int _{\frac{y^2}{4a}}^{a-\sqrt{a^2-y^2}} f(x,y) \ dx+\int _0^{a} dy\int^{2a}_{a+\sqrt{a^2-y^2}} f(x,y)dx+\int_a^{2\sqrt2a} dy\int^{2a}_{\frac{y^2}{4a}} f(x,y) \ dx.
\end{eqnarray}
A: I hope it can help you 

$1)\,\,\,\,\,\,\,\,\,\,\,\,\int_{y=a}^{y=\sqrt{8}a} (\int_{x=\frac{y^2}{4a}}^{x=2a}f(x,y)\, dx)\,dy$
$\color{lime}{2)}\,\,\,\,\int_{y=0}^{y=a} (\int_{x=\frac{y^2}{4a}}^{x=a-\sqrt{a^2-y^2}}f(x,y)\, dx)\,dy$
$\color{#f8f}{3)}\,\,\,\,\,\,\,\,\int_{y=0}^{y=a} (\int_{x=a+\sqrt{a^2-y^2}}^{x=2a}f(x,y)\, dx)\,dy$

$\int _0^{2a} dx\int _{\sqrt{2ax-x^2}}^{\sqrt{4ax}} f(x,y) \ dy$
$=\int_{y=a}^{y=\sqrt{8}a} (\int_{x=\frac{y^2}{4a}}^{x=2a}f(x,y)\, dx)\,dy+\int_{y=0}^{y=a} (\int_{x=\frac{y^2}{4a}}^{x=a-\sqrt{a^2-y^2}}f(x,y)\, dx)\,dy+\int_{y=0}^{y=a} (\int_{x=a+\sqrt{a^2-y^2}}^{x=2a}f(x,y)\, dx)\,dy$
A: Here is what the domain  looks like with $a=1$:

You cannot  switch the order of integration: the bounds are different when for example $y=1/2$ and $y=2$.
What is the $f(x,y)$ explicitly?
