Example from Class based on Section 9.3
Below is the example I did in class: x'(t) = -x+y+2 y'(t)=xy. Sure looks like the basin of attraction for (0,-2) is the open lower half-plane: { (x,y) | y<0 }.
Ignore the commands below. I used MAPLE not MATLAB. I just want to save my work for my own use.
| > | field:=plots[fieldplot]([-x+y+2,x*y],x=-5..5,y=-5..5,color=blue,thickness=2,arrows=slim,title="x'=-x+y+2 & y'=xy"): |
| > | curves:=phaseportrait([D(x)(t)=-x(t)+y(t)+2,D(y)(t)=x(t)*y(t)], [x(t),y(t)],t=-5..7, [[x(0)=5,y(0)=0],[x(0)=-5,y(0)=0],[x(0)=2.1,y(0)=0.2], [x(0)=5,y(0)=.03],[x(0)=2,y(0)=-0.01], [x(0)=0,y(0)=-1], [x(0)=0,y(0)=-4],[x(0)=0,y(0)=-5],[x(0)=0,y(0)=1],[x(0)=-3,y(0)=-1], [x(0)=0,y(0)=2],[x(0)=0,y(0)=3.5],[x(0)=-4,y(0)=1]], x=-5..5,y=-5..5,arrows=none,stepsize=.1, linecolor=red): |
| > | display(field,curves); |