Numerical ODEs · Definition

Runge-Kutta methods

numerical methodsnumerical odes

Before you start you need to know

Euler advances with a single slope evaluation per step, which limits its accuracy. Runge-Kutta improves the approximation by combining several slopes computed at intermediate points.

Definition

Runge-Kutta methods are families of one-step numerical schemes that approximate the solution of an initial value problem by evaluating the function \(f\) at several intermediate points within each step.

\[y_{n+1}=y_n+h\sum_{i=1}^{s} b_i k_i\]

An \(s\)-stage Runge-Kutta method is defined by coefficients \(a_{ij}\), \(b_i\) and \(c_i\), with \(k_i=f(t_n+c_ih,\ y_n+h\sum_j a_{ij}k_j)\). If the coefficients satisfy the order conditions, the local error is \(O(h^{p+1})\) and the global error is \(O(h^p)\). The classical fourth-order method uses four stages and is the most widely used in practice.

For \(y'=y\), \(y(0)=1\) and \(h=0.1\), the RK4 method gives \(y_1\approx 1.105171\), very close to \(e^{0.1}\), while Euler gives \(1.1\). This comparison shows how more evaluations per step reduce error without changing \(h\). Stages are computed in order, because in explicit methods each \(k_i\) depends on the previous ones.

A typical mistake is confusing the order of the method with the number of stages, since a four-stage method is not necessarily fourth order. Another common error is using \(y_n\) instead of \(y_n+h\sum a_{ij}k_j\) when evaluating \(k_i\). Checking the order conditions avoids both errors.

Think about it

Why does a four-stage method not automatically have fourth order?

Because the order depends on the conditions satisfied by \(a_{ij}\), \(b_i\) and \(c_i\); the number of stages only sets an upper bound on the achievable order.

Exercises 10

References

  • Richard L. Burden, J. Douglas Faires, Annette M. Burden, Numerical Analysis, 10th edition, Cengage Learning, 2016.
  • Lloyd N. Trefethen, David Bau III, Numerical Linear Algebra, 1st edition, SIAM, 1997.