how to solve a second order differential equation using Euler's method?
Mostrar comentarios más antiguos
How to solve a second order differential equation (boundary value problem) using Euler's Method without using inbuilt matlab functions such as ode45?
2 comentarios
James Tursa
el 17 de Abr. de 2018
What instructions were you given in class? What have you done so far? What specific problems are you having with your code?
Remston Martis
el 18 de Abr. de 2018
Editada: Remston Martis
el 18 de Abr. de 2018
Respuesta aceptada
Más respuestas (1)
Jan
el 18 de Abr. de 2018
It is worth to be nitpicking:
% x0 is the initial guess
No, x0 is the initial value of the trajectory when you consider the integration. To solve a boundary value problem, you need an additional layer around the integration: e.g. a single shooting or multiple shooting method. Then this x0 is the initial guess of the shooting method.
To solve your problem, convert the 2nd order equation to a system of two equations of order 1. Then y has 2 components: The initial position and velocity. Converting higher order equations to order 1 is the first step for almost all integrators.
1 comentario
Remston Martis
el 18 de Abr. de 2018
Categorías
Más información sobre Linear Algebra 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!