{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 }{CSTYLE "" -1 256 "times" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 0 2 2 2 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 0 0 0 0 2 1 2 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Courier" 1 24 0 0 0 0 2 2 2 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 258 1 {CSTYLE "" -1 -1 "" 0 1 0 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 258 "" 0 "" {TEXT 256 39 "Phase Portrait for a Co mpetitive System" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "restart :\nwith(plots):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with(DEtools):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "Define the differential equatio n using parameters:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "a:=2 : b:=1: c:= 1: d:= 3: e:=1: f:=2: g:=2:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 104 "CompDE := [diff(x(t),t) = x(t)*(a-b*x(t)-c*y(t)),\n \+ diff(y(t),t) = y(t)*(d-e*x(t)-f*y(t))];" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 120 "Plot the phaseportrait using Runge-Kutta method; the \+ initial conditions are given in the first line and can be changed." }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 119 "IC:=[[x(0)=0.1,y(0)=0.1],[ x(0)=2,y(0)=0.1],[x(0)=0.1,y(0)=1.5],\n[x(0)=3,y(0)=3],[x(0)= 2,y(0)=3 .0],[x(0)= 3,y(0)=2.0]];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 159 "phasep ortrait(CompDE, [x(t),y(t)], t=0..7, \nIC,linecolour=BLUE, x=0..4, y= 0..4, stepsize=0.1,\narrows=NONE, method=classical[rk4], title=`Compet itive System`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 80 "You could try changing the paramet ers in the equation to get different examles. " }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 15 "Plot x versus t" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "a:=2: b:=1: c: = 1: d:= 3: e:=1: f:=2: g:=2:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 135 "C ompDE := [diff(x(t),t) = x(t)*(a-b*x(t)-c*y(t)),\n diff( y(t),t) = y(t)*(d-e*x(t)-f*y(t)),\n diff(T(t),t)=1];" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 170 "IC:=[[x(0)=0.1,y(0)=0.1,T( 0)=0],[x(0)=2,y(0)=0.1,T(0)=0],\n [x(0)=0.1,y(0)=1.5,T(0)=0],[x(0)= 3,y(0)=3,T(0)=0],\n [x(0)= 2,y(0)=3.0,T(0)=0],[x(0)= 3,y(0)=2.0,T(0 )=0]];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 170 "DEplot(CompDE, [x(t),y(t ),T(t)], t=0..7, \nIC,linecolour=BLUE, x=0..4, y=0..4, stepsize=0.1, \narrows=NONE, method=classical[rk4],scene=[T,x], \ntitle=`Competitive System`);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 58 "Plot the vector fie ld for x' = x(2-x-y), y' = y(3-x-2y)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "fieldplot([x*(2-x-y),y*(3-x-2*y)], x = 0..4, y=0..4) ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 71 "Plot the solutions with several initial conditions u sing Euler method: " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 280 "IC: =[[x(0)=0.1,y(0)=0.1,T(0)=0],[x(0)=2,y(0)=0.1,T(0)=0],\n [x(0)=0.1,y (0)=1.5,T(0)=0],[x(0)=3,y(0)=3,T(0)=0]];\nphaseportrait(CompDE, [x(t), y(t),T(t)], t=0..7, \nIC,linecolour=BLUE, x=0..4, y=0..4,\narrows=NON E,method=classical[foreuler],scene=[T,x], \ntitle=`Competitive System` );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 168 "Notice the problem with th e solution overshooting and crossing another solution. This is caused by using the Euler method and does not happen for the true solutions. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "1 0 0" 9 }{VIEWOPTS 1 1 0 3 2 1804 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }