Page 16-41
The simplification of the right-hand side of c(n), above, is easier done on
paper (i.e., by hand). Then, retype the expression for c(n) as shown in the
figure to the left above, to define function c(n). The Fourier series is calculated
with F(X,k,c0), as in examples 1 and 2 above, with c0 = 0.5. For example,
for k = 5, i.e., with 11 components, the approximation is shown below:
A better approximation is obtained by using k = 10, i.e.,
For k = 20, the fitting is even better, but it takes longer to produce the graph: