<s>[INST] Determine if these functions are injective 
Determine if the following functions are injective.
$$f(x) = \frac{x}{1+x^2}$$
$$g(x) = \frac{x^2}{1+x^2}$$

My answer:
$f(x) = f(y)$
$$\implies \frac{x}{1+x^2} = \frac{y}{1+y^2}$$
$$\implies x+xy^2 =y+yx^2$$
$$\implies x=y$$
Hence $f(x)$ is injective
$g(x) = g(y)$
$$\implies \frac{x^2}{1+x^2}=\frac{y^2}{1+y^2}$$
$$\implies x^2+x^2y^2=y^2+y^2x^2$$
$$\implies x^2=y^2$$
$$\implies \pm x=\pm y$$
So $g(x)$ is not injective
 [/INST] Let $x \neq 0$
$$f\left(\frac1x\right)=\frac{1/x}{1+1/x^2}=\frac{x}{1+x^2}=f(x)$$
Thus, $f$ is not injective. Your mistake was $x+xy^2=y+yx^2 \implies x=y$. This is certainly not true.
$$g(-2)=\frac{(-2)^2}{1+(-2)^2}=\frac{4}{1+4}=g(2)$$
Hence, $g$ is not injective.
</s>