Fourier Series/Cosine of x over Minus Pi to Zero, Minus Cosine of x over Zero to Pi

From ProofWiki
Jump to: navigation, search

Theorem

Let $f \left({x}\right)$ be the real function defined on $\left({-\pi \,.\,.\, \pi}\right)$ as:

$f \left({x}\right) = \begin{cases} \cos x & : -\pi < x < 0 \\ -\cos x & : 0 < x < \pi \end{cases}$


Then its Fourier series can be expressed as:

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


Proof

It is apparent by inspection that $f \left({x}\right)$ is an odd function over $\left({-\pi \,.\,.\, \pi}\right)$.

It follows from Fourier Series for Odd Function over Symmetric Range:

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

for all $n \in \Z_{>0}$.


Thus by definition of $f$:

$\displaystyle b_n = -\frac 2 \pi \int_0^\pi \cos x \sin n x \rd x$


When $n \ne 1$, we have:

\(\displaystyle b_n\) \(=\) \(\displaystyle -\frac 2 \pi \int_0^\pi \cos x \sin n x \rd 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 \left({n - 1}\right) 0} {2 \left({n - 1}\right)} - \frac {\cos \left({n + 1}\right) 0} {2 \left({n + 1}\right)} }\right)}\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 \pi \left({\left({\frac {\cos \left({n - 1}\right) \pi} {n - 1} + \frac {\cos \left({n + 1}\right) \pi} {n + 1} }\right) - \left({\frac 1 {n - 1} + \frac 1 {n + 1} }\right)}\right)\) Cosine of Zero is One and simplifying
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 \pi \left({\frac {\cos \left({n - 1}\right) \pi} {n - 1} - \frac 1 {n - 1} + \frac {\cos \left({n + 1}\right) \pi} {n + 1} - \frac 1 {n + 1} }\right)\) simplifying


When $n = 1$, we have:

\(\displaystyle b_n\) \(=\) \(\displaystyle -\frac 2 \pi \int_0^\pi \cos x \sin x \rd 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 0\) Sine of Multiple of Pi


Hence:

\(\displaystyle f \left({x}\right)\) \(\sim\) \(\displaystyle \sum_{n \mathop = 1}^\infty b_n \sin n x\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 \pi \sum_{n \mathop = 2}^\infty \left({\frac {\cos \left({n - 1}\right) \pi} {n - 1} - \frac 1 {n - 1} + \frac {\cos \left({n + 1}\right) \pi} {n + 1} - \frac 1 {n + 1} }\right) \sin n x\) substituting for $b_n$ from above and rearranging


When $n$ is odd, we have $n = 2 r + 1$ for $r \ge 1$, and so:

\(\displaystyle \) \(\) \(\displaystyle \frac 1 \pi \sum_{r \mathop = 1}^\infty \left({\frac {\cos \left({\left({2 r + 1}\right) - 1}\right) \pi} {\left({2 r + 1}\right) - 1} - \frac 1 {\left({2 r + 1}\right) - 1} + \frac {\cos \left({\left({2 r + 1}\right) + 1}\right) \pi} {\left({2 r + 1}\right) + 1} - \frac 1 {\left({2 r + 1}\right) + 1} }\right) \sin \left({2 r + 1}\right) x\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 \pi \sum_{r \mathop = 1}^\infty \left({\frac {\cos 2 r \pi} {2 r} - \frac 1 {2 r} + \frac {\cos \left({2 r + 2}\right) \pi} {2 r + 2} - \frac 1 {2 r + 2} }\right) \sin \left({2 r + 1}\right) x\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 \pi \sum_{r \mathop = 1}^\infty \left({\frac 1 {2 r} - \frac 1 {2 r} + \frac 1 {2 r + 2} - \frac 1 {2 r + 2} }\right) \sin \left({2 r + 1}\right) x\) Cosine of Multiple of Pi
\(\displaystyle \) \(=\) \(\displaystyle 0\) everything vanishes


When $n$ is even, we have $n = 2 r$ for $r \ge 1$, and so:

\(\displaystyle \) \(\) \(\displaystyle \frac 1 \pi \sum_{r \mathop = 1}^\infty \left({\frac {\cos \left({2 r - 1}\right) \pi} {2 r - 1} - \frac 1 {2 r - 1} + \frac {\cos \left({2 r + 1}\right) \pi} {2 r + 1} - \frac 1 {2 r + 1} }\right) \sin 2 r x\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 \pi \sum_{r \mathop = 1}^\infty \left({\frac {-1} {2 r - 1} - \frac 1 {2 r - 1} + \frac {-1} {2 r + 1} - \frac 1 {2 r + 1} }\right) \sin 2 r x\) Cosine of Multiple of Pi
\(\displaystyle \) \(=\) \(\displaystyle -\frac 2 \pi \sum_{r \mathop = 1}^\infty \left({\frac 1 {2 r - 1} + \frac 1 {2 r + 1} }\right) \sin 2 r x\)
\(\displaystyle \) \(=\) \(\displaystyle -\frac 2 \pi \sum_{r \mathop = 1}^\infty \frac {\left({2 r + 1}\right) + \left({2 r - 1}\right)} {\left({2 r - 1}\right) \left({2 r + 1}\right)} \sin 2 r x\)
\(\displaystyle \) \(=\) \(\displaystyle -\frac 2 \pi \sum_{r \mathop = 1}^\infty \frac {4 r} {4 r^2 - 1} \sin 2 r x\) Difference of Two Squares and simplifying
\(\displaystyle \) \(=\) \(\displaystyle -\frac 8 \pi \sum_{r \mathop = 1}^\infty \frac {r \sin 2 r x} {4 r^2 - 1}\) simplifying

$\blacksquare$



Sources