why expm dose not show parameters?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Yufei Cao
el 22 de Mayo de 2021
Editada: John D'Errico
el 22 de Mayo de 2021
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?
0 comentarios
Respuesta aceptada
John D'Errico
el 22 de Mayo de 2021
Editada: John D'Errico
el 22 de Mayo de 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)
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)
Coincidentally, compare that to what eig produces. You can see this does reproduce A, as
S*J*inv(S)
The matrix exponential, expm(A*t) is now given as
S*diag(exp(diag(J)*t))*inv(S)
Happily, that is mathematically identical to what expm produces,,,
expm(A*t)
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Linear Algebra en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!