<s>[INST] Show factorization $ x^{2n}-1=(x^2-1) \prod_{k=1}^{n-1}(x^2-2x \cos \frac{\pi k}{n} + 1) $ I'm interested in how to show that
$$
x^{2n}-1=(x^2-1) \prod_{k=1}^{n-1}(x^2-2x \cos \frac{\pi k}{n} + 1)
$$
I've seen this equality too often, but have no idea how to derive it. I've tried the following:
$$
x^{2n}-1=(x^n-1)(x^n+1)
$$
We all know that $x^n-1=(x-\xi^0)(x-\xi^1) \dots (x-\xi^{n-1})$,  where $\xi=\exp(i \cdot \frac{2 \pi}{n})$.
Here $x-\xi^0$ gives us the desired $x-1$(for $x^2-1$ in RHS).
But the problem is, we can not do the same with $x^n+1$, because as I understand, there is no such general factorization of $x^n+1$. Firstly, it depends whether $n$ is even or not. Secondly, if for the sake for simplicity $n$ is odd, then we can decompose the polynomial such a way:
$$x^n+1=(x+1)(1-x+x^2-x^3 \dots -x^{n-2}+x^{n-1})$$
I don't see here anything to continue with. Any suggestions?
 [/INST] Note
\begin{align}
x^{2n}-1
&=\prod_{k=0}^{2n-1} (x-e^{i\frac{\pi k}n})
=\prod_{k=0}^{n-1} (x-e^{i\frac{\pi k}n})\cdot 
\underset{k=2n-j}{ \prod_{k=n}^{2n-1} (x-e^{i\frac{\pi k}n})}\\
&=(x-1)\prod_{k=1}^{n-1} (x-e^{i\frac{\pi k}n})
\cdot \prod_{j=1}^{n-1} (x-e^{-i\frac{\pi j}n}) (x-e^{-i \pi})\\
 &=(x-1)(x+1)\prod_{k=1}^{n-1} (x-e^{i\frac{\pi k}n})
(x-e^{-i\frac{\pi k}n})\\
 &=(x^2-1)\prod_{k=1}^{n-1} (x^2 - 2x\cos\frac{\pi k}n+1)
\\
\end{align}
</s>