{VERSION 1 0 "X11/Motif" "1.0"}{GLOBALS 1 1}{FONT 0 "-adobe-helve
tica-bold-r-normal--14-*" "helvetica" "Helvetica-Bold" 8 14 0 "He
lvetica-Bold" 12}{FONT 1 "-adobe-times-medium-r-normal--14-*" "ti
mes" "Times-Roman" 4 14 64 "Times-Roman" 12}{FONT 2 "-adobe-couri
er-medium-r-normal--14-*" "courier" "Courier" 4 14 192 "Courier" 
12}{FONT 3 "-adobe-new century schoolbook-bold-r-normal--17-*" "n
ew century schoolbook" "Times-Bold" 8 17 64 "Times-Bold" 17}
{SCP_R 1 0 18{SEP_R 2 0}{COM_R 3 0{TEXT 3 40 "Fourier series conv
ergence demonstration"}}{COM_R 4 0{TEXT 1 452 "Ocie Mitchell 1993
\015\015This worksheet illustrates the convergence of the fourier
 sine series for any function that is bounded and defined on (0,1
).  You can modify the number of terms that will be calculated, a
nd then view an animation of the fourier series as terms are grad
ually added from lowest to highest frequency.   To get started, j
ust press return at all of the commands, then try picking your ow
n function f(x) and play with the number of terms."}}{SEP_R 5 0}
{INP_R 6 0 "> "{TEXT 0 12 "with(plots):"}}{INP_R 7 0 "> "{TEXT 0 
57 "af:=(t,k)->Heaviside(t-k)*(t-k)-Heaviside(t-1-k)*(t-1-k);"}}
{COM_R 8 0{TEXT 1 97 "Change the value of N to include the number
 of terms of the fourier series you want to consider. "}}{INP_R 9
 0 "> "{TEXT 0 6 "N:=20;"}}{COM_R 10 0{TEXT 1 54 "Put your favori
te function of x defined on (0,1) here:"}}{INP_R 11 0 "> "{TEXT 0
 8 "f:=x->1;"}}{INP_R 12 0 "> "{TEXT 0 16 "bf:=array(1..N);"}}
{INP_R 13 0 "> "{TEXT 0 62 "for k to N do bf[k]:=evalf(2*int(sin(
k*Pi*x)*f(x),x=0..1)) od:"}}{INP_R 14 0 "> "{TEXT 0 49 "ts:=(x,t)
->sum(af(t,n)*bf[n]*sin(n*Pi*x),n=1..N);"}}{COM_R 15 0{TEXT 1 169
 "Frames and numpoints make the animation smoother.  Frames makes
 the animation smoother in time, numpoints makes it smoother in x
.\015The following animates just the series:"}}{INP_R 16 0 "> "
{TEXT 0 56 "animate(ts(x,t),x=0..1,t=0..N,frames=3*N,numpoints=5*
N);"}}{COM_R 17 0{TEXT 1 67 "The following animates the series al
ong with the original function:"}}{INP_R 18 0 "> "{TEXT 0 63 "ani
mate(\{f(x),ts(x,t)\},x=0..1,t=0..N,frames=3*N,numpoints=5*N);"}}
{INP_R 19 0 "> "{TEXT 0 0 ""}}}{END}
