summaryrefslogtreecommitdiff
path: root/62/CH7/EX7.47/ex_7_47.sce
blob: 6aa12c5c0f4a468e4678c76feee25fdcd6aadbb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
clc;
A=[2 1 0;0 2 1;0 0 2];
V=[2 0 0;0 2 0; 0 0 2];
N=[0 1 0;0 0 1;0 0 0];
z=N*N*N;
if z==0 then
    disp("N is a nilpotent of index 3");
else
    disp("N is not nilpotent")
end
if V*N==N*V then
    disp("V and N commute")
else
    disp("V and N dont commute")
end
syms t
//e^(A*t)=e^(v*t)*e^(N*t)
e=spec(V);//eigen values
b2=t^2*%e^(e(3)*t);
b1=t*%e^(e(2)*t)-b2*2*e(2);
b0=%e^(e(1)*t)-b1*e(1)-b2*e(1)^2;
eVt=b0*eye(V)+b1*V+b2*V^2;
disp(eVt,"e^(Vt)")
e=spec(N);//eigen values
b2=t^2*%e^(e(3)*t);
b1=t*%e^(e(2)*t)-b2*2*e(2);
b0=%e^(e(1)*t)-b1*e(1)-b2*e(1)^2;
eNt=b0*eye(N)+b1*N+b2*N^2;
disp(eNt,"e^(Nt)")
eAt=eVt*eNt;
disp(eAt,"e^(A*t)=")