<s>[INST] Why isn't this approach in solving $x^2+x+1=0$ valid? There is this question in which the real roots of the quadratic equation have to be found: 
$x^2 + x + 1 = 0$
To approach this problem, one can see that $x \neq 0$ because:
$(0)^2 + (0) + 1 = 0$
$1 \neq 0$ 
Therefore, it is legal to divide each term by $x$: 
$x + 1 + \frac{1}{x} = 0$
$x = -1 - \frac{1}{x}$
Now, substitute $x$ into the original equation and solve:
$x^2 + (-1-\frac{1}{x}) + 1 = 0$
$x^2-\frac{1}{x} = 0$
$x^3 = 1$
$x = 1$
to get $x = 1$. Clearly this isn't the right answer. But why? Thanks. 
 [/INST] You can indeed substitute. First, though, note that $1$ is not a solution to $x  = -1 - 1/x$.  So, by making that substitution, we are excluding $x = 1$ as a solution to our equation.  In a sense, we are looking for a solution of $x^2 +x + 1 = 0$ that is also a solution to $x = -1 - 1/x$. 
Here is what we get by substituting:
$$ x^2 + x + 1 = 0$$
$$ x^2 + (-1 - 1/x) + 1 = 0$$
$$ x^2 - 1/x = 0 $$
$$ x^2 = 1/x$$
$$ x^3 = 1 $$
There are three complex solutions to that equation. We have to exclude the "false solution" $x =1$ because the substitution $x = -1 - 1/x$ already prevented $x$ from being $1$. Either of the other two complex number solutions to $x^3 = 1$ are solutions of the original equation $x^2 + x + 1$. 
This can also be seen because $x^3 -1 = (x-1)(x^2 + x + 1)$. So there are three complex solutions to $x^3 - 1 = 0$, and by removing the $x-1$ term we leave behind two complex number solutions to $x^2 + x + 1 = 0$. 
</s>