Page 16-39
The resulting graph is shown below for k = 5 (the number of elements in the
series is 2k+1, i.e., 11, in this case):
From the plot it is very difficult to distinguish the original function from the
Fourier series approximation. Using k = 2, or 5 terms in the series, shows not
so good a fitting:
The Fourier series can be used to generate a periodic triangular wave (or saw
tooth wave) by changing the horizontal axis range, for example, from –2 to 4.
The graph shown below uses k = 5:
Fourier series for a square wave
A square wave can be generated by using the function
<
<
<
<
<
<
=
4
3
,
0
3
1
,
1
1
0
,
0
)
(
x
if
x
if
x
if
x
g