Equation
y'' + y = 0
Simple harmonic motion. Exact: y=cos(t). RK4 nearly perfect, Euler spirals outward.
Simple harmonic motion. Exact: y=cos(t). RK4 nearly perfect, Euler spirals outward.
Parameters
Legend
Exact / Reference
Euler (1st order)
Heun/RK2 (2nd order)
RK4 (4th order)
Error at t=T
| Euler: | - |
| RK2: | - |
| RK4: | - |