- 想用两种方法求解e^A 第一种是直接输入e^A
- 第二种是按照求解步骤进行求解 但是按照第二种方法求出的答案不对啊 请问是怎么回事
>> clear all
>> syms e %声明一个变量
>> A=[-7 -7 5; -8 -8 -5; 0 -5 0]
A =
-7 -7 5
-8 -8 -5
0 -5 0
%
先调用命令求解
e^A
>> EA=e^A
EA =
[ 2/(5*e^5) + e^5/5 + 2/(5*e^15), 2/(5*e^15) - (3*e^5)/10 - 1/(10*e^5), e^5/2 - 1/(2*e^5)]
[ 3/(5*e^15) - e^5/5 - 2/(5*e^5) , 1/(10*e^5) + (3*e^5)/10 + 3/(5*e^15), 1/(2*e^5) - e^5/2]
[ e^5/5 - 2/(5*e^5) + 1/(5*e^15), 1/(10*e^5) - (3*e^5)/10 + 1/(5*e^15), 1/(2*e^5) + e^5/2]
%
分步求解
e^A
>> lamad=eig(A) %求解特征值,用以决定对角阵相似还是约旦型相似
lamad =
-15
-5
5
>> [V D]=eig(A) %求解特征值与特征向量
V =
0.5345 -0.5774 0.5774
0.8018 0.5774 -0.5774
0.2673 0.5774 0.5774
D =
-15.0000 0 0
0 -5.0000 0
0 0 5.0000
>> P=V %P为特征矩阵
P =
0.5345 -0.5774 0.5774
0.8018 0.5774 -0.5774
0.2673 0.5774 0.5774
>> Q=inv(P) %inv(P)求解P的逆矩阵
Q =
0.7483 0.7483 0
-0.6928 0.1732 0.8660
0.3464 -0.5196 0.8660
>> ED=e^D
ED =
[1/e^15, 0, 0]
[ 0, 1/e^5, 0]
[ 0, 0, e^5]
>> DA=P*ED*Q
DA =
[ 2/(5*e^5) + e^5/5 +(2^(1/2)*7^(1/2)*14^(1/2))/(35*e^15), (2^(1/2)*7^(1/2)*14^(1/2))/(35*e^15) -(3*e^5)/10 - 1/(10*e^5), e^5/2 - 1/(2*e^5)] [ 3/(5*e^15) - e^5/5 -2/(5*e^5), 1/(10*e^5) + (3*e^5)/10 + 3/(5*e^15), 1/(2*e^5) - e^5/2 ]
[ e^5/5 - 2/(5*e^5) + 1/(5*e^15), 1/(10*e^5) -(3*e^5)/10 + 1/(5*e^15), 1/(2*e^5) + e^5/2]
0