3.4 Complex Eigenvalues
October 23, 1998
| > | with(linalg):
with(DEtools): |
Warning, new definition for norm
Warning, new definition for trace
Warning, new definition for adjoint
How to get Maple to do such an example
Consider the planar system with coefficient matrix
| > | B:=matrix(2,2,[[2,1],[-9,2]]); |
We can then find the eigenvectors and eigenvalues using eigenvectors.
| > | evects(B):=eigenvectors(B); |
We can then define the complex solution using the first eigenvalue and eigenvector.
| > | xcomplex:=proc(t) exp([evects(B)][1][1]*t)*[evects(B)][1][3][1][1] end:
ycomplex:=proc(t) exp([evects(B)][1][1]*t)*[evects(B)][1][3][1][2] end: xcomplex(t); ycomplex(t); |
We get real solutions by taking real and imaginary parts.
| > | xreal:=proc(t) evalc(Re(xcomplex(t))) end:
yreal:=proc(t) evalc(Re(ycomplex(t))) end: xim:=proc(t) evalc(Im(xcomplex(t))) end: yim:=proc(t) evalc(Im(ycomplex(t))) end: matrix(2,1,[[xreal(t)],[yreal(t)]]); matrix(2,1,[[xim(t)],[yim(t)]]); |
And here's what the phase plane looks like.
| > | phaseportrait([D(x)(t)=2*x(t)+y(t),D(y)(t)=-9*x(t)+2*y(t)],
[x(t),y(t)],t=0..2*Pi/3, [[x(0)=1/3,y(0)=1],[x(0)=-1/3,y(0)=1], [x(0)=1/3,y(0)=-1],[x(0)=-1/3,y(0)=-1]], linecolor=[blue,navy,green,cyan], stepsize=0.01); |
![[Plot]](mth3060304m9_images/mth3060304m9_7.gif)
| > | plot([xreal(t),yreal(t)],t=0..4*Pi/3); |
![[Plot]](mth3060304m9_images/mth3060304m9_8.gif)
A Linear Second Order Equation Example
This one we have seen before.
Consider the equation
.
It has exponential solutions
for numbers
satisfying the associated quadratic equation
,
that is,
and
. Indeed, the associated first order system is
,
,
and the coefficient matrix is
| > | A:=matrix([[0,1],[-50,-2]]); |
with characteristic polynomial
| > | charpoly(A,s); |
and eigenvalues
| > | eigenvalues(A); |
and the eigenvectors are
| > | evalA:=eigenvectors(A); |
Corresponding to the first eigenvalue and eigenvector we have the solutions
| > | ycomplex:=proc(t) exp((-1+7*I)*t) end;
vcomplex:=proc(t) (-1+7*I)*exp((-1+7*I)*t) end; |
We get two independent solutions by taking real and imaginary parts.
| > | yreal:=proc(t) evalc(Re(ycomplex(t))) end;
vreal:=proc(t) evalc(Re(vcomplex(t))) end; yim:=proc(t) evalc(Im(ycomplex(t))) end; vim:=proc(t) evalc(Im(vcomplex(t))) end; |
And these give us the solutions we obtained by the guess and test method.
| > | matrix(2,1,[[yreal(t)],[vreal(t)]]);
matrix(2,1,[[yim(t)],[vim(t)]]); |
Indeed, we found one solution to be
| > | matrix(2,1,[[exp(-t)*sin(7*t)],[diff(exp(-t)*sin(7*t),t)]]); |
The phase portrait we have seen before.
| > | phaseportrait([D(y)(t)=v(t),D(v)(t)=-50*y(t)-2*v(t)],
[y(t),v(t)],t=0..2, [[y(0)=1,v(0)=0],[y(0)=-1,v(0)=0]], linecolor=[navy,green], stepsize=0.01); |
![[Plot]](mth3060304m9_images/mth3060304m9_30.gif)
And here again are the y and v functions plotted.
| > | plot([exp(-t)*sin(7*t),diff(exp(-t)*sin(7*t),t)],t=0..4,
title="y in red, v in green"); |
![[Plot]](mth3060304m9_images/mth3060304m9_31.gif)