How to express $z^8 − 1$ as the product of two linear factors and three quadratic factors 
Verify
$$(z-e^{i \theta} ) (z - e^{-i \theta} ) ≡ z^2 - 2\cos \theta + 1$$
Hence express $z^8 − 1$ as the product of two linear factors and three quadratic factors, where all
coefficients are real and expressed in a non-trigonometric form.


For the first part I just expanded  the LHS and showed its equal to RHS.
Roots of $z^8-1$:
$$z= e^{i \frac{\pi k}{4}}$$

Where $k=0,1,2,3,4,5,6,7$

Ok since they want non-Trignometric so :
I know two roots, which are obvious:
$$z=1,-1$$
$$z^8-1=(z-1)(z+1)(z^6+z^5+z^4+z^3+z^2+z+1)$$
They want two linear factors which I believe I have found: $(z+1)$ and $(z-1)$
How do I make
$$(z^6+z^5+z^4+z^3+z^2+z+1)$$
to three quadratic factors? And they mentioned Hence , so I have to use the identity I verified. Please help.

Here is a method which make use of your identity.
$$z^8-1=(z-1)(z+1)(z^2+1)(z^4+1)$$
\begin{align*}
(z^4+1)&=(z^2+i)(z^2-i)\\
&=(z^2-e^{i-\frac{\pi}{2}})(z^2-e^{i\frac{\pi}{2}})\\&=(z+e^{-i\frac{\pi}{4}})(z-e^{-i\frac{\pi}{4}})(z+e^{i\frac{\pi}{4}})(z-e^{i\frac{\pi}{4}})\\&=(z-e^{-i\frac{5\pi}{4}})(z-e^{i\frac{5\pi}{4}})(z-e^{i\frac{\pi}{4}})(z-e^{-i\frac{\pi}{4}})\end{align*}
Then use your formula, you get $$z^4+1=(z^2+\sqrt2 z+1)(z^2-\sqrt2 z+1)$$
