why expm dose not show parameters?

2 views (last 30 days)
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?

Accepted Answer

John D'Errico
John D'Errico on 22 May 2021
Edited: John D'Errico on 22 May 2021
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.

More Answers (0)

Categories

Find more on Linear Algebra in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!