>    with(DEtools):
with(plots):
with(linalg):

Warning, the previous binding of the name adjoint has been removed and it now has an assigned value

>    lambda[1] := 1; lambda[2] := 3;
p := 2: q := 1: s :=(lambda[1]+lambda[2]-p): r := -((lambda[1]*lambda[2])-p*s)/q:
A := matrix(2,2,[p,q,r,s]):
eigenvalues(A);
Eqs := [diff(x(t),t)=p*x(t)+q*y(t),diff(y(t),t)=r*x(t)+s*y(t)];
fig1 := dfieldplot(Eqs,[x(t),y(t)],t=0..1,x=-2..2,y=-2..2, arrows = MEDIUM, color=blue):
fig2 := plot([q*t,(lambda[1]-p)*t,t=-2..2],view=[-2..2,-2..2],color=red,thickness=4):
fig3 := plot([q*t,(lambda[2]-p)*t,t=-2..2],view=[-2..2,-2..2],color=yellow,thickness=4):
display({fig1,fig2,fig3},title="red: first eigenvector, yellow: second eigenvector, blue: field");

lambda[1] := 1

lambda[2] := 3

3, 1

Eqs := [diff(x(t),t) = 2*x(t)+y(t), diff(y(t),t) = x(t)+2*y(t)]

[Maple Plot]

>    lambda[1] := -1; lambda[2] := -3;
p := 0: q := 1: s :=(lambda[1]+lambda[2]-p): r := -((lambda[1]*lambda[2])-p*s)/q:
A := matrix(2,2,[p,q,r,s]):
eigenvalues(A);
Eqs := [diff(x(t),t)=p*x(t)+q*y(t),diff(y(t),t)=r*x(t)+s*y(t)];
fig1 := dfieldplot(Eqs,[x(t),y(t)],t=0..1,x=-2..2,y=-2..2, arrows = MEDIUM, color=blue):
fig2 := plot([q*t,(lambda[1]-p)*t,t=-2..2],view=[-2..2,-2..2],color=red,thickness=4):
fig3 := plot([q*t,(lambda[2]-p)*t,t=-2..2],view=[-2..2,-2..2],color=yellow,thickness=4):
display({fig1,fig2,fig3},title="red: first eigenvector, yellow: second eigenvector, blue: field");

lambda[1] := -1

lambda[2] := -3

-1, -3

Eqs := [diff(x(t),t) = y(t), diff(y(t),t) = -3*x(t)-4*y(t)]

[Maple Plot]

>    lambda[1] := -1; lambda[2] := 1;
p := 1: q := 1: s :=(lambda[1]+lambda[2]-p): r := -((lambda[1]*lambda[2])-p*s)/q:
A := matrix(2,2,[p,q,r,s]):
eigenvalues(A);
Eqs := [diff(x(t),t)=p*x(t)+q*y(t),diff(y(t),t)=r*x(t)+s*y(t)];
fig1 := dfieldplot(Eqs,[x(t),y(t)],t=0..1,x=-2..2,y=-2..2, arrows = MEDIUM, color=blue):
fig2 := plot([q*t,(lambda[1]-p)*t,t=-2..2],view=[-2..2,-2..2],color=red,thickness=4):
fig3 := plot([q*t,(lambda[2]-p)*t,t=-2..2],view=[-2..2,-2..2],color=yellow,thickness=4):
display({fig1,fig2,fig3},title="red: first eigenvector, yellow: second eigenvector, blue: field");

lambda[1] := -1

lambda[2] := 1

1, -1

Eqs := [diff(x(t),t) = x(t)+y(t), diff(y(t),t) = -y(t)]

[Maple Plot]

>    lambda[1] := 3; lambda[2] := 0;
p := 1: q := 1: s :=(lambda[1]+lambda[2]-p): r := -((lambda[1]*lambda[2])-p*s)/q:
A := matrix(2,2,[p,q,r,s]):
Eqs := [diff(x(t),t)=p*x(t)+q*y(t),diff(y(t),t)=r*x(t)+s*y(t)];
fig1 := dfieldplot(Eqs,[x(t),y(t)],t=0..1,x=-2..2,y=-2..2, arrows = MEDIUM, color=blue):
fig2 := plot([q*t,(lambda[1]-p)*t,t=-2..2],view=[-2..2,-2..2],color=red,thickness=4):
fig3 := plot([q*t,(lambda[2]-p)*t,t=-2..2],view=[-2..2,-2..2],color=yellow,thickness=4):
display({fig1,fig2,fig3},title="red: first eigenvector, yellow: second eigenvector, blue: field");

lambda[1] := 3

lambda[2] := 0

Eqs := [diff(x(t),t) = x(t)+y(t), diff(y(t),t) = 2*x(t)+2*y(t)]

[Maple Plot]

>    lambda[1] := 1/10+sqrt(5)*I/3; lambda[2] := 1/10-sqrt(5)*I/3;
p := 0: q := 2: s :=(lambda[1]+lambda[2]-p): r := -((lambda[1]*lambda[2])-p*s)/q:
A := matrix(2,2,[p,q,r,s]):
eigenvalues(A);
Eqs := [diff(x(t),t)=p*x(t)+q*y(t),diff(y(t),t)=r*x(t)+s*y(t)];
sol := dsolve(Eqs,{x(t),y(t)});
fig1 := dfieldplot(Eqs,[x(t),y(t)],t=0..1,x=-2..2,y=-2..2, arrows = MEDIUM, color=blue):
fig2 := plot(subs(sol,_C2=0,_C1=1,[x(t),y(t),t=-4..4]),view=[-2..2,-2..2],color=red,thickness=4):
display({fig1,fig2},title="red: first eigenvector, yellow: second eigenvector, blue: field");

lambda[1] := 1/10+1/3*I*5^(1/2)

lambda[2] := 1/10-1/3*I*5^(1/2)

1/10+1/3*I*5^(1/2), 1/10-1/3*I*5^(1/2)

Eqs := [diff(x(t),t) = 2*y(t), diff(y(t),t) = -1/2*(1/10+1/3*I*5^(1/2))*(1/10-1/3*I*5^(1/2))*x(t)+1/5*y(t)]

sol := {y(t) = -1/60*exp(1/10*t)*(-3*_C1*sin(1/3*5^(1/2)*t)-10*_C1*cos(1/3*5^(1/2)*t)*5^(1/2)-3*_C2*cos(1/3*5^(1/2)*t)+10*_C2*sin(1/3*5^(1/2)*t)*5^(1/2)), x(t) = exp(1/10*t)*(_C1*sin(1/3*5^(1/2)*t)+_C2...
sol := {y(t) = -1/60*exp(1/10*t)*(-3*_C1*sin(1/3*5^(1/2)*t)-10*_C1*cos(1/3*5^(1/2)*t)*5^(1/2)-3*_C2*cos(1/3*5^(1/2)*t)+10*_C2*sin(1/3*5^(1/2)*t)*5^(1/2)), x(t) = exp(1/10*t)*(_C1*sin(1/3*5^(1/2)*t)+_C2...

[Maple Plot]

>    lambda[1] := -1/10+I; lambda[2] := -1/10-I;
p := 0: q := 2: s :=(lambda[1]+lambda[2]-p): r := -((lambda[1]*lambda[2])-p*s)/q:
A := matrix(2,2,[p,q,r,s]):
eigenvalues(A);
Eqs := [diff(x(t),t)=p*x(t)+q*y(t),diff(y(t),t)=r*x(t)+s*y(t)];
sol := dsolve(Eqs,{x(t),y(t)});
fig1 := dfieldplot(Eqs,[x(t),y(t)],t=0..1,x=-2..2,y=-2..2, arrows = MEDIUM, color=blue):
fig2 := plot(subs(sol,_C2=0,_C1=1,[x(t),y(t),t=-4..4]),view=[-2..2,-2..2],color=red,thickness=4):
display({fig1,fig2},title="red: first eigenvector, yellow: second eigenvector, blue: field");

lambda[1] := -1/10+I

lambda[2] := -1/10-I

-1/10+I, -1/10-I

Eqs := [diff(x(t),t) = 2*y(t), diff(y(t),t) = -101/200*x(t)-1/5*y(t)]

sol := {y(t) = -1/20*exp(-1/10*t)*(_C1*sin(t)-10*_C1*cos(t)+_C2*cos(t)+10*_C2*sin(t)), x(t) = exp(-1/10*t)*(_C1*sin(t)+_C2*cos(t))}

[Maple Plot]

>    lambda[1] := I; lambda[2] := -I;
p := 1: q := 1: s :=(lambda[1]+lambda[2]-p): r := -((lambda[1]*lambda[2])-p*s)/q:
A := matrix(2,2,[p,q,r,s]):
eigenvalues(A);
Eqs := [diff(x(t),t)=p*x(t)+q*y(t),diff(y(t),t)=r*x(t)+s*y(t)];
sol := dsolve(Eqs,{x(t),y(t)});
fig1 := dfieldplot(Eqs,[x(t),y(t)],t=0..1,x=-2..2,y=-2..2, arrows = MEDIUM, color=blue):
fig2 := plot(subs(sol,_C2=0,_C1=1,[x(t),y(t),t=-4..4]),view=[-2..2,-2..2],color=red,thickness=4):
display({fig1,fig2},title="red: first eigenvector, yellow: second eigenvector, blue: field");

lambda[1] := I

lambda[2] := -I

I, -I

Eqs := [diff(x(t),t) = x(t)+y(t), diff(y(t),t) = -2*x(t)-y(t)]

sol := {x(t) = _C1*sin(t)+_C2*cos(t), y(t) = _C1*cos(t)-_C2*sin(t)-_C1*sin(t)-_C2*cos(t)}

[Maple Plot]

>    p := 0: q := 1: s := -2*sqrt(2): r := -2:
A := matrix(2,2,[p,q,r,s]):
eigenvalues(A);
jordan(A,'M');
evalm(M);
Eqs := [diff(x(t),t)=p*x(t)+q*y(t),diff(y(t),t)=r*x(t)+s*y(t)];
sol := dsolve(Eqs,{x(t),y(t)});
fig1 := dfieldplot(Eqs,[x(t),y(t)],t=0..1,x=-2..2,y=-2..2, arrows = MEDIUM, color=blue):
fig2 := plot([M[1,1]*t,M[2,1]*t,t=-4..4],view=[-2..2,-2..2],color=red,thickness=1):
fig3 := plot(subs(sol,_C2=0,_C1=1,[x(t),y(t),t=-4..4]),view=[-2..2,-2..2],color=yellow,thickness=4):
display({fig1,fig2,fig3},title="red: first eigenvector, yellow: second eigenvector, blue: field");

-2^(1/2), -2^(1/2)

matrix([[-2^(1/2), 1], [0, -2^(1/2)]])

matrix([[2^(1/2), 1], [-2, 0]])

Eqs := [diff(x(t),t) = y(t), diff(y(t),t) = -2*x(t)-2*2^(1/2)*y(t)]

sol := {x(t) = exp(-2^(1/2)*t)*(_C2*t+_C1), y(t) = -exp(-2^(1/2)*t)*(_C1*2^(1/2)+_C2*2^(1/2)*t-_C2)}

[Maple Plot]

>    M[1,1];

2^(1/2)

>