- Introduced by
- Carl Runge and Martin Kutta
- Year
- 1895–1901
- Type
- Numerical integration scheme
- Family
- Explicit Multistage
What does it do?
The Runge-Kutta methods are a family of explicit one-step numerical schemes for solving ordinary differential equations (ODEs).
Carl Runge published the basic idea in 1895, and Martin Kutta's 1901 paper is the other early reference for the family. The classical fourth-order member, RK4, is a widely used fixed-step scheme for non-stiff initial value problems.
The intuition behind the method
A simple Euler step uses only the slope at the start of the step. Runge-Kutta instead evaluates the slope at several points inside the step, including a midpoint and the endpoint, and combines these slopes with fixed weights. The combination matches more terms of the exact solution's Taylor expansion, so each step is more accurate than a single-slope step of the same size. RK4 reaches fourth-order global accuracy, meaning the global error scales with h^4, while using four evaluations of the right-hand side per step.
History
Carl Runge published the basic approach in 1895 in Mathematische Annalen. Martin Kutta's 1901 paper in Zeitschrift für Mathematik und Physik is cited as the second early reference for these schemes. John Butcher's book (2008) covers the order conditions and stability analysis of Runge-Kutta methods, which provide the systematic framework for these schemes.
When to use it
Choose RK4 or another explicit Runge-Kutta scheme when the problem is an initial value problem dy/dt = f(t, y) with a smooth right-hand side that can be evaluated cheaply, the system is non-stiff, and moderate-to-high accuracy is needed without solving equations at each step. It suits many physics, chemistry and engineering time-evolution problems where the relevant time scale is known. Do not use fixed-step RK4 when the system is stiff, meaning it has widely separated time scales that force very small steps for stability; implicit methods are the usual alternative there. Also avoid it for long conservative simulations, such as Hamiltonian systems, where the energy or other invariants must be preserved; symplectic integrators such as the one in the related verlet-integration page are designed for that. If the right-hand side is discontinuous, the fourth-order accuracy is not guaranteed and event handling is needed.
Limitations and considerations
- The stability region of explicit Runge-Kutta schemes is bounded, so stiff problems force very small steps and the method becomes impractical.
- The basic fixed-step form does not adapt to regions where the solution changes rapidly; adaptive variants are needed for that.
- Fourth-order accuracy assumes a sufficiently smooth right-hand side and solution; the order is lost when the solution has kinks or discontinuities.
- Standard RK4 does not preserve invariants such as energy, so errors can accumulate over long integrations of conservative systems.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Four evaluations of f per step give fourth-order global accuracy, which makes the scheme efficient for smooth non-stiff problems.
- The method is explicit: each stage is a direct evaluation of f, so no linear or nonlinear system must be solved at each step.
- For non-stiff problems, the step size is usually limited by accuracy rather than by stability, which keeps fixed-step RK4 practical.
- Embedded adaptive variants such as Runge-Kutta-Fehlberg and Dormand-Prince pair two orders in one set of stages, giving a local error estimate with few additional evaluations.
Applications
- Integrating orbital motion and spacecraft trajectories over moderate time spans, where the equations are smooth and non-stiff
- Integrating chemical rate equations and enzyme kinetics when the rate constants do not span widely separated time scales
- Time-stepping non-stiff ODE systems that arise from thermal or fluid models after spatial discretisation
- Simulating population dynamics and predator-prey models in ecology
How it works
How it works
Specify the initial value y(t₀), the step size h, and the right-hand side f(t, y) of the system dy/dt = f(t, y). The method is explicit, so each step requires only evaluations of f.
Within the step from t to t+h, compute four slope estimates. k₁ = f(tₙ, yₙ) is evaluated at the start point. k₂ = f(tₙ + h/2, yₙ + (h/2)k₁) and k₃ = f(tₙ + h/2, yₙ + (h/2)k₂) are evaluated at the midpoint, each using the previous slope to estimate the state there. k₄ = f(tₙ + h, yₙ + h·k₃) is evaluated at the endpoint. Each stage uses the slopes computed before it, so the four evaluations are performed in sequence.
Advance the solution with the weighted average y_{n+1} = y_n + (h/6)(k₁ + 2k₂ + 2k₃ + k₄). The weights 1:2:2:1 are the coefficients that match the Taylor expansion of the exact solution through fourth order.
Estimate the local error, for example by Richardson extrapolation or by comparing one step of size h with two steps of size h/2. Accept the step if the error is within tolerance; otherwise reduce h and repeat. Fixed-step RK4 applies this check only when it is used deliberately, as in step-doubling tests.
Common pitfalls
- Choosing h beyond the stability limit for the dominant eigenvalue produces growing, oscillatory solutions that can be mistaken for physical behaviour; check convergence by halving h and comparing results.
- Treating a stiff problem as non-stiff leads to instability; examine the magnitudes of the eigenvalues of the Jacobian of f before choosing RK4.
- Expecting fourth-order accuracy from a non-smooth right-hand side or a solution with sharp corners; the order is not achieved and step-size control or event location may be needed.
- Running long conservative simulations with RK4 without monitoring invariants; small per-step errors can accumulate, and a structure-preserving method may be more suitable.
Frequently asked questions
Why does RK4 use those specific weights (1:2:2:1)?
The weights come from matching the terms of the Taylor expansion of the exact solution up to fourth order. This choice makes the local truncation error O(h^5), so the accumulated global error is O(h^4).
When should I use adaptive step-size RK instead of fixed-step RK?
Use adaptive methods (Runge-Kutta-Fehlberg, Dormand-Prince) when the solution has regions of rapid change that need small steps alongside smooth regions where larger steps suffice. This saves computation while maintaining error control.
What is the stability region of RK4, and why does it matter?
RK4 is stable for complex values z = λh inside a bounded region of the complex plane. Along the negative real axis this region extends to roughly 2.8, so |λh| must stay below that value; the region is not a disk of that radius. For stiff systems with large |λ|, the required h may be too small for practical use, and implicit methods such as backward Euler, which have much larger stability regions, are often preferred.
How do I choose the time step h?
Base the choice on the time scale of the solution and use step doubling: run with h and with h/2, and compare the results at the same output times. If the difference is below your tolerance, h is adequate; otherwise halve h and repeat. No single general formula is given here, because the appropriate h depends on the smoothness of the problem and the required accuracy.
Sources
Runge, C. (1895). Ueber die numerische Auflösung von Differentialgleichungen. Mathematische Annalen, 46(2), 167–178.
Open DOI referenceKutta, M. W. (1901). Beitrag zur näherungsweisen Integration totaler Differentialgleichungen. Zeitschrift für Mathematik und Physik, 46, 435–453.
Open publication referenceButcher, J. C. (2008). Numerical Methods for Ordinary Differential Equations (2nd ed.). Wiley.
Open DOI reference