> restart;
Call Maple DEtools Package:
> with(DEtools):
Define System of 2ODEs:
>
ODE2:=[diff(x(t),t)= 0.25*x*(1-x/1.4)-1.5*x*y/(1+0.16*x),
diff(y(t),t)=0.9*1.5*x*y/(1+0.16*x)-0.8*y];
DEplot Format:
DEplot([rhs of eqns],[vars],{[i.c]},stepsize=h,
method=classical[rk4])
Remark: Press Enter to Generate the DEplot Plots below:
DEplot resulting in 3D plot in txy-space by default RK4 (classical[rk4]) method:
>
DEplot(ODE2,[x(t),y(t)],t=0..50,[[x(0)=1,y(0)=2]],stepsize=0.1,
title="DEplot with default RK4",linecolor=blue);
DEplot by Euler method:
>
DEplot(ODE2,[x(t),y(t)],t=0..50,[[x(0)=1,y(0)=2]],stepsize=0.1,
method=classical[foreuler],title="DEplot with (forward) Euler", linecolor=blue);
>
DEplot by Modified or Improved Euler (RK2) method:
> DEplot(ODE2,[x(t),y(t)],t=0..50,[[x(0)=1,y(0)=2]],stepsize=0.1,method=classical[rk2], title="DEplot with Modified Euler (rk2)", linecolor=blue);
>