[Math] prove that $f:(0,1) \rightarrow \mathbb{R}$ such that $f(x)=\frac{2x-1}{x-x^2}$ is a bijection

functions

Let $f:(0,1)\rightarrow \mathbb{R}$ such that $f(x) = \frac{2x-1}{x-x^2}$. Prove that $f$ a bijection.

I proved that it's injective like this:

Let $x_1, x_2 \in (0,1)$ and $f(x_1)=f(x_2)$, then

$$\frac{2x_1-1}{x_1-x_1^2} = \frac{2x_2-1}{x_2-x_2^2} \implies (x_1-x_2)(2x_1x_2-x_1-x_2+1)=0$$
So $x_1=x_2$ or $(2x_1x_2-x_1-x_2+1)=0$.

The second case takes us to
$x_2 = \frac{x_1-1}{2x_1-1}$, if $x_1>0.5$ then $x_2<0$ which is a contradiction.

if $x_2<0.5$ then $1-x_1>1-2x_1$ and $x_2>1$ which is also a contradiction.

if $x_1=0.5$ then we find $0=0.5$ which is a contradiction, so the first case must be true. Which means $f$ is injective.

But how can I prove that $f$ is surjective? (I can't find an inverse function for $f$).

Best Answer

let us prove $f$ is surjective.

take $y\in\mathbb R$

we seek $x\in(0,1)$ such that

$2x-1=y(x-x^2)$

which can be written as follows

$yx^2+(2-y)x-1=0$

if $y=0$ then $x=\frac{1}{2}$

assume now $y\neq0$.

the discriminant is

$\delta=4+y^2-4y+4y=y^2+4>0$

thus $x$ exists and it is given by

$x=\frac{y-2 +\sqrt{\delta} }{ 2y }$

or

$x=\frac{y-2-\sqrt{\delta}}{2y}$

Qed.