Chap2.mw

Maple Text Commands for Chapter 2 - PLANAR SYSTEMS 

> restart:with(DEtools):with(plots):
 

Warning, the name changecoords has been redefined 

Example 4: Plot a phase portrait for the linear system  

> iniset:={seq(seq([0,i,j],i=-2..2),j=-2..2)}:
sys:=diff(x(t),t)=2*x(t)+y(t),diff(y(t),t)=x(t)+2*y(t):
 

Figure 2.8(a): Phase portrait with vector field superimposed. 

> DEplot([sys],[x(t),y(t)],t=-5..5,iniset,stepsize=0.1,x=-3..3,y=-3..3,arrows=SLIM,color=black,linecolor=blue,thickness=2,font=[TIMES,ROMAN,15]);
 

Plot 

Example 8: Plot a phase portrait for the nonlinear system  

> iniset:={seq(seq([0,i,j],i=-2..2),j=-2..2)}:
sys:=diff(x(t),t)=y(t),diff(y(t),t)=x(t)*(1-(x(t))^2)+y(t):
 

Figure 2.8(a): Phase portrait with vector field superimposed. 

> DEplot([sys],[x(t),y(t)],t=-10..10,iniset,stepsize=0.1,x=-3..3,y=-3..3,arrows=SLIM,color=black,linecolor=blue,thickness=2,font=[TIMES,ROMAN,15]);
 

Plot 

Exercise 4(d): Locating critical points. 

> solve({2-x-y^2,-y*(x^2+y^2-3*x+1)},{x,y});
 

{x = 2, y = 0}, {y = -1, x = 1}, {y = 1, x = 1}, {x = 3, y = RootOf(_Z^2+1, label = _L2)}
{x = 2, y = 0}, {y = -1, x = 1}, {y = 1, x = 1}, {x = 3, y = RootOf(_Z^2+1, label = _L2)}
 

End of Chapter 2 Commands