Lotka-Volterra predator-prey model for the populations of rabbits (R) and foxes (F)
> | restart: with(plots): with(DEtools): |
> | eqn1:= diff(R(t),t)=(0.1)*R(t)-(0.005)*R(t)*(1/60)*F(t);
eqn2:= diff(F(t),t)=(0.00004)*R(t)*F(t)-(0.04)*F(t);
vars:= [R(t), F(t)]; |
(1) |
> | init1:=[R(0)=2000,F(0)=600];
init2:=[R(0)=2000,F(0)=1200];
init3:=[R(0)=2000, F(0)=3000];
domain := 0 .. 320; |
(2) |
> | L:= DEplot({eqn1, eqn2}, vars, domain,{init1 }, stepsize=0.5, scene=[t, F], arrows=NONE):
H:= DEplot({eqn1, eqn2}, vars, domain,{init1 }, stepsize=0.5, scene=[t, R], arrows=NONE): |
> | display( {L,H} , title = `Rabbits and Foxes vs. time` ); |
> |
> | DEplot({eqn1, eqn2}, vars, t= 0 .. 160, {init1, init2, init3}, stepsize=0.5, scene=[R,F], arrows= SLIM ); |
> | equil:= solve( {
(0.1)*R-(0.005)*R*(1/60)*F=0, (0.00004)*R*F-(0.04)*F=0}, {R , F }); |
(3) |
> |