Mathematics · also Computer engineering, Research methodsLevel 5 · Research Engineer
Numerical integration of ODEs: Euler, RK4 and stiffness
Most differential equations are solved numerically by stepping forward in time. Explicit Euler uses the slope at the start of each step and has global error proportional to the step size h. The classical fourth-order Runge-Kutta method samples the slope four times per step and has global error proportional to h to the fourth power, so halving the step cuts the error about sixteen times. A convergence study checks this order directly. Methods also differ in structure: explicit Euler steadily adds energy to an undamped oscillator while semi-implicit Euler keeps it bounded. Stiff problems contain very fast decaying modes that force explicit methods to take tiny steps purely to stay stable.
Why it mattersA spacecraft trajectory or a robot simulation is only trustworthy if its integrator's error has been measured with a convergence study.