how do I solve a 2nd order differential equation with multiple first derivatives

19 次查看(过去 30 天)
Can someone help me please and show me how do I use matlab to solve the following problem using matlab ??
Thanks in advance.
Irad
  3 个评论
Torsten
Torsten 2022-12-13
编辑:Torsten 2022-12-13
You need a second differential equation for m (or a time-dependent analytical function).

请先登录,再进行评论。

回答(1 个)

John D'Errico
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.

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by