# 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$ $\quad$ Cosine of Zero is One $\quad$ $\displaystyle$ $=$ $\displaystyle \frac 2 \pi \int_0^\pi \cos \lambda x \rd x$ $\quad$ Definition of $f$ $\quad$ $\displaystyle$ $=$ $\displaystyle \frac 2 \pi \left[{\frac {\sin \lambda x} \lambda}\right]_0^\pi$ $\quad$ Primitive of $\cos a x$ $\quad$ $\displaystyle$ $=$ $\displaystyle \frac 2 \pi \left({\frac {\sin \lambda \pi} \lambda - \frac {\sin 0} \lambda}\right)$ $\quad$ $\quad$ $\displaystyle$ $=$ $\displaystyle \frac {2 \sin \lambda \pi} {\pi \lambda}$ $\quad$ Sine of Zero is Zero $\quad$

$\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$ $\quad$ $\quad$ $\displaystyle$ $=$ $\displaystyle \frac 2 \pi \int_0^\pi \cos \lambda x \cos n x \rd x$ $\quad$ Definition of $f$ $\quad$ $\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$ $\quad$ Primitive of $\cos \lambda x \cos n x$ $\quad$ $\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)$ $\quad$ $\quad$ $\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)$ $\quad$ Sine of Multiple of Pi and simplification $\quad$ $\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)$ $\quad$ Sine of Sum $\quad$ $\displaystyle$ $=$ $\displaystyle \frac {\sin \lambda \pi \cos n \pi} \pi \left({\frac 1 {\lambda - n} + \frac 1 {\lambda + n} }\right)$ $\quad$ Sine of Multiple of Pi and simplification $\quad$ $\displaystyle$ $=$ $\displaystyle \frac {\left({-1}\right)^n \sin \lambda \pi} \pi \frac {\lambda + n + \lambda - n} {\left({\lambda - n}\right) \left({\lambda + n}\right)}$ $\quad$ Cosine of Multiple of Pi and manipulation $\quad$ $\displaystyle$ $=$ $\displaystyle \left({-1}\right)^n \frac {2 \sin \lambda \pi} \pi \frac \lambda {\lambda^2 - n^2}$ $\quad$ Difference of Two Squares $\quad$

$\Box$

Finally:

 $\displaystyle f \left({x}\right)$ $\sim$ $\displaystyle \frac {a_0} 2 + \sum_{n \mathop = 1}^\infty a_n \cos n x$ $\quad$ $\quad$ $\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$ $\quad$ substituting for $a_0$ and $a_n$ from above $\quad$ $\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)$ $\quad$ simplifying $\quad$ $\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)$ $\quad$ further manipulation $\quad$

$\blacksquare$