The classical Runge-Kutta combines four slopes per step to reach order 4. Full derivation from Simpson's rule and direct extension to ODE systems.
Four slopes per step
The classical fourth-order Runge-Kutta method evaluates the slope f four times per step: once at the start, twice at the midpoint and once at the end, each using the previous one to estimate where to evaluate:
Classical fourth-order Runge-Kutta (RK4).RK4 takes one slope at the start, two midpoint estimates and one final slope; the weighted combination imitates Simpson on the integral form.
Derivation
The 1,2,2,1 structure with denominator 6 comes from the weights of Simpson's rule applied to the integral form of the IVP.
Problem: we know neither yk+21 nor yk+1. Runge-Kutta's solution is to estimate them with chained internal slopes, each built by advancing with the previous one:
Simpson's central slope is approximated by averaging the two midpoint estimates, and the final one by k4:
f(tk+21,yk+21)≈2k2+k3,f(tk+1,yk+1)≈k4
Substituting into Simpson, the midpoint weight 4 splits as 4⋅2k2+k3=2k2+2k3, and the classical RK4 appears with its 1,2,2,1 weights:
yk+1=yk+6h(k1+2k2+2k3+k4)
A Taylor analysis analogous to Heun's (but up to fourth order) confirms that these internal approximations preserve the O(h5) local error, so the method is fourth order.
Order 4 and cost
The price of order 4 is four evaluations of f per step, versus one for Euler. When evaluating f is expensive, multistep methods like Adams-Bashforth reuse already-computed slopes and reach high order with a single new evaluation per step; in exchange they need a one-step method such as RK4 to provide their starting values.
ODE systems
The extension to first-order systems is immediate: replace yk and f by their vector versions Yk and F, and the four slopes K1,…,K4 become vectors. With Euler, for instance, Yk+1=Yk+hF(tk,Yk). The SIR model exercise compares Euler, Heun and RK4 on the same system, and the hand-computation exercise integrates a second-order equation reduced to a system.