{VERSION 5 0 "IBM INTEL LINUX" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{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 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 136 "Here is an example of how to solve and plot a second order lin ear difference equation. Use this as a template for the work on the e xam." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "eqn:=x(n+2)-x(n+1)+(1/8)* x(n)=sin(4*n)+cos(3*n)+exp(-n);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 77 "#To solve the difference equation with initial values x(0)=0 a nd x(1)=1, use:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "K:=rsolv e(\{eqn,x(0)=0,x(1)=1\},x(n));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "poi ntplot([seq([n,K],n=1..100)],style=line);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}}{MARK "6 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }