<s>[INST] Evaluating $(1+\cos\frac{\pi}{8})(1+\cos\frac{3\pi}{8}) (1+\cos\frac{5\pi}{8})(1+\cos\frac{7\pi}{8})$ 
How to find the value of $$\left(1+\cos\frac{\pi}{8}\right)\left(1+\cos\frac{3\pi}{8}\right) \left(1+\cos\frac{5\pi}{8}\right)\left(1+\cos\frac{7\pi}{8}\right)$$


I used: $ 1+ \cos \theta=2\sin^2(\theta/2)$ to get $$2^4 \cdot\prod_{n=0}^3 \sin\left(\frac{(2n+1)\pi}{16}\right)$$
After that I tried using the formula: 
$$\sin\left(1 \frac{\pi}n\right)\sin\left(2 \frac{\pi}n\right) \cdots \sin\left((n-1) \frac{\pi}n\right)= \frac n {2^{n-1}}$$
to find the value of the expression in the parenthesis in the first equation, but currently I'm stuck. I don't think this method will lead me to the correct answer.
Any help would be appreciated!
 [/INST] If $\cos4x=0,4x=(2n+1)\dfrac\pi2$ where $n$ is any integer
$x=(2n+1)\dfrac\pi8$ where $n\equiv0,1,2,3\pmod4$
Now $\cos4x=2\cos^22x-1=\cdots=8\cos^4x-8\cos^2x+1$
So, the roots of $8c^4-8c^2+1=0$  are $\cos(2n+1)\dfrac\pi8$ where $n\equiv0,1,2,3\pmod4$
So, the equation whose  roots are $1+\cos(2n+1)\dfrac\pi8=y\iff\cos(2n+1)\dfrac\pi8=y-1$ is
$8(y-1)^4-8(y-1)^2+1=0\iff8y^4+\cdots+1=0$
Using Vieta's formula, $$\prod_{n=0}^3\left[1+\cos(2n+1)\dfrac\pi8\right]=\dfrac18$$
</s>