Every time a video game drops a ball, a spacecraft planner traces a trajectory, or a weather model ticks forward an hour, a computer must answer the same question: given where things are now and the rule for how they change, where will they be a moment later?
That rule is a differential equation — it says "the velocity changes at this rate" or "the temperature cools at this rate." The trouble is that real rates depend on position, and position changes as you move. Follow the slope at the start and you overshoot; the path curves away from you.
The naive fix is Euler's method: take tiny steps, update position using the slope at the start of each step. Small enough steps and it works — but shrinking the step size costs proportionally more computation. You need to be smarter.
Runge-Kutta methods are that smarter idea. Instead of sampling the slope once per step, sample it several times — at the start, the midpoint, the end — then blend those samples into a single high-quality estimate. The classic fourth-order method (RK4), published by mathematicians Carl Runge and Wilhelm Kutta around 1900, gets the answer right to the fourth power of the step size. Halve the step, and the error drops by a factor of 16, not 2. It is the undisputed workhorse of numerical simulation.
Comments
Loading comments...