{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 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 189 "Example from class: Convert a second order ODE to a system of first order. Plot the results of y' vs. y, y and y' versus t. We wi ll also plot the solution overlaying the direction field." }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "resta rt;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with(DEtools):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "dU:=diff(u(t),t)=v(t);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "dV:=diff(v(t),t)=-v(t)-1.25* u(t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 100 "DEplot([dU,dV],[u (t),v(t)],t=-1..6,u=-4..4,v=-4..4,[[u(0)=3,v(0)=1]],stepsize=0.05,line color=black);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 141 "Now we'll plot u (or y) versus t and v (or y') versus t on the same graph. The position (y) will be blue, and the velocity (y') will be red:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 114 "A:=DEplot([dU,dV],[u(t),v(t)],t=0..15,u=-4 ..4,v=-4..4,[[u(0)=3,v(0)=1]],stepsize=0.05,scene=[t,u],linecolor=blue ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 113 "B:=DEplot([dU,dV],[u (t),v(t)],t=0..15,u=-4..4,v=-4..4,[[u(0)=3,v(0)=1]],stepsize=0.05,scen e=[t,v],linecolor=red):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 " with(plots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "display(\{A ,B\},title=\"Plot of position and velocity\");" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "1 0 0" 8 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }