why expm dose not show parameters?

2 次查看(过去 30 天)
I use expm to symbolically compute martix exponential .
syms x [1 2]
syms t
A = [-x(1)-x(2) x(1);
0 -x(2)];
B = expm(A*t)
Matlab gives
B =
[exp(- t*x1 - t*x2), exp(-t*x2) - exp(- t*x1 - t*x2)]
[ 0, exp(-t*x2)]
but I find B(1,2) is lack of a constant.
Why this happen?

采纳的回答

John D'Errico
John D'Errico 2021-5-22
编辑:John D'Errico 2021-5-22
A is a classic example of a defective matrix.
As such, it cannot be diagonalized.
syms x [1 2]
syms t
A = [-x(1)-x(2) x(1);
0 -x(2)];
[V,D] = eig(A)
V = 
D = 
As a reflection of the defective nature of A, we see the eigenvectors generated by eig (the columns of V) are not linearly independent.
In the latter link, it even shows how to compute the matrix exponential, based on the Jordan canonical form. Thus we decompose A into the form S*J*inv(S).
[S,J] = jordan(A)
S = 
J = 
Coincidentally, compare that to what eig produces. You can see this does reproduce A, as
S*J*inv(S)
ans = 
The matrix exponential, expm(A*t) is now given as
S*diag(exp(diag(J)*t))*inv(S)
ans = 
Happily, that is mathematically identical to what expm produces,,,
expm(A*t)
ans = 
What you expected to see, I do not know. Let me guess.... I think you computed B(1,2) as:
exp(-t*x2)*(1 - exp(-t*x1))
That is, factoring out the exp(-t*x2). And for some reason, you do not think this is mathematically identical to the other forms found. In fact, of course, it is.
Another possibility is since a matrix exponential is often used to solve a system of differential equations, you expect to see an undetermined constant in there? You did comment that expm did not show some (unspecified) parameters. Of course that is not so. That is no more true than that for scalar x, exp(x*t) should have an undetermined constant in it, even though the exponential function also often appears in the solution of a differential equation.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by