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
, 0
if
⎧
⎪
g
(
x
)
, 1
if
⎨
⎪
, 0
if
⎩
0
x
1
1
x
3
3
x
4
Page 16-38