Advanced Applied Mathematics
Develop understanding of how many terms of a Fourier series are required in order to well approximate 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.
- 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.
- 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. - 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.)
1 This is a modified version of the copyrighted Projects IV and V by R. Jerrard and R. Laugesen Β©2002, The Triode
([email protected]). A copy of the license is available at http://www.fsf.org/copyleft/fdl.html
2
- Now go back to the Function menu and again select Enter Function. Change the function to
sin(π₯), and enter new numbers for the left and right ends of the period interval, perhaps 1 and - These numbers define one period of the function, and then IODE extends the function
periodically.
Look at the upper graph, showing the graph of the function. Is it different from the usual sine
curve? Why does the graph now have a jump? - Click on Plot coefficients A_n and B_n in the middle of the window. This plots the π΄π and π΅π
Fourier coefficients versus π, for π > 0. (The π = 0 coefficient π΄0 is a special case, and is not
graphed.) Do you observe some patterns in the coefficients? Patterns are usually clear when top
harmonic is 25, but you may want to go up to 50.
By the way, IODE evaluates the Fourier coefficients approximately, by doing the integrals
numerically with the trapezoidal rule (which you might have learned in calculus). - Finally, remember that you can always change the name of the variable π‘ using Relabel variables
in the Function menu.