Fourier Series

Let \(f\) be a piecewise continuous function on the interval \([-T,T]\).  The Fourier Series of \(f\) is the trigonometric series

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

where the \(a_n\)'s and \(b_n\)'s are given by the formulas

\[a_n=\frac{1}{T}\int_{-T}^Tf(x)\cos\left(\frac{n\pi x}{T}\right)dx\; , \; n=0,1,2,...\]

\[b_n=\frac{1}{T}\int_{-T}^Tf(x)\sin\left(\frac{n\pi x}{T}\right)dx\; , \; n=1,2,3,...\]

For example, let \(f(x)\) be defined by

\[f(x)=\begin{cases} 0 & , -\pi < x < 0 \\ 1 & , 0 < x < \pi \end{cases}\]

If we let \(f(x)\) be periodic with period \(2\pi\), it is referred to as a square wave.

Find \(a_0\) first, \(\displaystyle a_0=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)dx=\frac{1}{\pi}\int_{0}^{\pi}1dx=1\)

Now find the \(a_n\)'s

\[a_n=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\cos(nx)dx=\frac{1}{\pi}\int_{0}^{\pi}\cos(nx)dx=\frac{1}{\pi n}\Big[\sin(nx)\Big]_{0}^{\pi}=0\]

And now for the \(b_n\)'s

\[b_n=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\sin(nx)dx=\frac{1}{\pi}\int_{0}^{\pi}\sin(nx)dx=\frac{-1}{\pi n}\Big[\cos(nx)\Big]_{0}^{\pi}=\frac{-1}{\pi n}\Big(\cos(\pi n)-1\Big)=\frac{-1}{\pi n}\Big((-1)^n-1\Big)\]

\[b_n=\begin{cases} \frac{2}{\pi n} & , n \; \textrm{is odd} \\ 0 & , n \; \textrm{is even} \end{cases}\]

Alternatively, \(b_{2n-1}=\frac{2}{(2n-1)\pi}\), while \(b_{2n}=0\)

so,

\[ f(x)\sim \frac{1}{2}+\frac{2}{\pi}\sum_{n=1}^\infty \frac{1}{2n-1}\sin((2n-1)x)\]

Here are the first ten terms:

Leave a Response

You must be logged in to post a comment.