How to factorize $X^5-1$ into irreductible factors? I have to factorize the polynomial $P(X)=X^5-1$ into irreducible factors in $\mathbb{C}$ and in $\mathbb{R}$, this factorisation happens with the $5$th roots of the unity. 
In $\mathbb{C}[X]$ we have $P(X)=\prod_{k=0}^4 (X-e^\tfrac{2ki\pi}{5})$.
In $\mathbb{R}[X]$ the solution states that by gathering all complex conjugate roots we find that $P(X)=(X-1)(X^2-2\cos(\frac{2\pi}{5})+1)(X^2-2\cos(\frac{4\pi}{5})+1)$, but I can't figure out how. Another problem I ran into was trying to figure out where the $2\cos(\frac{2\pi}{5})$ and $2\cos(\frac{4\pi}{5})$ come from so I tried these two methods:
The sum of the roots of unity is zero so we have: 
$1+e^\tfrac{2i\pi}{5}+e^\tfrac{4i\pi}{5}+e^\tfrac{6i\pi}{5}+e^\tfrac{8i\pi}{5}=0$
In the $5$th roots of unity circle P3 and P4 are images according to the x-axis the same goes to P2 and P5, therefore $e^\tfrac{6i\pi}{5}=e^\tfrac{-4i\pi}{5}$ and $e^\tfrac{8i\pi}{5}=e^\tfrac{-2i\pi}{5}$ afterwards by using Euler's formula we find $1+2\cos(\frac{2\pi}{5})+2\cos(\frac{4\pi}{5})=0$.
Another method is that $\cos(6\pi/5) = \cos(-6\pi/5) = \cos(-6\pi/5 + 2\pi) = \cos(4\pi/5)$ $\cos(8\pi/5) = \cos(-8\pi/5) = \cos(-8\pi/5 + 2\pi) = \cos(2\pi/5)$ 
therefore $1 + \cos(2\pi/5) + \cos(4\pi/5) + \cos(4\pi/5) + \cos(2\pi/5) = 0$ and we find $1+2\cos(\frac{2\pi}{5})+2\cos(\frac{4\pi}{5})=0$
I don't know if both of these methods are correct on their own and I don't know if they will help in the factorisation since I don't know how to go from there and find $P(X)=(X-1)(X^2-2\cos(\frac{2\pi}{5})+1)(X^2-2\cos(\frac{4\pi}{5})+1)$
 A: In $\mathbb C[x]$ we can write it as $$p(x)=(x-1)(x-\color{blue}{e^{2\pi i/5}})(x-\color{blue}{e^{-2\pi i/5}})(x-\color{red}{e^{4\pi i/5}})(x-\color{red}{e^{-4\pi i/5}})$$ where the blue and red are conjugate root pairs. Multiplying these conjugate root pairs together gives (i.e. multiply the second and third terms together, and then the fourth and fifth together)
$$\begin{align}p(x)&=(x-1)(x^2-(e^{2\pi i/5}+e^{-2\pi i/5})x+e^{2\pi i/5}e^{-2\pi i/5})(x^2-(e^{4\pi i/5}+e^{-4\pi i/5})x+e^{4\pi i/5}e^{-4\pi i/5}) \\&=(x-1)\left(x^2-2\cos\left(\frac{2\pi}{5}\right)x+1\right)\left(x^2-2\cos\left(\frac{4\pi}{5}\right)x+1\right) \end{align}$$
using Euler's formula for $e^{2k\pi i/5}+e^{-2k\pi i/5}=2\cos\left(\frac{2k\pi}{5}\right)$.
A: There are various ways to render separate values of $\cos(2\pi/5)$ and $\cos(4\pi/5)$ given the equation
$1+2\cos(2\pi/5)+2\cos(4\pi/5)=0$
I demonstrate one approach.  Separate out the factor of $2$ from the last two terms and apply the trigonometric sum-product relations:
$0=1+2(\cos(2\pi/5)+\cos(4\pi/5))=1+4\cos(2\pi/5)\cos(6\pi/5)$
Then $\cos(6\pi/5)=\cos(4\pi/5)$ because the arguments sum to $2\pi$.  So now we have a sum and a product for $\cos(2\pi/5)$ and $\cos(4\pi/5)$:
$(\cos(2\pi/5))+(\cos(4\pi/5))=(-1/2)$
$(\cos(2\pi/5))\cdot(\cos(4\pi/5))=(-1/4)$
By Vieta's formulas for sums and products of roots these two quantities must then he roots of a quadratic equation
$4x^2+2x-1=0$
which can be solved by the usual methods, and out pop the individual cosine values you need to complete the factorization.
Incidentally, an iterated version of this technique gives radical expressions for $\cos(2\pi/p)$ for any Fermat prime $p$.  The existence of this splitting process is what guarantees the constructibility of regular Fermat-prime sided polygons (but you might need a planet bigger than Earth to distinguish a regular $65537$-gon from a circle with standard drafting equipment).
A: A way to obtain an explicit factorisation using Chebyshev polynomials:
Using the recurrence relation:
$$P_{n+1}(t)=2tP_n(t)-P_{n-1}(t),\qquad P_0(t)=1,\;P_1(t)=t,$$
we readily obtain 
$$P_5(t)=2t\, P_4(t)-P_3(t)=16t^5-20t^3+5t,$$
so that, for $t=\cos\frac\pi{10}$, we obtain the equation
$$\cos5\Bigl(\frac{\pi}{10}\Bigr)=0=16t^5-20t^3+5t,$$
and as $\cos\frac{\pi}{10}>0$, it is a root of the biquadratic equation $\;16t^4-20t^2+5=0$. So $\cos^2\frac\pi{10}$ is a root of the quadratic equation
$$ f(u)=16u^2 -20 u+5=0. $$
To determine which root it is, we need to find a number which separates the roots $u_1$ and $u_2$. 
Now $\;\cos^2\dfrac\pi 6=\dfrac34 <\cos^2\dfrac\pi{10}$, and it happens that $
f(3/4)=-1<0$, so $u_1<\dfrac 34<u_2$, and finally the standard formulæ for the solutions of a quadratic equation yield
$$\cos^2\frac\pi{10}=u_2=\frac{5+\sqrt 5}8\quad\text{whence }\;\cos\frac\pi5=2\cos^2\frac\pi{10}-1=\frac{1+\sqrt 5}4$$
Last step, with the same duplication formula
\begin{align}
\cos\frac{2\pi}5&=2\biggl(\frac{1+\sqrt 5}4\biggr)^2-1=\frac{-1+\sqrt 5}4 \\
\cos\frac{4\pi}5&=2\biggl(\frac{-1+\sqrt 5}4\biggr)^2-1=\frac{-1-\sqrt 5}4,  
\end{align}
we obtain the factorisation:
$$X^5-1=(X-1)\Bigl(X^2+\frac{1-\sqrt 5}2 X+1\Bigr)\Bigl(X^2+\frac{1+\sqrt 5}2 X+1\Bigr).$$
