# 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

• You need to give the domain before we can find the inverse. – Fly by Night Jul 19 '17 at 20:04
• Remember that $y$ is nonnegative. – Barry Chau Jul 19 '17 at 20:06
• Graph demonstrating it isn't bijective - desmos.com/calculator/k2syqzflzq – Shuri2060 Jul 19 '17 at 20:14

$y=\sqrt{2x-x^2}$

$y^2=2x-x^2$

$y^2-1=-1+2x-x^2$

$1-y^2=x^2-2x+1$

Becoming visible now?

$\sqrt{1-y^2}=x-1$

$x=1+\sqrt{1-y^2}$

But our INVERSE is obtained by switching $x$ and $y$ to get $\boxed{y=1+\sqrt{1-x^2}}$.

• why am i doing this in my free time – Saketh Malyala Jul 19 '17 at 20:05
• This answer isn't quite right. If $y = \sqrt{2x-x^2}$ then $y\ge 0$ and so you need to restrict the domain of your final expression. Also, you need to explain why you ignore the $\pm$ when you square root. – Fly by Night Jul 19 '17 at 20:07
• I understand the aspect of the domain commented by Fly by Night. Despite that, this is the kind of mechanical answer I was looking for. Thanks to all! – Joaquin Benitez Jul 19 '17 at 20:47
• @JoaquinBenitez the answer you choose is wrong. Flybynight's answer is perfect... :\ – Ixion Jul 19 '17 at 20:50
• @JoaquinBenitez I'm glad you found an answer you like. But please remember that without considering the domain you will often get the wrong answer! Without a domain your function does not have an inverse. With a domain we need to decide between $1-\sqrt{1-x^2}$ and $1+\sqrt{1-x^2}$. – Fly by Night Jul 19 '17 at 20:55

You need to specify the domain of your function. If you just want $2x-x^2 \ge 0$, then you'll find that your function is not one-to-one and does not have an inverse.

You could restrict the domain to $0 \le x \le 1$ and that would then give a one-to-one function. You could also choose the domain $1 \le x \le 2$ to get a one-to-one function. In fact there are many others, e.g. $\frac{1}{3} \le x \le \frac{1}{2}$.

Let's choose the domain $0 \le x \le 1$. You can see that the function is one-to-one by sketching the graph or by computing the derivative and showing that it is always non-negative. If $0 \le x \le 1$ then $0 \le \sqrt{2x-x^2} \le 1$ gives the range.

Next we use the standard trick: write $y=\sqrt{2x-x^2}$ and solve for $x$. We get $x = 1 \pm \sqrt{1-y^2}$. We chose the domain $0 \le x \le 1$ and so we know that when $x=0$, $y=0$. This tells us that we need to chose $x=1-\sqrt{1-y^2}$. The $+$ solution does not work hold at $(0,0)$.

(We would choose $x=1+\sqrt{1-y^2}$ on the domain $1 \le x \le 2$.)

Finally we conclude that is $\mathrm f(x)=\sqrt{2x-x^2}$ for all $0 \le x \le 1$ then $\mathrm f^{-1}(x) = 1-\sqrt{1-x^2}$ for all $0 \le x \le 1$.

Alternatively, if $\mathrm g(x)=\sqrt{2x-x^2}$ for all $1 \le x \le 2$ then $\mathrm g^{-1}(x) = 1+\sqrt{1-x^2}$ for all $0 \le x \le 1$.

Steps towards an inverse function:

1. Figure out what values $x$ and $y$ can have. Since $y$ is a square root, it has to be positive. The thing under the root needs to be non-negative, so… (Or perhaps a domain and codomain were already given? I have to assume some context here.)
2. Solve for $x$ from the equation you have. Start by squaring the sides. Then the quadratic formula will help.
3. See that the formula you get makes sense: $x$ and $y$ need to satisfy what you found in step 1.

$$y=\sqrt{2x-x^2}\\ x^2-2x+y^2=0\\ x=1\pm \sqrt{1-y^2}$$

• This answer is not quite right. You need to specify the domain of the function - it isn't one-to-one as written. Secondly, you need to use the choice of domain to decide on the $\pm$. – Fly by Night Jul 19 '17 at 20:23

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]$.

• Sorry, I need to improve my english... – Ixion Jul 19 '17 at 20:38