<s>[INST] Where is the error in this "proof" that 3=0? I saw this video (link at bottom), with a supposed "proof" that $3=0$. It goes as follows:

Let $x$ be a solution of $$x^2+x+1=0 \tag1$$

Since $x\neq0$, we can divide both sides by $x$:
$$\frac{x^2+x+1}{x}=\frac0x\implies x+1+\frac1x=0 \tag2$$

From $(1)$,
$$x^2+x+1=0\implies x+1=-x^2$$

Substitute $x+1=-x^2$ into $(2)$
$$\begin{align*}
-x^2+\frac1x&=0 \tag3\\
\frac1x&=x^2\\
1&=x^3\implies x=1 \tag4
\end{align*}$$
Substitute $x=1$ into $(1)$
$$\begin{align*}
1^2+1+1&=0\\
3&=0
\end{align*}$$

The explanation given in the video is

Substituting $x+1=-x^2$ into $(2)$ creates the extraneous solution $x=1$ which is not a solution to the original equation $(1)$, $x^2+x+1=0$.

Equations $(1)$ and $(2)$ have solutions $\frac{-1\pm i\sqrt3}{2}$, but after the substitution, equation $(3)$ has these two solutions and $1$.

Basically, it is saying that the issue is substituting $x+1=-x^2$, but I'm not sure if this is actually the problem. How can a substitution cause an issue if everything before the substitution is correct?
After reading the comments, I realised many of them say that the real issue is $(4)$, because $1=x^3$ could also mean that $x=\frac{-1\pm i\sqrt3}{2}$. Not considering these solutions is the issue with the "proof". One also needs to check these solutions before making conclusions, and "pick" whichever one is correct.
So, my question is, what is the issue with the above "proof" that $3=0$?

Video: "Prove" 3 = 0. Can You Spot The Mistake? https://www.youtube.com/watch?v=SGUZ-8u1OxM.
 [/INST] Substitution is able to cause an extraneous root because it's an irreversible step.  That is, it is clear that if $x^2 + x + 1 = 0$, then we have $x + 1 + 1/x = 0$, $x+1 = -x^2$, and by substitution,
$$
-x^2 + 1/x = 0.
$$
However, the reverse is not true: if $-x^2 + 1/x = 0$, then it does not necessarily hold that $-x^2 = x+1$, from which it would follow that $x^2 + x + 1 = 0$.
Indeed, we see that this is how the solution $x = 1$ fits in: it satisfies $-x^2 + 1/x = 0$, but not $-x^2 = x+1$.

Another perspective: the substitution can be summarized with the following multiplication:
$$
x^2 + x + 1 = 0 \implies\\
(-1 + 1/x)(x^2 + x + 1) = 0 \implies\\
-(x^2 + x + 1) + \frac 1x(x^2 + x + 1) = 0 \implies\\
-x^2 + 1/x = 0.
$$
Multiplying $x^2 + x + 1$ by another factor has given the polynomial another root.
</s>