2.4.4 Euler's Method for Systems of Differential Equations
lost-contact.mit.edu › afs › nadaThe function eulers_method_2x2_plot will do this; in order to use it, we need to define functions f and g which takes one argument with three coordinates: (t, x, y). sage: f = lambda z: z[2] # f(t,x,y) = y sage: g = lambda z: -sin(z[1]) # g(t,x,y) = -sin(x) sage: P = eulers_method_2x2_plot(f,g, 0.0, 0.75, 0.0, 0.1, 1.0)
Numerical Methods for Second-Order ODE
sites.science.oregonstate.edu › math › homeConsider the second-order ode: Suppose the goal is solve the problem on the interval [t_0,T]. The following list summarizes the steps in solving the problem by Euler' method. Convert the second-order ode into two first-order ode. Let v=y'. Then the two odes are Discretize the interval [t_0,T]. Pick a bunch of points t_0<t_1<t_2<...<t_N=T.