<s>[INST] Find the real factors of $X^{2n}-1$ Find the real factors of $x^{2n}-1$
I have tried to solve this way
let $x^{2n}=1=e^{2kπi}$
$$x=e^{\pm kπi/n}=a+ib, \text{ for } k=0,1,2,\ldots,(n-1)$$
From $x^{2n}=1,$ $-1$ and $1$ are roots, hence $(x+1)$ and $(x-1)$ are factors, other factors are given as product of conjugate factors
$$\Rightarrow \prod_{k=1}^{(n-1)}(x-(a+ib))(x-(a-ib))=\prod_{k=1}^{(n-1)}(x^2-2ax+a^2+b^2)$$
$$\therefore(x^{2n}-1)=((x+1)(x-1)\prod_{k=1}^{(n-1)}(x^2-2xa+a^2+b^2))$$
Then,according to my solution the factors are;
$$(x-1)(x+1)(x^2-2x\cos\frac{π}{n}+1)\cdots(x^2-2x\cos\frac{π(n-1)}{n}+1)$$
But the text book answer is
$$(x-1)(x+1)(x^2-2x\cos\frac{π}{n}+1)\cdots (x^2-2x\cos\frac{π(n-1)}{n}-1)$$
Please correct me wherever I have went wrong,your contribution is highly appreciated
 [/INST] We can use the fact that $A^2-B^2=(A+B)(A-B)$, so:
$$x^{2n}-1=(x^n+1)(x^n-1)$$
We can factor this in $C$, using DeMoivre's law. In fact we want to find the roots of $1$ and $-1$. So, let:
$$z=r(\cos(\theta)+i\sin(\theta))$$
then we have:
$$z^n=1\leftrightarrow r^n(\cos(n\theta)+i\sin(n\theta))=1(\cos(0)+i\sin(0))$$
Clearly, $r=1$ and so:
$$\theta_k=\frac{2k\pi}{n}$$
Also, we have:
$$z^n=-1 \leftrightarrow r^n(\cos(n\theta)+i\sin(n\theta))=1(\cos(\pi)+i\sin(\pi))$$
And from here:
$$\theta_k=\frac{\pi}{n}+\frac{2k\pi}{n}$$
So, we can write:
$$x^{2n}-1=(x-1)(x+1)\prod_{k=0}^{n-1}(x-z_k)(x-w_k)$$
where:
$$z_k=cos\left(\frac{\pi}{n}+\frac{2k\pi}{n}\right)+i\sin\left(\frac{\pi}{n}+\frac{2k\pi}{n}\right)$$
and:
$$w_k=\cos\left(\frac{2k\pi}{n}\right)+i\sin\left(\frac{2k\pi}{n}\right)$$
Now, in the real factorization there will be the factors with imaginary part equal to $0$. In other words when tge number $n$ can be written in the form:
$$n=\frac{2k}{j} \vee n=\frac{2k+1}{f}$$
where $f,j\in Z$.

In your answer the error is contained in the productory, in fact you proceed in group of two factor, so the productory must be rewritten in the form:
$$\prod_{k=1}^{n}$$
and then not considering the terms $(x-1)(x+1)$ because they are contained in the product itself. So, the answer given by your book is wrong.
</s>