# Fourier 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 $f \left({x}\right)$ be the real function defined on $\left({0 \,.\,.\, \pi}\right)$ as:

$f \left({x}\right) = \cos \lambda x$

Then its Fourier series can be expressed as:

$\displaystyle f \left({x}\right) \sim \frac {2 \lambda \sin \lambda \pi} \pi \left({\frac 1 {2 \lambda^2} + \sum_{n \mathop = 1}^\infty \left({-1}\right)^n \frac {\cos n x} {\lambda^2 - n^2} }\right)$

## Proof

By definition of half-range Fourier cosine series:

$\displaystyle f \left({x}\right) \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 f \left({x}\right) \cos n x \rd x$

Thus by definition of $f$:

 $\displaystyle a_0$ $=$ $\displaystyle \frac 2 \pi \int_0^\pi f \left({x}\right) \rd x$ Cosine of Zero is One $\displaystyle$ $=$ $\displaystyle \frac 2 \pi \int_0^\pi \cos \lambda x \rd x$ Definition of $f$ $\displaystyle$ $=$ $\displaystyle \frac 2 \pi \left[{\frac {\sin \lambda x} \lambda}\right]_0^\pi$ Primitive of $\cos a x$ $\displaystyle$ $=$ $\displaystyle \frac 2 \pi \left({\frac {\sin \lambda \pi} \lambda - \frac {\sin 0} \lambda}\right)$ $\displaystyle$ $=$ $\displaystyle \frac {2 \sin \lambda \pi} {\pi \lambda}$ Sine of Zero is Zero

$\Box$

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

Thus for $n > 0$:

 $\displaystyle a_n$ $=$ $\displaystyle \frac 2 \pi \int_0^\pi f \left({x}\right) \cos n x \rd x$ $\displaystyle$ $=$ $\displaystyle \frac 2 \pi \int_0^\pi \cos \lambda x \cos n x \rd x$ Definition of $f$ $\displaystyle$ $=$ $\displaystyle \frac 2 \pi \left[{\frac {\sin \left({\lambda - n}\right) x} {2 \left({\lambda - n}\right)} + \frac {\sin \left({\lambda + n}\right) x} {2 \left({\lambda + n}\right)} }\right]_0^\pi$ Primitive of $\cos \lambda x \cos n x$ $\displaystyle$ $=$ $\displaystyle \frac 2 \pi \left({\left({\frac {\sin \left({\lambda - n}\right) \pi} {2 \left({\lambda - n}\right)} + \frac {\sin \left({\lambda + n}\right) \pi} {2 \left({\lambda + n}\right)} }\right) - \left({\frac {\sin 0} {2 \left({\lambda - n}\right)} + \frac {\sin 0} {2 \left({\lambda + n}\right)} }\right)}\right)$ $\displaystyle$ $=$ $\displaystyle \frac 1 \pi \left({\frac {\sin \left({\lambda - n}\right) \pi} {\lambda - n} + \frac {\sin \left({\lambda + n}\right) \pi} {\lambda + n} }\right)$ Sine of Multiple of Pi and simplification $\displaystyle$ $=$ $\displaystyle \frac 1 \pi \left({\frac {\sin \lambda \pi \cos n \pi - \cos \lambda \pi \sin n \pi} {\lambda - n} + \frac {\sin \lambda \pi \cos n \pi + \cos \lambda \pi \sin n \pi} {\lambda + n} }\right)$ Sine of Sum $\displaystyle$ $=$ $\displaystyle \frac {\sin \lambda \pi \cos n \pi} \pi \left({\frac 1 {\lambda - n} + \frac 1 {\lambda + n} }\right)$ Sine of Multiple of Pi and simplification $\displaystyle$ $=$ $\displaystyle \frac {\left({-1}\right)^n \sin \lambda \pi} \pi \frac {\lambda + n + \lambda - n} {\left({\lambda - n}\right) \left({\lambda + n}\right)}$ Cosine of Multiple of Pi and manipulation $\displaystyle$ $=$ $\displaystyle \left({-1}\right)^n \frac {2 \sin \lambda \pi} \pi \frac \lambda {\lambda^2 - n^2}$ Difference of Two Squares

$\Box$

Finally:

 $\displaystyle f \left({x}\right)$ $\sim$ $\displaystyle \frac {a_0} 2 + \sum_{n \mathop = 1}^\infty a_n \cos n x$ $\displaystyle$ $=$ $\displaystyle \frac 1 2 \frac {2 \sin \lambda \pi} {\pi \lambda} + \sum_{n \mathop = 1}^\infty \left({-1}\right)^n \frac {2 \sin \lambda \pi} \pi \frac \lambda {\lambda^2 - n^2} \cos n x$ substituting for $a_0$ and $a_n$ from above $\displaystyle$ $=$ $\displaystyle \frac {2 \sin \lambda \pi} \pi \left({\frac 1 {2 \lambda} + \sum_{n \mathop = 1}^\infty \left({-1}\right)^n \frac \lambda {\lambda^2 - n^2} \cos n x}\right)$ simplifying $\displaystyle$ $=$ $\displaystyle \frac {2 \lambda \sin \lambda \pi} \pi \left({\frac 1 {2 \lambda^2} + \sum_{n \mathop = 1}^\infty \left({-1}\right)^n \frac {\cos n x} {\lambda^2 - n^2} }\right)$ further manipulation

$\blacksquare$