Example 4: Solve the system
.
Solution: As before, we define the matrix
, the vector
and the identity matrix
.
> A:=matrix(2,2,[1,- 1,1, 3]);
> t:=matrix(2,1,[t1,t2]);
> E:=array(1..2,1..2,identity);
Next we find eigenvalues of
.
> eigenvalues(A);
Notice that the eigenvalue 2 is a repeated eigenvalue, which will yield only one independent solution. We find this eigenvector in the same way we did before.
> multiply(A-2*E,t);
> solve(-t1-t2=0,t2);
Hence one eigenvector is
which gives one independent solution
. We find a second solution as follows:
First solve the matrix equation
.
> multiply(A-2*E,t);
> solve({-t1-t2=1,t1+t2=-1},{t1,t2});
>
Set t1=-1 (It is the same value of t2 as in the eigenvector
.), and find t1. Thus one solution of the matrix equation is
. Now the second solution of the differential equation is
.