how do I solve a 2nd order differential equation with multiple first derivatives
조회 수: 4 (최근 30일)
이전 댓글 표시
Can someone help me please and show me how do I use matlab to solve the following problem using matlab ??
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1229237/image.jpeg)
Thanks in advance.
Irad
댓글 수: 3
답변 (1개)
John D'Errico
2022년 12월 19일
편집: John D'Errico
2022년 12월 20일
As you have written it, this problem is unsolvable.
(Had you read the docs for a tool like ODE45, the basic procedure is explicitly described.) Typically one splits this into a system of TWO ordinary differential equations. For example, suppose we had a simple second order ODE, of the form
y' ' = f(x,y)
The trick is to introduce a second equation, and a second unknown function, I'll call it u(x), where we have u(x) = dy/dx. Now go back and look at the ODE. See what happens, remembering the derivative of u is just the second derivative of y.
u' = f(x,y)
y' = u
Do you see that now we have TWO equations, both of which are first order ODEs?
You will need initial conditions for both y(0) and u(0), but that would be expected. All is happy. You can now use ODE45, or whatever solver floats your boat.
In the case of your problem, you can do much the same thing. Create a new unknown for dx/dt. That gives you the second equation.
HOWEVER, there is a fundamental problem in this. You have also a time derivative of the variable m(t). Without another equation for dm/dt, there is no way to solve the problem.
Now you can probably formulate such a differential equation, since dm/dt is probably just the rate of change of mass of the rocket. (I'm guessing this is a rocket problem.) And you can surely write down how the mass changes with time, in terms of how propellant is used. Alternatively, you might know the explicit use of propellant with time. In that case, if you already know the function m(t), then just differentiate it, and substitute that form into the equation.
But as you have written it, there is no solution possible.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!