TITLE: Roots of $8x^3-4x^2-4x+1$
QUESTION [8 upvotes]: It is known that the roots of polynomial $8x^3-4x^2-4x+1$ are $\cos\frac{\pi}{7}$, $\cos\frac{3\pi}{7}$ and $\cos\frac{5\pi}{7}$.
However this is what Wolfram Alpha/Wolfram Mathematica gives:
$$x = \frac{1}{6}+\frac{7^{2/3}}{3 2^{2/3} \sqrt[3]{-1+3 i
   \sqrt{3}}}+\frac{1}{6} \sqrt[3]{\frac{7}{2} \left(-1+3 i
   \sqrt{3}\right)}$$
$$x= \frac{1}{6}-\frac{\left(\frac{7}{2}\right)^{2/3} \left(1+i
   \sqrt{3}\right)}{6 \sqrt[3]{-1+3 i \sqrt{3}}}-\frac{1}{12} \left(1-i
   \sqrt{3}\right) \sqrt[3]{\frac{7}{2} \left(-1+3 i \sqrt{3}\right)}$$
$$x= \frac{1}{6}-\frac{\left(\frac{7}{2}\right)^{2/3} \left(1-i
   \sqrt{3}\right)}{6 \sqrt[3]{-1+3 i \sqrt{3}}}-\frac{1}{12} \left(1+i
   \sqrt{3}\right) \sqrt[3]{\frac{7}{2} \left(-1+3 i \sqrt{3}\right)}$$
These must be the same roots, but is there a way to show it? Or at least a way to show that these roots given by Wolfram are real?
Can you show that 
$$\cos\frac{\pi}{7}  = \frac{1}{6}+\frac{7^{2/3}}{3 2^{2/3} \sqrt[3]{-1+3 i
   \sqrt{3}}}+\frac{1}{6} \sqrt[3]{\frac{7}{2} \left(-1+3 i
   \sqrt{3}\right)}$$

REPLY [3 votes]: First, with regard to the appearance of $i$ in the solutions, it's very well known that, when an irreducible cubic has three real roots, then any expression of those roots in terms of radicals must involve the imaginary unit $i$.  This is the so called casus irreducibilis and was perhaps the most fundamental historical motivation for the acceptance of complex numbers.
Second, with regard to using Mathematica to see that these expressions are the same, you can use the RootReduce command to put either of these into the same canonical form.  Thus, for example, the following input yields zero:
RootReduce[(1+7^(2/3)/((-1+(3*I)*Sqrt[3])/2)^(1/3)+
  ((7*(-1+(3*I)*Sqrt[3]))/2)^(1/3))/6 - Cos[Pi/7]]

This works in WolframAlpha as well.