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

3 visualizaciones (últimos 30 días)
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 comentarios
Torsten
Torsten el 13 de Dic. de 2022
Editada: Torsten el 13 de Dic. de 2022
You need a second differential equation for m (or a time-dependent analytical function).

Iniciar sesión para comentar.

Respuestas (1)

John D'Errico
John D'Errico el 19 de Dic. de 2022
Editada: John D'Errico el 20 de Dic. de 2022
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.

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by