<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] Your error lies in your last line, where you go from $x^3 = 1$ to $x = 1$. There are actually three solutions to $x^3 = 1$. They are as follows
$$\begin{align}
x_1 &= 1, & \text{or} \\
x_2 &= -\frac{1}{2} + \frac{\sqrt 3}{2} i, & \text{or} \\
x_3 &= -\frac{1}{2} - \frac{\sqrt 3}{2} i
\end{align}$$
Only solutions $x_2$ and $x_3$ solve the original problem, so solution $x_1$ can be omitted. Potentially introducing extraneous solutions is a risk you take when you perform a substitution like this. 
This arises from the fact that your substitution is changing the degree of your equation from degree 2 to degree 3, so an additional solution must be introduced (assuming no repeated solutions).
</s>