What is the Runge-Kutta method and why are there so many variations of it?

617 views

What is the Runge-Kutta method and why are there so many variations of it?

In: Mathematics

Anonymous 0 Comments

Imagine you have a car with a broken odometer and you want to know how far it travels.

The simplest way of doing this is to use the speedometer and a stopwatch. You multiply the speed by the amount of time it travels and that tells you the distance. This is all you need if the car is going at a constant speed, but things become imprecise if the car starts changing its speed. You could check the speed every minute and recompute, or you could get a better result by checking ever 10 seconds, or a better result by checking every second, and so on. If you take this to the extreme of checking the speed infinitely frequently and multiplying each speed by a corresponding infinitely small duration then the result is again perfectly accurate, though of course doing anything infinitely many times is impossible in the real world.

That’s the concept of an integral in calculus. Sometimes it’s possible to use calculus to compute the exact value without having to do anything an infinite number of times, but for practical problems that’s often impossible. When exact values aren’t practical it’s instead necessary to turn to numerical methods like the speedometer/stopwatch example above. These replace complicated higher-level math with a huge pile of arithmetic and give an answer that’s close enough.

Runge-Kutta is a family of these numerical methods. The simplest form of Runge-Kutta is known as “Euler’s Method” and is what I described above. Here you compute the total change of a variable (the odometer) by accumulating the rate of change of that variable (the speedometer) multiplied by small durations (the stopwatch). This approach is simple, but it has the issue of sometimes introducing systematic biases. For example, if you used this method on a car that is speeding up for the entire duration of the test then you’d wind up underestimating how far it went. That’s because you check the speed at the start of a time slice but the car winds up accelerating over the duration of the slice, meaning the measurement is always an underestimate of the average speed during that time.

You could reduce that underestimate by just checking the speed more often. Higher-order Runge-Kutta methods offer a more elegant approach: they “check the speedometer” more often and use this to estimate the acceleration of the car, or the rate of change of the acceleration of the car (the “jerk”), and so on. This allows the numerical method to get closer to the correct value with less computation and often less bias in the error.