I need to find $f^{-1} $ of $f(x)= -x|x|/(1+x^2)$
I divided function into parts x>0 and x<0.
For $ x>0 $, $f(x)= -x^2/(1+x^2)$
Replace x with y and after solving the quadratic i get $y=-\sqrt{-x/(x+1)}$ , which makes it undefined.
For $ x<0 $, $f(x)= x^2/(1+x^2)$
Replace x with y and after solving the quadratic i get $y=\sqrt{x/(-x+1)}$.
The correct answer given in my book is $y=sig(-x)\sqrt{|x|/(-|x|+1)}$.
Can anybody point out my error ?
I think you're getting confused, because $x$ and $y$ have opposite signs, and then you switched them.
For $x>0$, $y<0$, so the solution would be $x=\sqrt{-y/(y+1})$, which makes sense with the signs,
and then you could switch $x$ and $y$ to get $y=\sqrt{-x/(x+1)}$,
keeping in mind that, after the switch, $y>0$ and $x<0$;
that agrees with the answer in your book for $x<0$.