TITLE: Is there a bijection between $[0, \infty)$ and $(0,1)$
QUESTION [5 upvotes]: I tried $\tan(x)$, and $\log(x)$, but seems it does not work, so I wonder is there a bijection or not?

REPLY [4 votes]: $$
f(x) = \begin{cases} \dfrac x {x+1} & \text{if } x\notin\{0,1,2,3,\ldots\}, \\[8pt]
\dfrac{x+1}{x+2} & \text{if } x\in\{0,1,2,3,\ldots\}.
\end{cases}
$$
$f : [0,\infty) \to (0,1)$ is one-to-one and onto.