Function that is bijective from $(0,1)$ to $\mathbb R$ [duplicate]

Solution 1:

$\newcommand\R{\mathbb R}$If we assume the bijection $f\colon (0,1)\to\R$ to be continuous, it follows that it has to be strictly monotonic and we may assume it is increasing so that $\lim_{x\to 0} f(x) = -\infty$ and $\lim_{x\to 1} f(x)=\infty$. Apart from $\tan$, which would be the obvious candidate with such behavior, we can use the fact that $x\mapsto \frac 1 x$ has a pole at $0$. Since we need poles at $0$ and $1$, let us try to combine $x\mapsto \frac 1 x$ and $x\mapsto\frac 1 {x-1}$. Their sum has poles at $0$ and $1$, but it is decreasing. Its negative is $$ x \quad\longmapsto\quad -\frac 1 x -\frac 1{x-1} = \frac{1-2x}{x(x-1)}. $$ You can check that this map is indeed strictly monotonic increasing (as a sum of two increasing functions) and hence a bijection $(0,1)\to\R$.

Solution 2:

Try: $$f(x)=\frac{2x-1}{x(1-x)}$$ as: $$f'(x) = \frac{2x^2-2x+1}{x^2(1-x)^2}$$ you can obtain that $f$ is indeed bijective.