# # Phase portraits for systems of linear DEs (given by matrices) with # eigenvalues of the form: # complex, real part positive # pure imaginary # real, one is 0 , other is negative # # Written by Denise Kirschner # > restart;with(DEtools):with(linalg):with(plots): Warning: new definition for norm Warning: new definition for trace # Here, the eigenvalues are Imaginary positive > > A4 := linalg[matrix](2,2,[a4,b4,c4,d4]): > a4 := 3: b4 := -2: c4 := 4: d4 := -1: > eigenvals(A4); eigenvects(A4,radical); 1 + 2 I, 1 - 2 I [1 + 2 I, 1, {[ 1, 1 - I ]}], [1 - 2 I, 1, {[ 1, 1 + I ]}] > phaseportrait(A4,[x,y],-4..1,{[0,1,0],[0,0,1],[0,0,-1],[0,-1,0],[0,-5,5],[0,5,-5]},stepsize=.2,x=-10..10,y=-10..10,title=`spiral source`,arrows=THICK);\ # # Here the eigenvalues are purely imaginary (neutrally stable) > restart; with(DEtools):with(linalg): Warning: new definition for norm Warning: new definition for trace > A := linalg[matrix](2,2,[a,b,c,d]): > a := 0: b := 1: c := -1: d := 0: > eigenvals(A);eigenvects(A,radical); I, - I [I, 1, {[ 1, I ]}], [- I, 1, {[ 1, - I ]}] > phaseportrait(A,[x,y],-4..1,{[0,1,0],[0,0,1],[0,0,-1],[0,-1,0],[0,-5,5],[0,5,-5]},stepsize=.2,x=-10..10,y=-10..10,title=`center node`,arrows=THICK); # Here, there is one zero eigenvalue, one negative (stable) > > restart; with(DEtools):with(linalg): Warning: new definition for norm Warning: new definition for trace > A := linalg[matrix](2,2,[a,b,c,d]): > a := 0: b := 0: c := 0: d := -5: > eigenvals(A); eigenvects(A,radical); 0, -5 [0, 1, {[ 1, 0 ]}], [-5, 1, {[ 0, 1 ]}] > phaseportrait(A,[x,y],-4..1,{[0,1,0],[0,0,1],[0,0,-1],[0,-1,0],[0,-5,5],[0,5,-5]},stepsize=.2,x=-10..10,y=-10..10,title=`infinite line of steady states`,arrows=THICK); # Here is a proper node: (independent eigenvectors for repeated # roots) # > restart; with(DEtools):with(linalg): Warning: new definition for norm Warning: new definition for trace > A := linalg[matrix](3,3,[4,2,3,2,1,2,-1,2,0]); [ 4 2 3 ] [ ] A := [ 2 1 2 ] [ ] [ -1 2 0 ] > eigenvals(A);eigenvects(A,radical); 5, 1, -1 [1, 1, {[ -1, 0, 1 ]}], [5, 1, {[ 2, 1, 0 ]}], [-1, 1, {[ 1/2, 1, -3/2 ]}] > A := linalg[matrix](3,3,[1,0,0,0,1,0,0,0,1]); [ 1 0 0 ] [ ] A := [ 0 1 0 ] [ ] [ 0 0 1 ] > eigenvals(A);eigenvects(A,radical); 1, 1, 1 [1, 3, {[ 1, 0, 0 ], [ 0, 0, 1 ], [ 0, 1, 0 ]}] >