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.
 A: Substituting a member of an equation into itself can introduce alien solutions.
E.g. $$x=x^2\implies x^2=x^2.$$
You can do that, provided you keep the initial equation as well.

Safe operations are:

*

*adding a term to both members;


*multiplying both members by a nonzero factor;


*applying an invertible transformation to both members.
Anything else (e.g. squaring both members) must be done with care.
A: 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.
A: Let $x\ne0$. Then
$$x+1=-x^2\\\iff\\x+1=-\frac1x$$ is true. But
$$x+1=-x^2\land x+1=-\frac1x\color{red}\iff-x^2=-\frac1x$$ is not* ! The logical consequence is only left to right.
As shown on the plot, the curves of $-x^2$ and $-\dfrac1x$ do intersect, but not with $x+1$. By equating the two above RHS, you lose information and introduce non-solutions.


*If you think of it, it would be like saying
$$a=b\implies a=c\land b=c$$ whatever $c$.
A: The problem is $x^3=1$ does not imply that $x=1$. The equation $x^3-1=0$ has three possible roots and the root $x=1$ is an additionally generated root.
