> restart:with(plots):with(DEtools):
> phase:=proc(f,r)
local a,b,bn,bs,U;
a:=op([1,1],plot(args));
bn:=-`-`(op([2,1..2],r));
bs:=[a[1,1],seq(`if`(
(a[i-1,2]-0.0001*bn*signum(a[i-1,2]))*(a[i,2]-0.0001*bn*signum(a[i,2]))<0, i="2..nops(a)),a[-1,1]];">abs(x[2,1])<0.04, i="`if`(a[1,2]<0,2,1)..nops(b)-1,2)," i="`if`(a[1,2]<0,1,2)..nops(b)-1,2)]);" width="0.02,head_length=" view="[b[1]..b[-1],-1..1],color=">[x,0],b[2..-2]),symbol=circle,symbolsize=19),
plots[textplot](map(x->[x/bn,-0.07,sprintf("%.2f",x)],bs[2..-2])),
axes=none)
end:
System Dinamik dengan a>0
> phase(0.5*x ,x=-2..2);
> DEplot(diff(x(t),t)=0.5*x(t) ,x(t),
t=0..10,[[x(0)=1],[x(0)=0.2],[x(0)=-1.1],[x(0)=-0.9]],x=-4..5,stepsize=.05,color=sin(t), linecolor=sin(t));
System Dinamik dengan a<0
> phase(-0.6*y,y=-2..2);
> DEplot(diff(x(t),t)=-0.6*x(t) ,x(t),
t=0..10,[[x(0)=5],[x(0)=0.2],[x(0)=-1.1],[x(0)=-5]],x=-4..5,stepsize=.05,color=sin(t), linecolor=sin(t));
Sistem dinamik persamaan logistik dengan a>0
> phase(y*(1-y),y=-1..2);
> DEplot(diff(x(t),t)=x(t)*(1-x(t)) ,x(t),
t=0..10,[[x(0)=5],[x(0)=0.2],[x(0)=1.1],[x(0)=-0.01]],x=-4..5,stepsize=.05,color=sin(t), linecolor=sin(t));
Sistem dinamik persamaan logistik dengan a <0
> phase(-0.5*y*(1-y),y=-2..2);
> DEplot(diff(x(t),t)=-0.5*x(t)*(1-x(t)) ,x(t),
t=0..10,[[x(0)=5],[x(0)=0.2],[x(0)=1.1],[x(0)=-1.1]],x=-2..4,stepsize=.05,color=sin(t), linecolor=sin(t));
Sistem dinamik persamaan Pemanenan dengan h < 1/4
> phase(x*(1-x)-0.2,x=-1..2);
> DEplot(diff(x(t),t)=x(t)*(1-x(t))-0.2 ,x(t),
t=0..10,[[x(0)=5],[x(0)=0.2],[x(0)=0.5],[x(0)=1.1]],x=-2..2,stepsize=.05,color=sin(t), linecolor=sin(t),);
Sistem dinamik persamaan Pemanenan dengan h = 1/4
> phase(y*(1-y)-0.25,y=-1..1);
> solve(y*(1-y)-0.25,y);
> DEplot(diff(x(t),t)=x(t)*(1-x(t))-1/4 ,x(t),
t=0..10,[[x(0)=1],[x(0)=0.40],[x(0)=0.5],[x(0)=1.1]],x=-1..2,stepsize=.05,color=sin(t), linecolor=sin(t));
Sistem dinamik persamaan Pemanenan dengan h > 1/4
> phase(y*(1-y)-0.27,y=-1..1);
> DEplot(diff(x(t),t)=x(t)*(1-x(t))-0.27 ,x(t),
t=0..20,[[x(0)=1],[x(0)=0.40],[x(0)=0.5],[x(0)=1.1]],x=-1..2,stepsize=.05,color=sin(t), linecolor=sin(t),arrows=LARGE);