showing $\mathbb{R}\sim{(0,1)}$ Using the function $f:\mathbb{R}\rightarrow\mathbb{R}$ defined by
$$f(x)=\frac{1}{2}\left(1+\frac{x}{1+|x|}\right)$$
Show that $\mathbb{R}\sim(0,1)$
I think this an exercise to show the uncountablility of both sets above, although the chapter I'm reding is on cardinality, so it cleary fits.
So I need to show a bijection. so for injection I must show that
$$f(x_1)=f(x_2)\Rightarrow{x_1}=x_2$$
So
$$\frac{1}{2}\left(1+\frac{x_1}{1+|x_1|}\right)=\frac{1}{2}\left(1+\frac{x_2}{1+|x_2|}\right)$$
$$\frac{x_1}{1+|x_1|}=\frac{x_2}{1+|x_2|}$$
$$x_1(1+|x_2|)=x_2(1+|x_1|)$$
$$x_1+x_1|x_2|=x_2+x_2|x_1|$$
So now the key is to show the equality of this last statement's second second argument, $x_1|x_2|=x_2|x_1|$.  SO I was thinking,
$$\frac{|x_2|}{x_2}=\frac{|x_1|}{x_1}\Rightarrow{x_1}|x_2|=x_2|x_1|$$
Is this valid?  I was thinking it was since 
$$\frac{|x|}{x}=
\begin{cases}
 -1,  & \text{if $x\lt0$} \\ 
  1,  & \text{if $x\gt0$} \\
  0,  & \text{if $x=0$}   \\
\end{cases}
$$
 A: You can distinguish cases. Suppose $x_1,x_2>0$. Then $$x_1+x_1x_2=x_2+x_2x_1$$  gives $x_1=x_2$. The same happens if $x_1,x_2<0$. Now supose $x_1>0,x_2<0$. Then $$x_1-x_1x_2=x_2+x_2x_1$$ $$x_1-x_2=2x_2x_1$$ 
Note that the left hand side is $>0$, and the right hand side is $<0$, so this cannot happen. Thus $x_2<0<x_1\implies f(x_1)\neq f(x_2)$. Thus, having considered all possible cases we conclude $f$ is one-one.
A: You can rewrite $f$ as
$$
f(x) = \left\{\begin{array}{ll}
\frac12 \left(1+\frac{x}{1-x}\right) = \frac12 \frac{1}{1-x} ,
& x\le0 ,
\\
\frac12 \left(1+\frac{x}{1+x}\right) = \frac12 \left(2-\frac{1}{1+x}\right) ,
& x\ge0 .
\end{array}\right.
$$
Purely elementary considerations can now be used to establish monotonicity of $f$ in both semi-infinite intervals: e.g.,
$$
x<x'<0 \Rightarrow -x>-x'>0 \Rightarrow 1-x>1-x'>1 \Rightarrow \frac{1}{1-x}<\frac{1}{1-x'}<1 \Rightarrow f(x)<f(x')<\frac12 .
$$
Similarly,
$$
0<x<x' \Rightarrow \frac12<f(x)<f(x').$$
That $f$ is strictly increasing over the entire $\mathbb{R}$ now follows form these estimates (including the upper/lower bounds).
A: This might be simpler.
Suppose that  $f(x_1)=f(x_2)$, then
$$
\frac{x_1}{1+|x_1|}=\frac{x_2}{1+|x_2|}\tag{1}
$$
Therefore, since $1+|x_1|\gt0$ and $1+|x_2|\gt0$,
$$
\mathrm{sgn}(x_1)=\mathrm{sgn}\left(\frac{x_1}{1+|x_1|}\right)=\mathrm{sgn}\left(\frac{x_2}{1+|x_2|}\right)=\mathrm{sgn}(x_2)\tag{2}
$$
Furthermore,
$$
\frac{|x_1|}{1+|x_1|}=\left|\,\frac{x_1}{1+|x_1|}\,\right|=\left|\,\frac{x_2}{1+|x_2|}\,\right|=\frac{|x_2|}{1+|x_2|}\tag{3}
$$
Thus, multiplying both sides of $(3)$ by $(1+|x_1|)(1+|x_2|)$,
$$
\begin{align}
|x_1|(1+|x_2|)&=|x_2|(1+|x_1|)\\[6pt]
|x_1|+|x_1||x_2|&=|x_2|+|x_2||x_1|\\[6pt]
|x_1|&=|x_2|\tag{4}
\end{align}
$$
$(2)$ and $(4)$ show that $x_1=x_2$, and therefore, $f$ is injective.
A: First we note that if one of $x_1,x_2$ is zero, them so must be the other one. Elsewhere, writing $|x| = x\, s(x)$  where $s(x)$ is the sign function, we have :
$x_1+x_1|x_2|=x_2+x_2|x_1| \implies x_1-x_2 = x_1 \, x_2 \, [s(x_1)-s(x_2)]$


*

*If $x_1$ and $x_2$ are both positive (or negative), then $x_1=x_2$. 

*If they have opposite signs,  the term $[s(x_1)-s(x_2)]$ must have the same sign as $x_1 - x_2$; but $x_1 x_2 < 0$, thus we have a contradiction, and this cannot happen.
Hence $x_1=x_2$
