Fake proof that $1$ is the solution of $x^2+x+1=0$

Is it that all the solutions must fulfill this equation, but it is not a sufficient condition to actually be a solution?

Yes, exactly right. Substituting one equation in another has the potential to introduce more solutions, because you've thrown away information. Specifically, you threw away the original equations you were given. A solution to the original equation will be a solution to your new one, but the new one may have others.

For a silly example, consider $$ x + x = x + 4. $$ There is only one solution to the equation: $x = 4$. But suppose we substitute $x = 4$ on the left side for one of the $x$'s; then we get $x + 4 = x + 4$, or $4 = 4$, which has infinitely many solutions (every real number $x$).

In your example, you ended up with the equation $−x^2+\frac{1}{x}=0$, which is equivalent to the equation $-x^3 + 1 = 0$ (assuming $x \ne 0$), or $x^3 - 1 = 0$. This factors as $x^3 - 1 = (x - 1)(x^2 + x + 1)$ (as was pointed out in a comment), so you have introduced exactly 1 new solution.


Is it that all the solutions must fulfill this equation, but it is not a sufficient condition to actually be a solution?

Yes. One important fact about mathematics is that when we manipulate an equation (or proposition, or ...), we can lose information along the way. E.g. from $$x^2=4$$ we can deduce $$0\cdot x^2=0\cdot 4,$$ and from that deduce $$0\cdot x^2=0.$$ $x=17$ is certainly a solution to this new equation, but not the original equation. Basically, we haven't done anything wrong - if $x^2=4$ then $0\cdot x^2=0$ - but we also haven't gotten an equivalent statement.

As a slightly less trivial example, from $$-y=4$$ we can deduce $$\vert -y\vert=\vert 4\vert,$$ or equivalently $$\vert y\vert=4;$$ $y=4$ satisfies this new equation, but not the original one. Again, we haven't made any mistakes, but we've lost information: the new equation $\vert y\vert=4$ tells us less than the old equation $-y=4$.


The equation you have ended up with is not the same as the original. In fact, multiplying each side by $-x$, you get:

$$ x^3 - 1 = 0 $$

And it is clear that $1$ is a solution of this equation. The way you ended up with this fact is that, as Lord Shark pointed out, we can factor $x^3 - 1 = (x-1)(x^2+x+1)$, and you essentially showed that:

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

Which is pretty clear when you restate it like that.


You cheated yourself in a very interesting way! This is really illuminating!

When we solve equations, we usually just open a new line and write down some consequence of the condition. For example:

$$2x-3=2$$ $$2x=5$$ $$x=5/2$$

And then we make a note that the solution is $5/2$, without really thinking about what was happening. In fact, opening a new line and write an equation below the previous one has a very definite meaning: it is a consequence of the previous line. So usually, fake roots can sneak in, as we do not necessarily want to apply equivalent transformations, we only want to collect logical consequences of the equation. The strategy is that if we find a logical consequence that we can solve, then it simplyfies our task, as the solutions of the original equation must be among the solutions of the consequence. Throwing away extraneous roots are not so hard, after all...

Now back to your problem. You correctly deduced that if $x$ is a root, then it must also satisfy

$$E_1: x+1=-x^2$$ $$E_2: x+1+1/x=0$$

And then in particular, it also has to satisfy

$$E_3: -x^2+1/x=0$$

This is all true. But not in the other way around. Note that your original equation is equaivalent to $E_1$ which is also equivalent to $E_2$. You can also take the conjunction of two equivalent statements, to obtain an equivalent statement again. So $E_1\wedge E_2$ is also equivalent to your original condition. However, $E_3$ is just a consequence of $E_1\wedge E_2$, but from $E_3$, you cannot deduce $E_1$ or $E_2$ separately.

So long story short: not all your transformations were equivalent ones, hence extraneous roots can (and in this case did) occur.