Factorize completely $x^8-2x^4\cos (4\theta)+1$ using complex numbers and $n$-th root of unity.
The answer given is $$\prod_{r=0}^3 \left(x^2-2x\cos\left(\theta+\frac{r\pi}{2}\right)+1\right)\,.$$ Can anyone please help . I just want to know how to tackle this . I just want the conceptual trick to solve such sum.
$$ \begin{aligned} x^8-2x^4\cos4\theta+1 &=x^8-x^4(e^{4i\theta}+e^{-4i\theta})+1 \\ &=(x^4-e^{4i\theta})(x^4-e^{-4i\theta}) \\ &=(x^2+e^{2i\theta})(x^2-e^{2i\theta})(x^2+e^{-2i\theta})(x-e^{-2i\theta}) \\ &=(x+ie^{i\theta})(x-ie^{i\theta})(x+e^{i\theta})(x-e^{i\theta}) \\ &\cdot(x+ie^{-i\theta})(x-ie^{-i\theta})(x+e^{-i\theta})(x-e^{-i\theta}) \\ &=\prod_{r=0}^3(x-i^re^{i\theta})(x-i^{-r}e^{-i\theta})\quad{(*)} \\ &=\prod_{r=0}^3[x^2-x(i^re^{i\theta}+i^{-r}e^{-i\theta})+1] \\ \end{aligned} $$
in which the asterisk step follows from interchanging each linear factor.
Now, using the fact that for every integer $i^r=e^{\pi ir/2}$ for all integer $r$, we obtain
$$ \begin{aligned} x^8-2x^4\cos4\theta+1 &=\prod_{r=0}^3\left[x^2-2x\left(e^{i\theta+i\pi r/2}+e^{-(i\theta+i\pi r/2)}\over2\right)+1\right] \\ &=\prod_{r=0}^3\left[x^2-2x\cos\left(\theta+{\pi r\over2}\right)+1\right] \end{aligned} $$
Hope this answers your question!