MathLabs
TheoremProved

Order of accuracy of the classical Runge–Kutta method

Statement

The classical fourth-order Runge–Kutta method, defined by the stages k1=f(tn,yn)k_1 = f(t_n, y_n), k2=f(tn+h2,yn+h2k1)k_2 = f\left(t_n+\frac{h}{2}, y_n+\frac{h}{2}k_1\right), k3=f(tn+h2,yn+h2k2)k_3 = f\left(t_n+\frac{h}{2}, y_n+\frac{h}{2}k_2\right), k4=f(tn+h,yn+hk3)k_4 = f(t_n+h, y_n+hk_3) and update yn+1=yn+h6(k1+2k2+2k3+k4)y_{n+1} = y_n + \frac{h}{6}(k_1+2k_2+2k_3+k_4), has local truncation error O(h5)O(h^5) per step and, under the same Lipschitz assumption as before, global error O(h4)O(h^4) after nn steps.

Why is it true?

RK4 evaluates the slope four times per step at cleverly chosen intermediate points instead of once, and averages them with weights 1,2,2,11,2,2,1 (out of 66). This extra work buys three more orders of accuracy compared to Euler's method: matching the Taylor expansion of the true solution through the h4h^4 term, instead of stopping after the linear term.

Proof sketch

Expand each stage in a Taylor series around (tn,yn)(t_n, y_n). Since k1=f(tn,yn)=y′(tn)k_1=f(t_n,y_n)=y'(t_n), and k2,k3k_2, k_3 evaluate ff at the midpoint using yny_n shifted by half a step in the direction of an earlier stage, substituting the chain rule for y′=fy'=f, y′′=ft+fyfy''=f_t+f_yf, and y′′′=ftt+2ftyf+fyyf2+fy(ft+fyf)y'''=f_{tt}+2f_{ty}f+f_{yy}f^2+f_y(f_t+f_yf) into each kik_i produces four polynomials in hh agreeing with y′(tn),y′′(tn),y′′′(tn)y'(t_n), y''(t_n), y'''(t_n) up to the orders that each stage can see.

Forming the weighted combination 16(k1+2k2+2k3+k4)\frac{1}{6}(k_1+2k_2+2k_3+k_4) and multiplying by hh, the coefficients of h1,h2,h3h^1, h^2, h^3 and h4h^4 in this sum are exactly the coefficients of the Taylor expansion y(tn+h)=y(tn)+hy′(tn)+h22y′′(tn)+h36y′′′(tn)+h424y(4)(tn)+⋯y(t_n+h) = y(t_n) + hy'(t_n) + \frac{h^2}{2}y''(t_n) + \frac{h^3}{6}y'''(t_n) + \frac{h^4}{24}y^{(4)}(t_n) + \cdots through the h4h^4 term — this is precisely the classical set of order conditions that the coefficients c=(0,12,12,1)c=(0,\frac12,\frac12,1) and b=(16,13,13,16)b=(\frac16,\frac13,\frac13,\frac16) of the RK4 tableau were chosen to satisfy.

Because the two series agree through h4h^4, the first term where they can differ is the O(h5)O(h^5) term, so the local truncation error is O(h5)O(h^5) per step. As in the Euler case, telescoping these local errors over the n≈(T−t0)/hn\approx (T-t_0)/h steps needed to reach a fixed time using the Lipschitz condition on ff loses exactly one power of hh, giving a global error of O(h4)O(h^4).

Topics that use this theorem

Step-by-step proofs

No step-by-step proof yet for this theorem.

References

  1. J. C. Butcher (2016). Numerical Methods for Ordinary Differential Equations
  2. E. Hairer, S. P. Norsett, G. Wanner (1993). Solving Ordinary Differential Equations I: Nonstiff Problems