How graph second order differential equation with Matlab?
Mostrar comentarios más antiguos
Looking to get some help on how to use matlab to solve and plot the following equation, all help is appreciated! Thank You! I haven't used matlab in 2 years very rusty, image is reference to original problem statement.
x^2*y"-7xy'+16y=0 & y*y"=2y'^2
1 comentario
Rena Berman
el 12 de Dic. de 2019
(Answers Dev) Restored edit
Respuestas (1)
Star Strider
el 18 de En. de 2018
0 votos
Do them the same as you did before. Define ‘Dy’ and ‘D2y’, then substitute them for y' and y" respectively. Use both of them in your dsolve call, separated by commas, and include the requisite initial conditions, as I did. See the dsolve documentation for details,
2 comentarios
jake thompson
el 18 de En. de 2018
Star Strider
el 18 de En. de 2018
I didn’t take a close look at it. You have two equations, so you need to code both of them.
It appears to be a system of nonlinear differential equations. Most nonlinear differential equations do not have analytic solutions. It would be necessary to solve them numerically.
The best way to do that is to use the odeToVectorFiled function first, then matlabFunction on that result, to get an anonymous function to integrate with one of the numerical ODE solvers, such as ode45.
Prototype code for that:
[V,S] = odeToVectorField(ode1,ode2)
M = matlabFunction(V,'vars',{'t','Y'})
You would then use ‘M’ with ode45.
Categorías
Más información sobre Equation Solving en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!