# Problem 3.3-9b, make a 4-frame filmstrip. u:=(M,x,t)-> sum((8/Pi^3)/(2*m+1)^3*sin(2*m*Pi*x+Pi*x)*cos(2*m*Pi*t+Pi*t),m=0..M) +(1/Pi)*sin(Pi*x)*sin(Pi*t); f:=x->x*(1-x); # Test x(1-x) against u(x,t), one term of the series plot({f(x),u(1,x,0)},x=0..1,color=[red,black]); # The filmstrip is made from the four plots below, printed # onto one page, 4 plots per page. Try scissors and tape, its easier. # Simple animation for four plots N:=3: p[1]:=plot(u(N,x,0),x=0..1,color=red): p[2]:=plot(u(N,x,1),x=0..1,color=red): p[3]:=plot(u(N,x,2),x=0..1,color=red): p[4]:=plot(u(N,x,3),x=0..1,color=red): plots[display]([p[1],p[2],p[3],p[4]],insequence=true); # Richer animation with 40 plots N:=3:h:=0.1: for i from 0 to 39 do p[i+1]:=plot(u(N,x,h*i),x=0..1,color=red):end do: plots[display]([seq(p[i],i=1..40)],insequence=true);