Help me proof that these two functions are bijective. Let $a, b \in \mathbb{R}$. Consider $f:\mathbb{R}\rightarrow (-1;1)$ and $g: (-1;1) \rightarrow (a,b)$ given by:
$$f(x)=\frac{x}{1+\left | x \right |}$$ and $$g(y)=\frac{(b-a)y+a+b}{2}$$
I have no problem proving that function g is injective. But I'm having some trouble proving that $f$ is injective and both are surjective. Can someone help me with this question?
 A: Observe that $h_1:(-1,1)\to\mathbb{R}$, $x\mapsto \frac{x}{1-|x|}$ is the (both-sided) inverse of $f$, and $h_2:(a,b)\to(-1,1)$, $x\mapsto \frac{2x-(a+b)}{b-a}$ is the (both-sided) inverse of $g$. Hence, both $f$ and $g$ are bijective. How to find these inverse functions: try to solve these as functions of their arguments.
A: Go back to the definition: a map $f\colon X\to Y$ is bijective if $\forall y\in Y, \exists!x\in X\mid y=f(x)$. Now deploy to your case: is it true that for every $y\in (-1,1)$ there is one and only one $x\in \Bbb R$ such that $y=\frac{x}{1+|x|}$? Let's see:

*

*if $y\in[0,1)$, then a necessary condition for $y=\frac{x}{1+|x|}$ to have a solution in $\Bbb R$ is that $x\ge 0$, which makes your equation to boil down into $y=\frac{x}{1+x}$, and this latter has unique solution $x=\frac{y}{1-y}\in \Bbb R$;


*if $y\in (-1,0)$, then a necessary condition for $y=\frac{x}{1+|x|}$ to have a solution in $\Bbb R$ is that $x<0$, which makes your equation to boil down into $y=\frac{x}{1-x}$, and this latter has unique solution $x=\frac{y}{1+y}\in \Bbb R$.
A: $f$ is injective.
If $\frac x{1+|x|} = \frac y{1+|y|}=0$ then $x=y = 0$.
If $\frac x{1+|x|} = \frac y{1+|y|} < 0$ then because $1+|x|$ and $1+|y|$ are positive then $x < 0$ and $y< 0$ and $\frac {x}{1-x} = \frac y{1-y}$ and $x(1-y) = y(1-x)$ so $x -xy = y-xy$ and $x = y$.
If $\frac x{1+|x|} = \frac y{1+|y|} > 0$ then $\frac x{1+x} = \frac y{1+y}$ and $x(1+y)=y(1+x)$ and so $x +xy = y + xy$ so $x=y$.
To show $f$ is surjective $k=0$ then $f(0) = 0$.  If $0< k < 1$ we cans solve for positive $x$ so that $\frac x{1+|x|} = k$ via $x = k(1+x)\implies x-kx = k\implies x=\frac k{1-x}$.  If $-1< k< 0$ we can solve  $\frac x{1+|x|} = k$ via $x = k(1-x)\implies x+kx = k\implies x=\frac k{1+x}$.
More sophisticatedly we can use the Intermediate value theory and the knowledge that $\lim_{x\to \infty} f(x) = 1$ and $\lim_{x\to -\infty} f(x) =-1$. So for any $k: -1< k < 1$ we can find $x_1, x_2$ so that $f(x_1) < k$ and $f(x_2) > k$ and therefore by IVT there is a $y$ between $x_1, x_2$ so that $f(y) = k$.  (Of course, we have to show $f(x)$ is continuous which it is as $1+|x|$ is continuous and never $0$ and $x$ is continuous.)
