Fourier Series/Half-Range Sine Series of Cosine over 0 to Pi

From ProofWiki
Jump to navigation Jump to search

Theorem

On the interval $\left({0 \,.\,.\, \pi}\right)$:

$\cos x = \displaystyle \frac 8 \pi \sum_{m \mathop = 1}^\infty \frac {m \sin \left({2 m x}\right)} {4 m^2 - 1}$


Proof

Let $f \left({x}\right)$ be the function defined as:

$\forall x \in \left({0 \,.\,.\, \pi}\right): f \left({x}\right) = \cos x$


Let $f$ be expressed by a half-range Fourier sine series:

$\displaystyle f \left({x}\right) \sim \sum_{n \mathop = 1}^\infty b_n \sin \frac {n \pi x} l$

where for all $n \in \Z_{> 0}$:

$b_n = \displaystyle \frac 2 l \int_0^l \cos x \sin \frac {n \pi x} l \, \mathrm d x$


In this context, $l = \pi$ and so this can be expressed more simply as:

$\displaystyle f \left({x}\right) \sim \sum_{n \mathop = 1}^\infty b_n \sin n x$

where for all $n \in \Z_{> 0}$:

$b_n = \displaystyle \frac 2 \pi \int_0^\pi \cos x \sin n x \, \mathrm d x$


First the case when $n = 1$:

\(\displaystyle b_1\) \(=\) \(\displaystyle \frac 2 \pi \int_0^\pi \cos x \sin x \, \mathrm d x\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 2 \pi \left[{\frac {\sin^2 x} 2}\right]_0^\pi\) Primitive of $\cos x \sin x$
\(\displaystyle \) \(=\) \(\displaystyle \frac 2 \pi \left({\frac {\sin^2 \pi} 2 - \frac {\sin^2 0} 2 }\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 2 \pi \left({0 - 0}\right)\) Sine of Multiple of Pi
\(\displaystyle \) \(=\) \(\displaystyle 0\)


When $n \ne 1$:

\(\displaystyle b_n\) \(=\) \(\displaystyle \frac 2 \pi \int_0^\pi \cos x \sin n x \, \mathrm d x\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 2 \pi \left[{\frac {-\cos \left({n - 1}\right) x} {2 \left({n - 1}\right)} - \frac {\cos \left({n + 1}\right) x} {2 \left({n + 1}\right)} }\right]_0^\pi\) Primitive of $\cos x \sin n x$
\(\displaystyle \) \(=\) \(\displaystyle \frac 2 \pi \left({\left({\frac {-\cos \left({n - 1}\right) \pi} {2 \left({n - 1}\right)} - \frac {\cos \left({n + 1}\right) \pi} {2 \left({n + 1}\right)} }\right) - \left({\frac {-\cos 0} {2 \left({n - 1}\right)} - \frac {\cos 0} {2 \left({n + 1}\right)} }\right)}\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 2 \pi \left({\left({\frac {-\cos \left({n - 1}\right) \pi} {2 \left({n - 1}\right)} - \frac {\cos \left({n + 1}\right) \pi} {2 \left({n + 1}\right)} }\right) + \frac 1 {2 \left({n - 1}\right)} + \frac 1 {2 \left({n + 1}\right)} }\right)\) Cosine of Zero is One and simplifying
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 \pi \left({\frac {1 - \cos \left({n - 1}\right) \pi} {\left({n - 1}\right)} + \frac {1 - \cos \left({n + 1}\right) \pi} {\left({n + 1}\right)} }\right)\) Further simplification


Thus for $n = 2 m$ for $m \in \Z$:

\(\displaystyle b_n\) \(=\) \(\displaystyle \frac 1 \pi \left({\frac {1 - \cos \left({2 m - 1}\right) \pi} {\left({2 m - 1}\right)} + \frac {1 - \cos \left({2 m + 1}\right) \pi} {\left({2 m + 1}\right)} }\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 \pi \left({\frac {1 - \left({- 1}\right)} {\left({2 m - 1}\right)} + \frac {1 - \left({- 1}\right)} {\left({2 m + 1}\right)} }\right)\) Cosine of Multiple of Pi
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 \pi \left({\frac 2 {\left({2 m - 1}\right)} + \frac 2 {\left({2 m + 1}\right)} }\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 \pi \left({\frac {2 \left({2 m + 1}\right) + 2 \left({2 m - 1}\right)} {\left({2 m + 1}\right) \left({2 m - 1}\right)} }\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \frac {4 m + 2 + 4 m - 2} {\pi \left({2 m + 1}\right) \left({2 m - 1}\right)}\)
\(\displaystyle \) \(=\) \(\displaystyle \frac {8 m} {\pi \left({4 m^2 - 1}\right)}\)


and for $n = 2 m + 1$ for $m \in \Z$:

\(\displaystyle b_n\) \(=\) \(\displaystyle \frac 1 \pi \left({\frac {1 - \cos \left({2 m}\right) \pi} {\left({2 m - 1}\right)} + \frac {1 - \cos \left({2 m + 2}\right) \pi} {\left({2 m + 1}\right)} }\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 \pi \left({\frac {1 - 1} {\left({2 m - 1}\right)} + \frac {1 - 1} {\left({2 m + 1}\right)} }\right)\) Cosine of Multiple of Pi
\(\displaystyle \) \(=\) \(\displaystyle 0\)


Thus we have:

\(\displaystyle b_{2 m}\) \(=\) \(\displaystyle \frac {8 m} {\pi \left({4 m^2 - 1}\right)}\)
\(\displaystyle b_{2 m + 1}\) \(=\) \(\displaystyle 0\)


and so over the given interval:

\(\displaystyle \cos x\) \(=\) \(\displaystyle \sum_{m \mathop = 1}^\infty \frac {8 m} {\pi \left({4 m^2 - 1}\right)} \sin \left({2 m x}\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 8 \pi \sum_{m \mathop = 1}^\infty \frac {m \sin \left({2 m x}\right) } {\left({4 m^2 - 1}\right)}\)

$\blacksquare$


Sources