I am trying to understand a problem in complex numbers , the answer in the book doesn't tie up with what I am getting. The question is to solve the complex equation $z^8+1=0$ and establish a couple of trig identities based on the roots of the equation. The roots I get and the ones given in the solution are differing. Here's how I went solving the equation.
\begin{align*} z^8 &= -1 = (\cos(\pi)+i\sin(\pi)) = (\cos((2k+1)\pi)+i\sin((2k+1)\pi))\\ \Rightarrow z &= \cos((2k+1)\pi/8)+i\sin((2k+1)\pi/8) \end{align*}
where $k = 0,1,2,3,4,5,6,7$ give the eight roots.
giving these values the roots work out as \begin{align*} &\pm ((\cos(\pi/8)+i\sin(\pi/8)) , \pm ((\cos(3\pi/8)+i\sin(3\pi/8)),\\ &\pm ((\cos(5\pi/8)+i\sin(5\pi/8)), \pm ((\cos(7\pi/8)+i\sin(7\pi/8)). \end{align*} but the book's solution list out the roots as \begin{align*} &\cos(pi/8)\pm i\sin(\pi/8) ,\cos(3\pi/8)\pm i\sin(3\pi/8), \\ &\cos(5\pi/8)\pm i\sin(5\pi/8), \cos(7\pi/8)\pm i\sin(7\pi/8). \end{align*}
and proceeds to prove the following 2 identities based on the above roots.
$$\cos(\pi/8)\cos(3\pi/8)\cos(5\pi/8)\cos(7\pi/8) = 1/8$$
and $$\cos(4\theta) = 8*(\cos(\theta)-\cos(\pi/8))* (\cos(\theta)-\cos(3\pi/8))*(\cos(\theta)-\cos(5\pi/8))*(\cos(\theta)-\cos(7\pi/8)).$$
But I am stuck with roots not matching , please clarify where is the problem.
Thanks Madavan.