Page 16-38
Once again, replacing e
in
π
= (-1)
n
, results in
This result is used to define the function c(n) as follows:
DEFINE(‘c(n) = - (((-1)^n-1)/(n^2*
π
^2*(-1)^n)’)
i.e.,
Next, we define function F(X,k,c0) to calculate the Fourier series (if you
completed example 1, you already have this function stored):
DEFINE(‘F(X,k,c0) = c0+
Σ
(n=1,k,c(n)*EXP(2*i*
π
*n*X/T)+
c(-n)*EXP(-(2*i*
π
*n*X/T))’),
To compare the original function and the Fourier series we can produce the
simultaneous plot of both functions. The details are similar to those of
example 1, except that here we use a horizontal range of 0 to 2 and a
vertical range from 0 to 1, and adjust the equations to plot as shown here: