a_k = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \cos kx \hbox{d} x