Borrar filtros
Borrar filtros

Help solving linear ordinary differential equation that involves matrix

36 visualizaciones (últimos 30 días)
Emma
Emma el 16 de Jul. de 2024 a las 16:19
Editada: John D'Errico el 16 de Jul. de 2024 a las 23:11
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.

Respuestas (1)

John D'Errico
John D'Errico el 16 de Jul. de 2024 a las 21:34
Editada: John D'Errico el 16 de Jul. de 2024 a las 23:11
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)
xsol = struct with fields:
x2: (3*exp(0.5000*t*(a + (a^2 - 2*a + 25)^(1/2) + 1)))/(a^2 - 2*a + 25)^0.5000 - (3*exp(0.5000*t*(a - (a^2 - 2*a + 25)^(1/2) + 1)))/(a^2 - 2*a + 25)^0.5000 x1: (3*exp(0.5000*t*(a + (a^2 - 2*a + 25)^(1/2) + 1))*(0.1667*(a^2 - 2*a + 25)^(1/2) - 0.1667*a + 0.1667))/(a^2 - 2*a + 25)^0.5000 + (3*exp(0.5000*t*(a - (a^2 - 2*a + 25)^(...
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.

Etiquetas

Productos


Versión

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by