Prove that $\mathbb{R} \approx \textbf{I} $ by showing that the function $f: \mathbb{R} \rightarrow \textbf{I}$ defined by $$f(x)=\frac {x}{1+|x|}$$ is one-to-one and onto, wherein $\mathbf{I}=[0,1]$.
I have a problem in showing that $f$ is one-to-one since, for $-\frac{1}{2} \in \mathbb{R}$, $f(-\frac{1}{2})=-\frac{1}{3}$ and $-\frac{1}{3} \notin \textbf{I}$.
Actually $f$ is a bijection from $\mathbb R$ onto $(-1,1)$, not $[0,1]$.
If $f(x)=f(y)$ then $\frac x {1+|x|} =\frac y { 1+|y|}$. Taking absolute values we get $\frac {|x|} {1+|x|} =\frac {|y|}{ 1+|y|}$. We can write this as $|x|(1+|y|)=|y|(1+|x|)$ so we get $|x|=|y|$. Now going back to the equation $\frac x {1+|x|} =\frac y { 1+|y|}$ we get $x=y$. Hence $f$ is one-to-one.
It is clear that $|f(x) | <1$ for all $x$ so the range of $f$ is contained in $(-1,1)$. To see that $f$ is surjective take any point $y \in (-1,1)$ and take $x=\frac y {1-|y|}$. Verify that $f(x)=y$.