Solving the cubic $x^3-x^2-2x+1 = 0$ Solving the cubic $x^3-x^2-2x+1 = 0$.
Using the Cubic Formula I get the following three solutions.
$x_1 = \frac{1}{3} - \frac{1}{3}\left(\frac{7}{2} + \frac{21}{2}i\sqrt{3} \right)^{1/3} - \frac{7}{3}\frac{1}{\left( \frac{7}{2} + \frac{21}{2}i\sqrt{3} \right)^{1/3}} \cong -1.2469796037174670610+2.10^{-20}i$
$x_2 = \frac{1}{3} + \frac{1}{6}\left( \frac{7}{2}+\frac{21}{2}i\sqrt{3} \right)^{1/3}(1+i\sqrt{3}) + \frac{7}{6}\frac{1-i\sqrt{3}}{\left( \frac{7}{2} + \frac{21}{2}i\sqrt{3} \right)^{1/3}} \cong .44504186791262880859 - 3.10^{-20}i$
$x_3 = \frac{1}{3} + \frac{1}{6}\left( \frac{7}{2}+\frac{21}{2}i\sqrt{3} \right)^{1/3}(1-i\sqrt{3}) + \frac{7}{6}\frac{1+i\sqrt{3}}{\left( \frac{7}{2} + \frac{21}{2}i\sqrt{3} \right)^{1/3}} \cong 1.8019377358048382525 + 3.10^{-20}i$
It is clear that the three solutions are all real solutions, but is there a way I can remove the complex components algebraically? My ultimate goal is to describe what the Galois group from this polynomial would like.
 A: I'm sorry, but I'm not entirely sure if there's a way make a transformation to get the appropriate trigonometric roots. However, there is another way to derive its roots using Euler's formula.

Starting with your cubic$$y=x^3-x^2-2x+1$$First, make the substitution $x=t+t^{-1}$. Expanding and collecting in $t$, we find that$$\begin{align*}\left(t+\tfrac 1t\right)^3-\left(t+\tfrac 1t\right)^2-2\left(t+\tfrac 1t\right)+1 & =\frac {t^6-t^5+t^4-t^3+t^2-t+1}{t^3}\\ & =\frac {t^7+1}{t^3(t+1)}\end{align*}$$Therefore, we have that$$t^7+1=0\implies t=e^{\tfrac {\pi i(2k+1)}7}$$Hence, the solutions are given by$$t+t^{-1}=e^{\tfrac {\pi(2k+1)}7i}+e^{-\tfrac {\pi(2k+1)}7i}=2\cos\left(\frac {2k\pi+\pi}7\right)$$for $k=0,1,2$. And it follows immediately that your three solutions are$$\begin{align*} & x_1=2\cos\left(\frac {\pi}7\right)\\ & x_2=2\cos\left(\frac {3\pi}7\right)\\ & x_3=2\cos\left(\frac {5\pi}7\right)\end{align*}$$
A: Use $$\cos\frac{2\pi}{7}+\cos\frac{4\pi}{7}+\cos\frac{6\pi}{7}=-\frac{1}{2}.$$
Finally we obtain $$x_1=-2\cos\frac{2\pi}{7},$$
$$x_2=-2\cos\frac{4\pi}{7}$$ and
$$x_3=-2\cos\frac{6\pi}{7}.$$
Because
$$\cos\frac{2\pi}{7}+\cos\frac{4\pi}{7}+\cos\frac{6\pi}{7}=\frac{2\sin\frac{\pi}{7}\cos\frac{2\pi}{7}+2\sin\frac{\pi}{7}\cos\frac{4\pi}{7}+2\sin\frac{\pi}{7}\cos\frac{6\pi}{7}}{2\sin\frac{\pi}{7}}=$$
$$=\frac{\sin\frac{3\pi}{7}-\sin\frac{\pi}{7}+\sin\frac{5\pi}{7}-\sin\frac{3\pi}{7}+\sin\frac{7\pi}{7}-\sin\frac{5\pi}{7}}{2\sin\frac{\pi}{7}}=-\frac{1}{2},$$
which says $$x_1+x_2+x_3=1.$$
Now, $$x_1x_2+x_1x_3+x_2x_3=4\left(\cos\frac{2\pi}{7}\cos\frac{4\pi}{7}+\cos\frac{2\pi}{7}\cos\frac{6\pi}{7}+cos\frac{4\pi}{7}\cos\frac{6\pi}{7}\right)=$$
$$=2\left(\cos\frac{6\pi}{7}+\cos\frac{2\pi}{7}+\cos\frac{6\pi}{7}+\cos\frac{4\pi}{7}+cos\frac{4\pi}{7}+\cos\frac{2\pi}{7}\right)=-2$$ and
$$x_1x_2x_3=-8\cos\frac{2\pi}{7}\cos\frac{4\pi}{7}\cos\frac{6\pi}{7}=-4\left(\cos\frac{6\pi}{7}+\cos\frac{2\pi}{7}\right)\cos\frac{6\pi}{7}=$$
$$=-2\left(1+\cos\frac{2\pi}{7}+\cos\frac{6\pi}{7}+\cos\frac{4\pi}{7}\right)=-2\left(1-\frac{1}{2}\right)=-1$$ and use the Viete's theorem.
