I'm trying to come up with a function that is bijective from $(0,1)$ to $\mathbb R$. This function cannot include Trig functions. Does this function exist?

- 53,687

- 223
-
See also: Prove: Any open interval has the same cardinality of $\Bbb R$ (without using trigonometric functions) and Is there a bijective map from $(0,1)$ to $\mathbb{R}$? (Also other questions linked to the second one seem related.) – Martin Sleziak Dec 15 '21 at 09:53
7 Answers
$\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$.

- 24,912
The inverse of any continuous and increasing cumulative distribution function works.
Or simply $ x \mapsto \log((1-x)/x)$.

- 53,687

- 355
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.

- 6,038
Consider the logit function $$ f(x)=\log\left(\frac{x}{1-x}\right) $$ Evidently the map $x\to \frac{x}{1-x}$ bijects $(0,1)$ to $(0,\infty)$. The function is injective since it is increasing and surjective by considering the limits as $x\uparrow 1$ and $x\downarrow 0$ and applying the intermediate value theorem. Next the logarithm $\log $ bijects from $(0,\infty)$ to $\mathbb{R}$. It is injective since it is increasing (derivative is $1/x$) and onto by considering the limits as $x\to \infty$ and $x\downarrow 0$ and applying the IVT.

- 31,116
You don't say anything about continuity.
$\log x:$ bijects $(0,1)\to (-\infty,0)$ and so
$\log 2x:$ bijects $(0,.5) \to (-\infty, 0)$ and $-\log (2(x -.5)$ bijects $(.5,1)\to (0, \infty)$
And so $f(x) =\begin{cases}\log 2x &x < .5 \\-\log(2(x-.5) &x >.5\\ 0 & x = .5\end{cases}$
will biject $(0, 1)$ to $\mathbb R$.
If you want something continuous we can stretch $(0,1)\to (-1,1)$ via $y = 2x -1$.
Then we need to stretch $-1$ to $-\infty$ and $0$ to $0$ and $1$ to $\infty$. Now $f: x\mapsto \frac x{x+1}$ is a bijection from $[0,\infty)\to [0,1)$ so we just need to take the inverse of that as our basic idea.
$w = \frac x{x+1}$
$w(x+1) = x $
$(w-1)x = -w$
$x = \frac {-w}{w-1}$
So we can use
$g(y) =\begin{cases}\frac {-y}{y-1} & y\ge 0 \\\frac {y}{y+1} &y < 0\end{cases}$
Or $f(x) =\begin{cases}\frac {-(2x -1)}{(2x -1)-1}=\frac {\frac 12 - x}{x-1} & y\ge .5 \\\frac {2x-1}{(2x-1)+1}=1-\frac 1{2x} &y < .5\end{cases}$
as a bijection.

- 124,253
Of course there are.
$$f(x)=\begin{cases} -e^{{1 \over x}-2}-1:x \in (0,{1 \over 2}) \\ e^{{1 \over 1-x}-2}-1:x \in ({1 \over 2},1) \end{cases}$$ This is an (rather forced, I admit) example.

- 4,510
The function
$$f(x)=\frac{x}{1-x^2}$$
maps $(-1,1)$ bijectively onto $\mathbb R.$ Composing this map with the simplest map you can think of from $(0,1)$ to $(-1,1)$ will be an example. (The simplest map you can think of is $x\to 2x-1.$)

- 105,693