SciMS - Applied Mathematical Analysis The University of Queensland

Fourier series


The Fourier series of a real function $f$ defined on the interval $(-p,p)$ is given by

\[ f(x)=\frac{a_0}{2}+\sum_{n=1}^{\infty}\left(a_n\,\cos \left(\frac{n\, \pi}{p}x\right)+b_n\,\sin \left(\frac{n\, \pi}{p}x\right) \right), \]
where \begin{eqnarray*} a_0&=&\frac{1}{p}\int_{-p}^pf(x)\,dx\\ a_n&=&\frac{1}{p}\int_{-p}^pf(x)\,\cos \left(\frac{n\, \pi}{p}x\right)\,dx\\ b_n&=&\frac{1}{p}\int_{-p}^pf(x)\,\sin \left(\frac{n\, \pi}{p}x\right)\,dx \end{eqnarray*}

Example

Consider the function defined by $f(x)=x+\pi$ for $-\pi < x < \pi $ and $f(x)=f(x+2\pi)$ for $-\infty < x < \infty$. Its Fourier series expansion is \[ f(x)=\pi+2\sum_{n=1}^{\infty}\frac{\left(-1\right)^{n+1}}{n}\sin (n\,x). \]

Fourier series
Figure 1: Fourier series of $f$.

Simulation 1: Representation of Fourier series

The following simulation shows the partial sum of the Fourier series (up to 20 terms) for a given function $f(x)$ (defined by user).

Remark: You can observe how the partial sum converges to the given function by increasing the number of terms. Activate the box Fourier series. Use the tools Zoom In or Out, if needed.

Sorry, the simulation is not supported for small screens.


Open separate tab Download

Other examples to try:


Simulation 2: Activity

The following simulation shows the partial sum of the Fourier series (up to 20 terms) for a given function $f(x)$ (defined by user). However, the partial sum is NOT CORRECT, since the terms $a_0$, $a_1$ and $b_1$ are all zero by default in the simulation.

Calculate the Fourier series of the function and then type the CORRECT values of the coefficients $a_0$, $a_1$ and $b_1$ rounded to two decimal places.

For example, the coefficients for the default function $|x|+x$ are $a_0=1, a_1=-0.41$ and $b_1=0.64.$ Type these values in the corresponding boxes.

Sorry, the simulation is not supported for small screens.


Open separate tab Download

Worksheet exemplar

The following file contains activities and problems associated with the simulations.