complex factoring

How to find the real factors of $$(1+x^{2n})$$ Solution given is : $$\prod_{k=0}^{n-1} (x^{2} -2x\cos((2k+1)π/2n) +1 )$$

How to prove the solution? Please note that I tried equating the equation to 0. So I have $$x^{2n} = -1.$$ I don't know whether my approach is correct

• So, find the (complex) solutions of $x^{2n}=-1$ and pair off each with its complex conjugate. – Lord Shark the Unknown Jul 7 '18 at 10:29
• You can continue like this: $x^{2n}=-1=e^{\pi i}$. Then $x=e^{(\pi i + 2k\pi)/(2n)}$, for $k=0,1,...,2n-1$. Therefore, $x^{2n}+1=\prod_{k=0}^{2n-1}(x-e^{(\pi i + 2k\pi)/(2n)})$. Now, when you multiply the pairs of factors $(x-e^{(\pi i + 2k\pi)/(2n)})(x-e^{(\pi i + 2l\pi)/(2n)})$, where $k+l+1=2n$, you get those factors with real coefficients, because the roots $e^{(\pi i + 2k\pi)/(2n)}$ and $e^{(\pi i + 2l\pi)/(2n)}$ are conjugate complex numbers (their product is $1$ and their sum is $2$ times their real part). To get their real part use Euler's formula $e^{ir}=\cos(r)+i\sin(r)$. – user566930 Jul 7 '18 at 10:46
The roots of $x^{2n}+1$ are the roots of $-1=e^{\pi i}$, which come in pairs: $$\exp\left(\pm\frac{\pi i}{2n}\right),\exp\left(\pm\frac{3\pi i}{2n}\right),\ldots,\exp\left(\pm\frac{(2n-1)\pi i}{2n}\right).$$In each pair you have a complex number and its conjugate. So, $x^{2n}+1$ is the product of the quadratic polynomials$$\left(x-\exp\left(\frac{(2k+1)\pi i}{2n}\right)\right)\left(x-\exp\left(-\frac{(2k+1)\pi i}{2n}\right)\right),\tag1$$with $k\in\{0,1,\ldots,n-1\}$. And $(1)$ is equal to $x^2-2\cos\left(\frac{(2k+1)\pi}{2n}\right)x+1$