Develop understanding of how many terms of a Fourier series are required in order to wellapproximate the original function. We do this by studying the decay rates of Fourier coefficients of:
functions with jumps, functions with no jumps but with corners, and functions with no jumps and no
corners
2 Instructions
Answer Question 1 as per the table provided, and Questions 2-7 on a different sheet of paper.
3 Preliminaries
Download and install IODE (https://conf.math.illinois.edu/iode/download.html). Once downloaded and
installed, launch IODE.
1. When you start the module, it plots two graphs. The upper one shows an odd 2𝜋-periodic
square wave 𝑓(𝑡). Two periods of this function are shown over a length 4𝜋. It also shows, in red,
a partial sum
𝑎0
2
+ ∑(𝑎𝑛 cos 𝑛𝑡 + 𝑏𝑛 sin 𝑛𝑡)
𝑁
𝑛=1
of the Fourier series. The final terms in this partial sum are cos(𝑁𝑡) and sin(𝑁𝑡), and so IODE
calls 𝑁 the “top harmonic”. The current value of the top harmonic is displayed in the middle of
the plotting window, and you can increase or decrease it by clicking on the arrow buttons; doing
so repeatedly creates an “animation” effect. Or, you can just enter a new top harmonic number
directly into the box. When you increase the value of the top harmonic, the partial sum should
better approximate the function.
2. Now use the Function menu to enter a new function, perhaps 𝑓(𝑡) = |𝑡| (the Matlab code for
this absolute value function is abs(x)). Try increasing and decreasing top harmonic, to see the
effect on the partial sums.
3. The lower graph in the window shows the “error” between 𝑓 and the partial sum of its Fourier
series, defined just to be the difference
𝑒𝑟𝑟𝑜𝑟(𝑡) = 𝑓(𝑡) − [
𝑎0
2
+ ∑(𝑎𝑛 cos 𝑛𝑡 + 𝑏𝑛 sin 𝑛𝑡)
𝑁
𝑛=1
]
When we make the top harmonic 𝑁 bigger, we expect the error to get smaller. Try it and see.
(Note: The vertical scale on the error plot changes, when the error gets smaller, in order to keep
the error visible.)