Chap3.mw

Maple Text Commands for Chapter 3 - INTERACTING SPECIES 

Example 1: Competing species model  

> with(DEtools):wih(plots):
 

> beta:=2:delta:=1:gama:=2:b:=2:d:=1:c:=2:
sys1:=diff(x(t),t)=x(t)*(beta-delta*x(t)-gama*y(t)),diff(y(t),t)=y(t)*(b-d*y(t)-c*x(t)):
iniset:=seq(seq([0,i,j],i=-2..2),j=-2..2):
 

Figure 3.1(b): Phase portrait of a competing species model (mutual exclusion). 

> DEplot([sys1],[x(t),y(t)],t=-20..20,[[0,0.3,0.3],[0,1,1],[0,2,1.5],[0,0.6,2.5],[0,0.6,0.64],[0,0.5,0.2],[0,0.2,0.5],[0,0.6,1],[0,0.65,0.64]],stepsize=0.1,x=0..3,y=0..3,color=black,linecolor=blue,thickness=2,font=[TIMES,ROMAN,15]);
 

Plot 

Example 2: Predator-Prey model  

> sys2:=diff(x(t),t)=x(t)*(1-y(t)),diff(y(t),t)=0.3*y(t)*(x(t)-1):
 

Figure 3.2: Phase portrait of a predator-prey model (Lotka-Volterra). 

> DEplot([sys2],[x(t),y(t)],t=0..100,[[0,1,2],[0,1,3],[0,1,1.2]],stepsize=0.1,x=0..6,y=0..3,color=black,linecolor=blue,thickness=2,font=[TIMES,ROMAN,15]);
 

Plot 

Figure 3.3(a): Time series plot. 

> DEplot([sys2],[x(t),y(t)],t=0..50,[[0,1,2]],stepsize=0.1,x=0..4,y=0..4,color=black,linecolor=blue,thickness=2,font=[TIMES,ROMAN,15],scene=[t,x]);
 

Plot 

Example 3: The Holling Tanner model  

> sys3:=diff(x(t),t)=x(t)*(1-(x(t))/7)-6*x(t)*y(t)/(7+7*x(t)), diff(y(t),t)=0.2*y(t)*(1-y(t)/(2*x(t))):
 

Figure 3.5(a): Limit cycle for a predator-prey model. 

> DEplot([sys3],[x(t),y(t)],t=0..100,[[0,7,0.1],[0,1.1,2]],stepsize=0.01,x=0.1..7,y=0.1..4.5,color=black,linecolor=blue,thickness=2,arrows=SMALL,font=[TIMES,ROMAN,15]);
 

Plot 

End of Chapter 3 Commands