{VERSION 3 0 "SUN SPARC SOLARIS" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 }1 0 0 0 8 4 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 2" 3 4 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 8 2 0 0 0 0 0 0 -1 0 }{PSTYLE "" 4 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT -1 18 " VIBRATING STRING" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 150 "Here is \+ a Maple program to animate a vibrating string with initial position gi ven by a function f defined on the interval from 0 to Pi. The constan t " }{XPPEDIT 18 0 "c;" "6#%\"cG" }{TEXT -1 20 " is assumed to be 0." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 80 "The pro cedure B calculates the kth coefficient in the Fourier sine series for f." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 128 "T he procedure g calculates the first n terms in the solution of the wav e equation given for fixed t as Fourier sine series in x." }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 73 " The example here \+ is for the initial position in the shape of a triangle." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "B := " }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 14 " proc(f,n) " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 39 " 2*int(f(x)*sin(n*x),x=0..Pi)/Pi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 " end;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 " g := " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 " proc(f,n)" }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 43 " sum(B(f,k)*cos(k*t)*sin(k*x),k=1..n); " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "end;" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 27 "f := x -> Pi/2-abs(Pi/2-x);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 19 "plot(f(x),x=0..Pi);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "animate(g(f,50),x=0..Pi,t=0..2*Pi,numpoints=500,fr ames=50,color=red);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} }{MARK "6 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 }