Help solving linear ordinary differential equation that involves matrix

조회 수: 6 (최근 30일)
Emma 2024년 7월 16일
편집: John D'Errico 2024년 7월 16일
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이전 댓글 -1개 표시이전 댓글 -1개 숨기기
Torsten 2024년 7월 16일
What is y ?

댓글을 달려면 로그인하십시오.

답변 (1개)

John D'Errico 2024년 7월 16일
편집: John D'Errico 2024년 7월 16일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Equation Solving에 대해 자세히 알아보기

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by