Help solving linear ordinary differential equation that involves matrix
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I need to find the general solution to a linear ordinary differential equation that involves a matrix. The problem is in the form x'(t) = [ matrix] x(t). When I try to solve, it gives me a solution for x and y but neither one is correct. It needs to be in the form c1(e^t)[matrix] + c2(e^t)[matrix]. thank you.
1 commentaire
Réponses (1)
John D'Errico
le 16 Juil 2024
Modifié(e) : John D'Errico
le 16 Juil 2024
I would postulate that in fact, it DOES give the correct solution, at least to the problem you posed, but that it is not in the form you may want to see. This is a huge difference. Two expressions can be mathematically identical, yet appear different. That does not make one incorrect. Merely unexpected.
If you want help however, you need to show what you did, as your question is not clear. What for example, is y, since you defined the problem in terms of x, which as you wrote it, must be a vector of unknowns.
I conjecture you are doing something (at least equivalent) to this:
syms x1(t) x2(t)
x = [x1;x2];
syms a
A = [1 2;3 a];
xsol = dsolve(diff(x,t) == A*x,x1(0) == 1,x2(0) == 0)
Now, the fact is, you probably learned in a class somewhere, that we can write the solution in terms of a matrix exponential which is the general form you showed in your question. And in fact, after some algebra, it would reduce to the same thing as what dsolve produced, but as I said, it looks different from what dsolve returns. That does not make it incorrect however, merely unexpected. The solution is still entirely valid. We could even, with some minor algebra of our own, convert the result that dsolve returned into a matrix exponential form. And, yes, the matrix exponential you want to see probably seems a cleaner way to represent the solution. Such is life.
0 commentaires
Voir également
Catégories
En savoir plus sur Equation Solving dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!