Need help calculating a simple inverse function Quick question.
$$y=\sqrt{2x-x^2}$$
I need the inverse function for some other problem, but I just can't find it.
Could you please point me the steps to solve this?
Thanks

The domain of $f(x)=\sqrt{2x-x^2}$ is $$\mbox{dom}(f)=\{x\in\mathbb{R} \ | \ 0\le x\le 2\}$$ moreover its image is $$\mbox{Im}(f)=\{y\in\mathbb{R} \ | \ 0\le y\le 1 \}$$ Its graph is a semicircumpherence with centre $C(1,0)$ and radius $r=1$ infact 
$\\ y=\sqrt{2x-x^2}\implies y^2=2x-x^2\implies \\ \\ \\  x^2+y^2-2x=0\implies \implies x^2+y^2-2x+1-1=0$ 
so graph of $f$ is a part of the circumpherence of equantion $(x-1)^2+y^2=1$ that lies in the first quadrant. This implies that $f(x)=\sqrt{2x-x^2}$ is not globally injective hence it can't be invertible on the domain.
but... consider the equation
$y=\sqrt{2x-x^2}$
square both side
$y^2=2x-x^2\implies y^2-2x+x^2=0\to (x-1)^2+y^2=1$
solve with respect of $x-1$
$(x-1)^2=1-y^2\to |x-1|=\sqrt{1-y^2}$
If $1\le x\le 2$ then $|x-1|=x-1$ so
$|x-1|=\sqrt{1-y^2}\implies x-1=\sqrt{1-y^2}\implies x=\sqrt{1-y^2}+1$
swap the variables 
$y=\sqrt{1-x^2}+1$ is the inverse of $f(x)$ for $x\in [0,1]\wedge y\in [1,2]$
If $0\le x\le 1$ then $|x-1|=1-x$ so $|x-1|=\sqrt{1-y^2}$ becomes $$1-x=\sqrt{1-y^2}\implies x=1-\sqrt{1-y^2}$$
Swap the variables $y=1-\sqrt{1-y^2}$
Hence $y=1-\sqrt{1-x^2}$ is the inverse of $f(x)$ when $x\in [0, 1]\wedge y\in [0,1]$.
