how do I solve a 2nd order differential equation with multiple first derivatives
3 ビュー (過去 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 件のコメント
回答 (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!