(%i1) |
kill(all)$ load(eigen)$ |
appendix:complex eigenvalues
[email protected],26/03/2017
see:
Lecture 26: Continuation: Repeated Real Eigenvalues
(%i2) | depends(x,t); |
simple example:
(%i4) |
p[1]:'diff(x[1],t)=x[1]+2*x[2]; p[2]:'diff(x[2],t)=-x[1]-x[2]; |
(%i6) |
M1:zeromatrix(2,2)$ for i:1 thru 2 do for j:1 thru 2 do M1[i,j]:coeff(part(p[i],2),x[j]); |
coef.Marix : 'p[i] , i=1..3'
(%i7) | M1; |
eigenvalues ,M2 '|A-lambda*I|=0'
I=matrix(M3)
(%i11) |
M2:zeromatrix(2,2)$ M3:zeromatrix(2,2)$ for i:1 thru 2 do M3[i,i]:1; for i:1 thru 2 do for j:1 thru 2 do M2[i,j]:M1[i,j]-lambda*M3[i,j]; |
(%i12) | M2; |
find :eigenvalues 'lambda'
(%i13) | p1:ratsimp(determinant(M2))=0; |
(%i18) |
p2:allroots(p1); p21:p2[1]; p22:p2[2]; p210:part(p21,2); p220:part(p22,2); |
(%i19) | p3:[vals,vecs]:eigenvectors(M1); |
(%i21) |
p4:vals[1]; p5:vecs; |
(%i23) |
p6:p5[1][1]; p7:p5[2][1]; |
solution 'system diff.equations':p[i],i=1,2,3
math: e^(i*t) = cos(t)+i*sin(t)
(%i25) |
p8:x[1]=c1*p7[1]*%e^(p210*t)+c2*p6[1]*%e^(p220*t); p9:x[2]=c1*p7[2]*%e^(p210*t)+c2*p6[2]*%e^(p220*t);; |
'x '(t)
1 1
realpart 'x '
1
(%i26) | p10:realpart(part(p8,2)); |
imaginairpart 'x '
1
(%i27) | p11:imagpart(part(p8,2)); |
'x '(t)
2
realpart 'x '
2
(%i28) | p12:realpart(part(p9,2)); |
imaginairpart 'x '
2
(%i29) | p13:imagpart(part(p9,2)); |
statement : imaginair numbers = realpart+%i*imagpart