Solution (source code)

= Solution

Apply the <cosine> double-angle identity twice:
$$
\cos^4x=\left(\frac{1+\cos2x}{2}\right)^2
=\frac38+\frac12\cos2x+\frac18\cos4x.
$$
This finite trigonometric sum is already the <Fourier series>. In increasing harmonic order, including the constant term, the first two nonzero terms are
$$
\boxed{\frac38+\frac12\cos2x}.
$$