show that f(x) is injective.
$f(x)= \frac{x^2}{1+x^2}$
if $f(x)=f(y)$ then $\frac{x^2}{1+x^2}=\frac{y^2}{1+y^2}$
$(x^2)(1+y^2)=(y^2)(1+x^2)$
$x^2+x^2y^2=y^2+x^2y^2$
$x^2 = y^2$
$x = y$
but $f(1)=f(-1)$ due to the square roots. Where did I go wrong in the original proof?
If $x^2=y^2$ then $x=y$ or $x=-y$.
You suppose only $x=y$.
There is the mistake.