Half-Range Fourier Cosine Series/Cosine of Non-Integer Multiple of x over 0 to Pi

Theorem
Let $\lambda \in \R \setminus \Z$ be a real number which is not an integer.

Let $\map f x$ be the real function defined on $\openint 0 \pi$ as:


 * $\map f x = \cos \lambda x$

Then its Fourier series can be expressed as:


 * $\displaystyle \map f x \sim \frac {2 \lambda \sin \lambda \pi} \pi \paren {\frac 1 {2 \lambda^2} + \sum_{n \mathop = 1}^\infty \paren {-1}^n \frac {\cos n x} {\lambda^2 - n^2} }$

Proof
By definition of half-range Fourier cosine series:


 * $\displaystyle \map f x \sim \frac {a_0} 2 + \sum_{n \mathop = 1}^\infty a_n \cos n x$

where for all $n \in \Z_{> 0}$:
 * $a_n = \displaystyle \frac 2 \pi \int_0^\pi \map f x \cos n x \rd x$

Thus by definition of $f$:

Because $\lambda \notin \Z$ we have that $\lambda \ne n$ for all $n$.

Thus for $n > 0$:

Finally: