$$ g:[-1,1] \to \mathbb R\\ g(x)={\frac{x}{x+2}} $$
$f:[-1,1] \to$ range of f. Find the inverse of $ f.$
$\forall y\in \text{range of }g$ there exist some ${\frac{2y}{1-y}}\in [-1,1]$ such that $g({\frac{2y}{1-y}})=y$
I'm getting problem that when I am replacing $x$ by ${\frac{2y}{1-y}}$ I'm not getting $y$.
Kindly help me out.
You have $$g\left(\frac{2y}{1-y}\right)=\frac{\frac{2y}{1-y}}{\frac{2y}{1-y}+2}=\frac{\frac{2y}{1-y}}{\frac{2y+2(1-y)}{1-y}}=\frac{2y}{2y+2(1-y)}=\frac{2y}{2}=y.$$