Fourier Series/x over 0 to 2, x-2 over 2 to 4

From ProofWiki
Jump to navigation Jump to search

Theorem

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

$f \left({x}\right) = \begin{cases} x & : 0 < x \le 2 \\ x - 2 & : 2 < x < 4 \end{cases}$


Then its Fourier series can be expressed as:

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


Proof

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

$\forall x \in \left({0 \,.\,.\, 4}\right): \begin{cases} x & : 0 < x \le 2 \\ x - 2 & : 2 < x < 4 \end{cases}$


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

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

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

$a_n = \displaystyle \frac 2 l \int_0^l f \left({x}\right) \cos \frac {n \pi x} l \, \mathrm d x $


In this context, $l = 4$ and so this can be expressed as:

\(\displaystyle a_n\) \(=\) \(\displaystyle \frac 2 4 \left({\int_0^2 x \cos \frac {n \pi x} 4 \, \mathrm d x + \int_2^4 \left({x - 2}\right) \cos x \frac {n \pi x} 4 \, \mathrm d x}\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 2 \left({\int_0^2 x \cos \frac {n \pi x} 4 \, \mathrm d x + \int_2^4 \left({x - 2}\right) \cos x \frac {n \pi x} 4 \, \mathrm d x}\right)\)


First the case when $n = 0$:

\(\displaystyle a_0\) \(=\) \(\displaystyle \frac 1 2 \left({\int_0^2 x \, \mathrm d x + \int_2^4 \left({x - 2}\right) \, \mathrm d x}\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 2 \left({\left[{\frac {x^2} 2}\right]_0^2 + \left[{\frac {x^2} 2 - 2 x}\right]_2^4}\right)\) Primitive of Power
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 2 \left({\left({\frac {2^2} 2 - \frac {0^2} 2}\right) + \left({\left({\frac {4^2} 2 - 2 \times 4}\right) - \left({\frac {2^2} 2 - 2 \times 2}\right)}\right)}\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 2 \left({\left({\frac 4 2 - 0}\right) + \left({\left({\frac {16} 2 - 8}\right) - \left({\frac 4 2 - 4}\right)}\right)}\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 2 \left({2 + 0 + 2}\right)\)
\(\displaystyle \) \(=\) \(\displaystyle 2\)


When $n \ne 0$:

\(\displaystyle a_n\) \(=\) \(\displaystyle \frac 1 2 \left({\int_0^2 x \cos \frac {n \pi x} 4 \, \mathrm d x + \int_2^4 \left({x - 2}\right) \cos \frac {n \pi x} 4 \, \mathrm d x}\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 2 \left({\int_0^2 x \cos \frac {n \pi x} 4 \, \mathrm d x + \int_2^4 x \cos \frac {n \pi x} 4 \, \mathrm d x - 2 \int_2^4 \cos \frac {n \pi x} 4 \, \mathrm d x}\right)\) Linear Combination of Integrals
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 2 \int_0^4 x \cos \frac {n \pi x} 4 \, \mathrm d x - \int_2^4 \cos \frac {n \pi x} 4 \, \mathrm d x\) Sum of Integrals on Adjacent Intervals for Integrable Functions


Splitting it up into two:

\(\displaystyle \) \(\) \(\displaystyle \frac 1 2 \int_0^4 x \cos \frac {n \pi x} 4 \, \mathrm d x\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 2 \left[{\frac {16 \cos \frac {n \pi x} 4} {n^2 \pi^2} + \frac {4 x \sin \frac {n \pi x} 4} {n \pi} }\right]_0^4\) Primitive of $x \cos a x$
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 2 \left({\left({\frac {16 \cos n \pi} {n^2 \pi^2} + \frac {16 \sin n \pi} {n \pi} }\right) - \left({\frac {16 \cos 0} {n^2 \pi^2} + \frac {4 \times 0 \sin 0} {n \pi} }\right)}\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \frac {8 \cos n \pi} {n^2 \pi^2} - \frac {8 \cos 0} {n^2 \pi^2}\) Sine of Multiple of Pi and simplification
\(\displaystyle \) \(=\) \(\displaystyle \frac {8 \left({\left({-1}\right)^n - 1}\right)} {n^2 \pi^2}\) Cosine of Multiple of Pi


\(\displaystyle \) \(\) \(\displaystyle \frac 1 2 \int_2^4 \cos \frac {n \pi x} 4 \, \mathrm d x\)
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 2 \left[{\frac {4 \sin \frac {n \pi x} 4} {n \pi} }\right]_2^4\) Primitive of $\cos a x$
\(\displaystyle \) \(=\) \(\displaystyle \frac 1 2 \left({\frac {4 \sin \frac {4 n \pi} 4} {n \pi} - \frac {4 \sin \frac {2 n \pi} 4} {n \pi} }\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \frac {2 \sin n \pi} {n \pi} - \frac {2 \sin \frac {n \pi} 2} {n \pi}\)
\(\displaystyle \) \(=\) \(\displaystyle -\frac {2 \sin \frac {n \pi} 2} {n \pi}\) Sine of Multiple of Pi



Sources