http://fourier.eng.hmc.edu/e176/lectures/NM/node42.html
Example
Solve the famous 2nd order constant-coefficient ordinary differential equation
with zero initial conditions . Here we assume , , and , and a step input . Find the numerical solution from to in steps (step size , using each of the following methods:
- Euler's method
- Modified Euler's method
- Runge-Kutta 2
- Runge-Kutta 4
where
The results of these numerical integral methods and the ground truth closed-form solution are compared as shown below for three different step sizes: 0.5 (left), 0.05 (middle), and 0.01 (right):
No hay comentarios:
Publicar un comentario