What's wrong with this proof of $3=0$ starting from $x^2+x+1=0$?

If you are assuming $x$ is a real number, then all of these steps are valid, and prove that the assumption $x^2+x+1=0$ gives a contradiction. In other words, this is just a proof that the equation $x^2+x+1=0$ has no real solutions.

If you allow $x$ to be a complex number, then $x^2+x+1=0$ does have solutions, but the step where you go from $x^3=1$ to $x=1$ is wrong: there are complex numbers besides $1$ whose cubes are $1$. (This step is valid for real numbers, since the function $x\mapsto x^3$ from $\mathbb{R}$ to $\mathbb{R}$ is strictly increasing, so it can take the value $1$ at most once.)


You start with a solution to the equation $x^2 + x + 1 = 0$ and correctly show that it is also a solution to the equation $x^3 = 1$. You then observe that the only real solution to the second equation is $1$ (this is true).

You then conclude that $x = 1$ is a solution to the first equation (this is not true, there may be no real solutions to your original equation, as is in fact the case).

Analogy: if you started with $x^2 = -1$ and squared both sides, you would get $x^4 = 1$, but you can't conclude that $x = 1$.


$x^3=1$ does not imply $x=1$. By doing "algebra" you can introduce false solutions which need to be checked.

$x^3=1 \iff (x-1)(x^2+x+1)=0$

You can see your original equation from here, with an additional solution added.