# Showing that $f: \mathbb{R} \rightarrow (-1,1): x \mapsto \frac{x}{1+|x|}$ is surjective

I am having real difficulty to show that $f: \mathbb{R} \rightarrow (-1,1): x \mapsto \frac{x}{1+|x|}$ is a surjective function.

I have trouble seeing that every $y \in (-1,1)$ can be written as $\frac{x}{1+|x|}$ for some $x$. Could anyone give me a little hint?

-
Your $f$ is clearly continuous, has its image in $(-1,1)$ and $\lim\limits_{x \to \pm \infty} f(x) = \pm 1$. Now apply the intermediate value theorem. –  t.b. Sep 30 '11 at 10:51
If $y$ is positive, then $x$ has to be positive and you will have to solve $y=\frac x{1+x}$. If $y$ is negative, you have to solve $y=\frac x{1-x}$. –  Davide Giraudo Sep 30 '11 at 10:51
Thanks, thats all I needed. Strange that I didn't figure that out myself-.-. –  sxd Sep 30 '11 at 10:57

The sign of $f(x)$ is the sign of $x$. So, for $y>0$, solve $y=f(x)$ for $x>0$. For $y<0$, solve $y=f(x)$ for $x<0$.
Can you write an inverse? That is a function $g$ so that $f(g(x))=x$? Consider the function for $x>0$, $x\mapsto\frac{x}{1+x}$, and then the function for $x<0$, $x\mapsto\frac{x}{1-x}$.