{VERSION 5 0 "IBM INTEL NT" "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 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "# Forced motion\n\n# filename = 05.3.mws\n\nrestart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 84 "x:='x':\n fm:=proc( f)\n\011dsolve(\{diff(x(t),t$2)+4*x(t)=f,x(0)=0,D(x)(0)=0\},x(t))\n \011end:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "fs:=[0,1,cos(t) ,sin(t)]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "somesols:=map( fm,fs):\nsomesols:=combine(somesols,trig);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 34 "plot(map(rhs,somesols),t=0..2*Pi);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "Example 2" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 72 "moresols:=map(fm,[cos(2*t),sin(2*t)]):\nmoresols:=com bine(moresols,trig);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "plo t(map(rhs,moresols),t=0..3*Pi);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "Example 3" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 76 "moresols:=map (fm,[cos(1.9*t),sin(2.1*t)]):\nmoresols:=combine(moresols,trig);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "plot(map(rhs,moresols),t=0.. 3*Pi);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "plot(rhs(moresols [1]),t=0..40*Pi);\nplot(rhs(moresols[2]),t=0..40*Pi);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "xp:=t->a*cos(beta*t)+b*sin(beta*t): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "diff(xp(t),t);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "diff(xp(t),t$2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "step1:=simplify(diff(xp(t),t$2)+ome ga^2*diff(xp(t),t)=f*cos(beta*t));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "eq1:=eval(subs(t=0,step1));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "eq2:=eval(subs(t=Pi/(2*beta),step1));" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "vals:=solve(\{eq1,eq2\},\{a, b\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 104 "gensol:=dsolve(\{ diff(x(t),t$2)+omega^2*x(t)=f*cos(beta*t),x(0)=0,D(x)(0)=0\},x(t)):\nc ombine(gensol,trig);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "Example 4 " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 80 "fs:=[cos(3*t),cos(5*t)] :\nsomesols:=map(fm,fs):\nsomesols:=combine(somesols,trig);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 75 "p1:=plot(rhs(somesols[1]),t= 0..6*Pi,color=BLACK):\nwith(plots):\ndisplay(p1);" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 78 "p2:=plot([2/5*sin(t/2),-2/5*sin(t/2)],t=0..6 *Pi,color=GRAY):\ndisplay(\{p1,p2\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 92 "plot([rhs(somesols[2]),2/21*sin(3*t/2),-2/21*sin(3*t/ 2)],t=0..4*Pi,color=[BLACK,GRAY,GRAY]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "Example 5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "de 11:=fm(exp(-t)*cos(2*t)):\nde11:=combine(de11,trig);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "plot(rhs(de11),t=0..4*Pi);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "Example 6" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 108 "deq:=dsolve(\{diff(x(t),t$2)+4*diff(x(t),t)+13*x(t)= cos(t),\n\011x(0)=0,D(x)(0)=1\},x(t)):\ndeq:=combine(deq,trig);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 73 "plot1:=plot(rhs(deq),t=0..5* Pi,color=BLACK):\nwith(plots):\ndisplay(plot1);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 30 "ss:=t->1/40*(3*cos(t)+sin(t)):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "ssplot:=plot(ss(t),t=0..5*Pi,color= GRAY):\ndisplay(\{plot1,ssplot\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "plot(1/40*exp(-2*t)*(-3/40*cos(3*t)+11/40*sin(3*t)),t =0..Pi);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "simplify(diff(s s(t),t$2)+4*diff(ss(t),t)+13*ss(t));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "Example 7" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 112 "sol:=ds olve(\{diff(x(t),t$2)+4*diff(x(t),t)+13*x(t)=cos(omega*t),x(0)=0,D(x)( 0)=0\},x(t)):\nsol:=combine(sol,trig);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "u:=(t0,omega0)->eval(subs(\{t=t0,omega=omega0\},rhs(s ol))):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "u(1,1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "?anima te" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 85 "animate(u(t,omega),t= 0..10,omega=0..6,frames=40,\nview=[0..10,-0.1..0.1],color=BLACK);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 93 "toshow:=animate(u(t,omega),t =0..10,omega=0..6,frames=12,\nview=[0..10,-0.1..0.1],color=BLACK):" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "toshow:=display(toshow,inse quence=true):\ndisplay(toshow);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "plot3d(u(t,omega),t=0..10,omega=0..6,grid=[40,40],axes=BOXED); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "1 0 0" 0 } {VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }