Proving a function is injective using the definition

The definition of an injective function is $f(x_1)=f(x_2) \implies x_1 = x_2$. I am having trouble understanding at what point into the proof do you give up and conclude that a function is not injective? For example the function $f(x)=3x^3-2x$

$$f(x_1)=f(x_2)$$ $$3x_1^3-2x_1 =3x_2^3-2x_2$$ $$x_1(3x_1^2-2)=x_2(3x_2^2-2)$$

I am pretty sure that I am not allowed to get rid of everything in the parentheses since this function is not injective. At what point in the proof would you say that it is unable to solve for $x_1 = x_2$ and how would you find the values that make this function not injective?

In this example, you can exhibit two $x_1,x_2$ such that $f(x_1)=f(x_2)$ but $x_1\neq x_2$.
Indeed, by your factorization, then $x_1=\sqrt{\frac{2}{3}}$ and $x_2=-\sqrt{\frac{2}{3}}$ are two roots of the polynomial, thus $f(x_1)=f(x_2)=0$ but $x_1\neq x_2$. Hence, $f$ is not injective.
• You wrote $f(x)=x(3x^2-2)$, which you can rewrite as $f(x)=3x(x^2-\frac{2}{3})=3x(x-\sqrt{\frac{2}{3}})(x+\sqrt{\frac{2}{3}})$. This implies that the polynomial $f$ has three roots: $x_1=0$, $x_2=-\sqrt{\frac{2}{3}}$, and $x_3=\sqrt{\frac{2}{3}}$. For each of these three roots, you will have $f(x_i)=0$. – Ian Apr 30 '14 at 4:16