I'm trying to change order of integration of the following double-integral: $$\int^2_1dx\int^{y=\sqrt{2x-x^2}}_{y=x-2}f(x,y)\,dy$$ I drew both curves and came to the conclusion that it's the same as writing $$\int^1_0dy\int^{x=?}_{x=y+2}f(x,y)\,dx$$where $?$ is the inverse function of $\sqrt{2x-x^2}$, which I'm not able to find.
How does one find the inverse of such function, or is there another way to do change of order here?
Let $g:[1,2]\to\mathbb{R}:x\mapsto \sqrt{2x-x^2}$. We can calculate the inverse of $g$ by inverting the equation $y=\sqrt{2x-x^2}$ as follows. Squaring both sides yield $x^2-2x+y^2=0$. This is a second degree polynomial with discriminant $4-4y^ 2$ which is greater than zero since $y\in g([1,2])=[0,1]$. Hence we have $x= 1+\sqrt{1-y^2}$ thus $g^{-1}:g([1,2])\to [1,2]: y\mapsto 1+ \sqrt{1-y^2}$.