<s>[INST] What is the correct way to solve the equation: $x^4-x^3+x^2-x+1=0$ Given the equation: $x^4-x^3+x^2-x+1=0$ we need to find both its real and complex roots. What is the easiest and correct method for solving the equation?
Here is my approach, but it gives wrong result on the end. Since the equation is symmetric we can group the terms.
$$x^4+1 - (x^3+x)+x^2=0 \text{ Divide everything by } x^2 \\(x^2+\frac{1}{x^2})-(x+\frac{1}{x})+1=0\\ \text{ Let } t = x + \frac{1}{x}, \text{ we can see that } x^2 + \frac{1}{x^2}  = t^2 - 2 \\ \text{back in our equation: } t^2 - 2 - t + 1 = 0 \\ t_{12} = \frac{1 \pm \sqrt{5}}{2} \\ \text{however if we go back in } x+\frac{1}{x} = t_{12} \text{ we don't get the correct result }$$.
As given in the textbook the solutions are: $x_{12}=\frac{1+\sqrt5 \pm \sqrt{10-2\sqrt5}}{4}, x_{34}=\frac{1-\sqrt5 \pm \sqrt{10-2\sqrt5}}{4}$ Can someone say if those are the correct solutions or not?
 [/INST] The solutions in your textbook are wrong; you can plug them in to verify this yourself.
The easiest way to solve is to note that if $x\neq-1$ then
$$\frac{x^5+1}{x+1}=x^4-x^3+x^2-x+1,$$
and so writing $x=re^{\theta i}$ quickly yields $r=1$ and $\theta=\tfrac k5\pi$ with $k$ odd.
Your approach is also fine; you get the same solutions by solving the two quadratics
$$x+\frac1x=\frac12\pm\frac{\sqrt{5}}{2}.$$
</s>