<s>[INST] The value of $\cos^4\frac{\pi}{8} + \cos^4\frac{3\pi}{8}+\cos^4\frac{5\pi}{8}+\cos^4\frac{7\pi}{8}$ Problem : 
The value of $\cos^4\frac{\pi}{8} + \cos^4\frac{3\pi}{8}+\cos^4\frac{5\pi}{8}+\cos^4\frac{7\pi}{8}$
If this could have been like this $\cos\frac{\pi}{8} + \cos\frac{3\pi}{8}+\cos\frac{5\pi}{8}+\cos\frac{7\pi}{8}$ then we can take the terms like 
$(\cos\frac{3\pi}{8}+\cos\frac{5\pi}{8} ) + (\cos\frac{\pi}{8} +\cos\frac{7\pi}{8})$
and solve further , but in this case due to power of 4 I am unable to proceed please suggest... thanks..
 [/INST] For any $\alpha \in \mathbb{R}$, 
let $\lambda_k = \cos\left[\frac{\pi}{8}(2k-\alpha)\right]$ for $k = 1,2,\ldots,8$. All of them satisfy
$$\cos(8\cos^{-1}\lambda_k) = \cos\left[\pi(2k-\alpha)\right] = \cos\pi\alpha$$
This implies they are the 8 roots of a polynomial of degree 8:
$$T_8(x) -\cos\pi\alpha = 0 \quad\iff\quad 128x^8-256x^6+160x^4-32x^2 + (1-\cos\pi\alpha) = 0 $$
where 
$$T_8(x) = \cos(8\cos^{-1}x) =  128x^8-256x^6+160x^4-32x^2 + 1$$
is the Chebyshev polynomial of $1^{st}$ kind with degree $8$. Notice $\lambda_{4+k} = -\lambda_k$ for $k = 1,\ldots, 4$, this gives us
$$\begin{align}
\prod_{k=1}^4(x - \lambda_k^2) = \prod_{k=1}^8(\sqrt{x}-\lambda_k) 
&= \frac{1}{128}(T_8(\sqrt{x})-\cos\pi\alpha)\\ 
&= x^4 - 2 x^3+\frac54 x^2-\frac14 x + \frac{1-\cos\pi\alpha}{128}
\end{align}$$
By comparing the coefficients of $x^3$ and $x^2$, we get
$$\sum_{k=1}^4 \lambda_k^2 = 2\quad\text{ and }\quad
  \sum_{1\le k < \ell \le 4} \lambda_k^2\lambda_\ell^2 = \frac54$$
When $\alpha = 1$, $\;\displaystyle\sum_{k=1}^4 \lambda_k^4\;$ reduces to
$$\cos^4\frac{\pi}{8} + \cos^4\frac{3\pi}{8}+\cos^4\frac{5\pi}{8}+\cos^4\frac{7\pi}{8}$$
and hence the desired sum can be evaluated as
$$\sum_{k=1}^4 \lambda_k^4 = \left(\sum_{k=1}^4 \lambda_k^2 \right)^2 - 2 \left(\sum_{1\le k < \ell \le 4} \lambda_k^2\lambda_\ell^2\right) = 2^2 - 2\cdot\frac54 = \frac32$$
</s>