Solving a 2nd order ODE with the Euler method
www.math.umd.edu › ~petersd › 460We consider an initial value problem for a 2nd order ODE: and we want to find the solution y(t) for t in [0,4]. We first have to rewrite this as a 1st order system: Let and , then we obtain. Now we can define a vector valued function f(t,y) and an initial vector y0. We use ode45 to find the solution of the initial value problem.