Originally Posted by
tukilala 2. from (0,1) to [0,infinite)
A bijection $\displaystyle g0,\,1)\to[0,\,1)$ is defined by
$\displaystyle g(x)\ =\ \left\{\begin{array}{cl}0 & x=\dfrac12\\[7mm]
\dfrac1{n-1} & x=\dfrac1n,\ n\in\mathbb Z,\ n\ge3\\[7mm]
x & \mbox{otherwise}
\end{array}\right.$
Define $\displaystyle F:[0,\,1)\to[0,\,\infty)$ by $\displaystyle F(0)=0$ and $\displaystyle F(x)=f(x)$ for $\displaystyle 0<x<1$ where $\displaystyle f$ is your bijection in (1). Then the required bijection for (2) is $\displaystyle F\circ g.$