{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 61 " This example can be used as a template for Problem 9, p 118" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with(DEtools):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 297 "In this \+ example, we will plot numerically generated solutions to a system of d ifferential equations. In this example, we have t, x(t), and y(t). \+ We can either view the solution as a parametrized curve, (x(t), y(t)), or view two separate curves (t, x(t)) and (t, y(t)). We look at both below. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 86 "Before we start, we have to define the system of equations and the initial conditions:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "Deqns:=[diff(x(t),t)=x(t)*(1-y(t)),diff(y (t),t)=.3*y(t)*(x(t)-1)];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "initconds:=[[x(0)=1.2,y(0)=1.2],[x(0)=1,y(0)=.7]];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "DEplot(Deqns,[x(t),y(t)],t=0..7,ini tconds);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 36 "This plot isn't very good. We will:" }}{PARA 0 "" 0 "" {TEXT -1 67 " (a) Change the step size to a smaller value. Use: st epsize=0.1" }}{PARA 0 "" 0 "" {TEXT -1 73 " (b) Color the solution c urves black. Use: linecolor=black" }}{PARA 0 "" 0 "" {TEXT -1 75 " (c) Expand the time interval U se: time = 0..15" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 75 "DEplot(Deqns,[x(t),y(t)],t=0..15,initconds, stepsize=0.1, linecolor=black);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 431 "We will now construct a plot wher e t is the independent variable, and x(t), y(t) are the two dependent \+ variables. To do this in Maple, first construct two separate plots, t hen display them together. We will use an extra line: scene=[t,x(t)] or scene=[t, y(t)] to get the right plots. We'll only use the first \+ initial condition for this plot (otherwise we'll have too many curves) , and we'll plot it over a longer time interval." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "initconds:= [[x(0)=1.2,y(0)=1.2]];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 89 "A :=DEplot(Deqns,[x(t),y(t)],t=0..25,initconds,stepsize=0.1,linecolor=re d,scene=[t,x(t)]):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 91 "B:=DE plot(Deqns,[x(t),y(t)],t=0..25,initconds,stepsize=0.1,linecolor=green, scene=[t,y(t)]):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(pl ots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "display(\{A,B\}); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 239 " By zooming in on the graph, and clicking on the first intersection of the curves, we see that the first time the populations are equal again is about t=11.57. In this case, this will also be the approximate period for both x(t) and y(t) ." }}}}{MARK "15" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }