Fourier Series/1 over -1 to 0, Cosine of x over 0 to 1

From ProofWiki
Jump to: navigation, search

Theorem

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

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


Then its Fourier series can be expressed as:

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


Proof

By definition of Fourier series:

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

where:

\(\displaystyle a_n\) \(=\) \(\displaystyle \int_{-1}^1 f \left({x}\right) \cos n \pi x \, \mathrm d x\) $\quad$ $\quad$
\(\displaystyle b_n\) \(=\) \(\displaystyle \int_{-1}^1 f \left({x}\right) \sin n \pi x \, \mathrm d x\) $\quad$ $\quad$

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


Thus:

\(\displaystyle a_0\) \(=\) \(\displaystyle \int_{-1}^1 f \left({x}\right) \, \mathrm d x\) $\quad$ Cosine of Zero is One $\quad$
\(\displaystyle \) \(=\) \(\displaystyle \int_{-1}^0 1 \, \mathrm d x + \int_0^1 \cos \left({\pi x}\right) \, \mathrm d x\) $\quad$ $\quad$
\(\displaystyle \) \(=\) \(\displaystyle \bigg[{x}\bigg]_{-1}^0 + \left[{\frac {\sin \left({\pi x}\right)} \pi}\right]_0^1\) $\quad$ Primitive of Power, Primitive of $\cos \pi x$ $\quad$
\(\displaystyle \) \(=\) \(\displaystyle \left({0 - \left({-1}\right)}\right) - \left({\frac {\sin \pi} \pi - \frac {\sin 0} \pi}\right)\) $\quad$ $\quad$
\(\displaystyle \) \(=\) \(\displaystyle 1 - 0\) $\quad$ Sine of Multiple of Pi $\quad$
\(\displaystyle \) \(=\) \(\displaystyle 1\) $\quad$ $\quad$

$\Box$


For $n > 0$:

\(\displaystyle a_n\) \(=\) \(\displaystyle \int_{-1}^1 f \left({x}\right) \cos n \pi x \, \mathrm d x\) $\quad$ $\quad$
\(\displaystyle \) \(=\) \(\displaystyle \int_{-1}^0 \cos n \pi x \, \mathrm d x + \int_0^1 \cos \pi x \cos n \pi x \, \mathrm d x\) $\quad$ Definition of $f$ $\quad$


Splitting this up into bits:

\(\displaystyle \) \(\) \(\displaystyle \int_{-1}^0 \cos n \pi x \, \mathrm d x\) $\quad$ $\quad$
\(\displaystyle \) \(=\) \(\displaystyle \left[{\frac {\sin n \pi x} {n \pi} }\right]_{-1}^0\) $\quad$ Primitive of $\cos n \pi x$ $\quad$
\(\displaystyle \) \(=\) \(\displaystyle \left({\frac {\sin 0} {n \pi} }\right) - \left({\frac {\sin \left({- n \pi}\right)} {n \pi} }\right)\) $\quad$ $\quad$
\(\displaystyle \) \(=\) \(\displaystyle 0\) $\quad$ Sine of Multiple of Pi $\quad$


For $n \ne 0$, there are two cases that need to be addressed: when $n = 1$ and when $n > 1$.

First let $n > 1$.

We have:

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


Now let $n = 1$.

We have:

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


There is only one non-vanishing term:

$a_1 = \dfrac 1 2$

$\Box$


Now for the $\sin n \pi x$ terms:

\(\displaystyle b_n\) \(=\) \(\displaystyle \int_{-1}^1 f \left({x}\right) \sin n \pi x \, \mathrm d x\) $\quad$ $\quad$
\(\displaystyle \) \(=\) \(\displaystyle \int_{-1}^0 \sin n \pi x \, \mathrm d x + \int_0^1 \cos \pi x \sin n \pi x \, \mathrm d x\) $\quad$ $\quad$


Splitting this up into bits:


\(\displaystyle \) \(\) \(\displaystyle \int_{-1}^0 \sin n \pi x \, \mathrm d x\) $\quad$ $\quad$
\(\displaystyle \) \(=\) \(\displaystyle \left[{\frac {-\cos n \pi x} {n \pi} }\right]_{-1}^0\) $\quad$ Primitive of $\sin n \pi x$ $\quad$
\(\displaystyle \) \(=\) \(\displaystyle \left({\frac {-\cos 0} {n \pi} }\right) - \left({\frac {-\cos \left({-n \pi}\right) } {n \pi} }\right)\) $\quad$ $\quad$
\(\displaystyle \) \(=\) \(\displaystyle \left({-\frac 1 {n \pi} }\right) - \left({-\frac {\left({-1}\right)^n} {n \pi} }\right)\) $\quad$ Cosine of Multiple of Pi $\quad$
\(\displaystyle \) \(=\) \(\displaystyle \left({-\frac 1 {n \pi} }\right) + \left({\frac {\left({-1}\right)^n} {n \pi} }\right)\) $\quad$ $\quad$


For $0 < x < 1$, there are two cases that need to be addressed: when $n = 1$ and when $n > 1$.

First let $n > 1$.

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


Now let $n = 1$.

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


Reassembling $b_n$ from the remaining non-vanishing terms:

$b_n = \displaystyle \left({-\frac 1 {n \pi} }\right) + \left({\frac {\left({-1}\right)^n} {n \pi} }\right) + \left({\frac {-\cos \left({n - 1}\right) \pi} {2 \left({n - 1}\right) \pi} - \frac {\cos \left({n + 1}\right) \pi} {2 \left({n + 1}\right) \pi} }\right) + \frac 1 {2 \left({n - 1}\right) \pi} - \frac 1 {2 \left({n + 1}\right) \pi}$

$\Box$



Finally:

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

$\blacksquare$



Sources