lecture10.mw

 > with(plots):with(DEtools):with(LinearAlgebra):

Warning, the name changecoords has been redefined

Stability of Linear systems

 > M:=Matrix([[1,1],[-1,1]]);

 > C:=Matrix([[a,0],[0,b]]);

 > A:=M.C.M^(-1);

 > de1:=diff(x(t),t)=(1/2)*(a+b)*x(t)+1/2*(-a+b)*y(t);

 > de2:=diff(y(t),t)=(1/2)*(-a+b)*x(t)+(1/2)*(a+b)*y(t);

 > a:=1;b:=2;

 > dfieldplot([de1,de2],[x(t),y(t)],t=0..1,x=-3..3,y=-3..3,arrows=MEDIUM);

 > a:=1;b:=1;

 > dfieldplot([de1,de2],[x(t),y(t)],t=0..1,x=-3..3,y=-3..3,arrows=MEDIUM);

 > a:=0;b:=1;

 > dfieldplot([de1,de2],[x(t),y(t)],t=0..1,x=-3..3,y=-3..3,arrows=MEDIUM);

 > a:=-1;b:=1;

 > dfieldplot([de1,de2],[x(t),y(t)],t=0..1,x=-3..3,y=-3..3,arrows=MEDIUM);

 > a:=-1;b:=-1;

 > dfieldplot([de1,de2],[x(t),y(t)],t=0..1,x=-3..3,y=-3..3,arrows=MEDIUM);

 > a:='a';b:='b';

 > A:=Matrix([[a,b],[-b,a]]);

 > Eigenvalues(A);

 > de1:=diff(x(t),t)=a*x(t)+b*y(t);

 > de2:=diff(y(t),t)=-b*x(t)+a*y(t);

 > a:=0;b:=1;

 > dfieldplot([de1,de2],[x(t),y(t)],t=0..1,x=-3..3,y=-3..3,arrows=MEDIUM);

 > a:=1;b:=1;

 > dfieldplot([de1,de2],[x(t),y(t)],t=0..1,x=-3..3,y=-3..3,arrows=MEDIUM);

 > a:=-1;b:=1;

 > dfieldplot([de1,de2],[x(t),y(t)],t=0..1,x=-3..3,y=-3..3,arrows=MEDIUM);

 > a:=0;b:=-1;

 > dfieldplot([de1,de2],[x(t),y(t)],t=0..1,x=-3..3,y=-3..3,arrows=MEDIUM);

 >

Pendulum

 > de1:=diff(x(t),t)=y(t);

 > de2:=diff(y(t),t)=-9*sin(x(t))-1/5*y(t);

 > dfieldplot([de1,de2],[x(t),y(t)],t=0..1,x=-10..10,y=-10..10,arrows=MEDIUM);

 > DEplot([de1,de2],[x(t),y(t)],t=0..10,[[x(0)=-3,y(0)=0]],x=-10..10,y=-10..10,arrows=MEDIUM,linecolor=blue,stepsize=0.005);

 > DEplot([de1,de2],[x(t),y(t)],t=0..10,[[x(0)=-3.5,y(0)=0],[x(0)=3,y(0)=0]],x=-10..10,y=-10..10,arrows=MEDIUM,linecolor=blue,stepsize=0.005);

 > DEplot([de1,de2],[x(t),y(t)],t=0..10,[[x(0)=-10,y(0)=6]],x=-10..10,y=-10..10,arrows=MEDIUM,linecolor=blue,stepsize=0.005);

 >

3-dimensional critial points

 > s:=Matrix([[x*(1-x/4-y)],[y*(-1+x-2*z)],[z*(-1+2*y)]]);

 > solve({s[1,1]=0,s[2,1]=0,s[3,1]=0});

 > J:=seq([diff(s[i,1],x),diff(s[i,1],y),diff(s[i,1],z)],i=1..3);

 > J:=Matrix([J]);

 > subs({x=0,y=0,z=0},J);

 > Eigenvalues(subs({x=4,y=0,z=0},J));

 > Eigenvalues(subs({x=3/4,y=1,z=0},J));

 > evalf(Eigenvalues(subs({x=2,y=1/2,z=1/2},J)));

 >

-