Runge–Kutta 4
📐 Definition
Section titled “📐 Definition”For with timestep , define
then update
Domain and Codomain
Section titled “Domain and Codomain”Applies to (or function spaces) with sufficiently smooth to support fourth-order truncation error. Output remains in the same space.
⚙️ Key Properties
Section titled “⚙️ Key Properties”Order and Local Error
Section titled “Order and Local Error”Classical RK4 is fourth-order accurate in time, with local truncation error .
Linear Stability (Test Equation)
Section titled “Linear Stability (Test Equation)”For the linear test equation , the stability polynomial is
RK4 is explicit, so stability imposes CFL-like timestep restrictions for many PDE semi-discretizations.
Four drift evaluations per step; no linear or nonlinear solves.
🎯 Special Cases and Limits
Section titled “🎯 Special Cases and Limits”As , RK4 converges to the exact solution under standard smoothness assumptions. For autonomous linear systems , the update corresponds to applying the degree-4 stability polynomial to for each eigenvalue .
🔗 Related Functions
Section titled “🔗 Related Functions”Compared to Crank–Nicolson, RK4 avoids implicit solves but requires smaller timesteps for stiff problems.
Usage in Oakfield
Section titled “Usage in Oakfield”Oakfield exposes RK4 as a built-in explicit integrator:
- Integrator name:
rk4(Lua:sim.sim_create_context_integrator(ctx, "rk4", {...})). - Optional adaptivity: when
adaptive = true, Oakfield compares an RK4 update against a cheaper Heun estimate to build an error norm for step acceptance. - Complex + stochastic support: works for real/complex primary fields and supports optional stochastic increments.
Historical Foundations
Section titled “Historical Foundations”📜 Development of Runge–Kutta Methods
Section titled “📜 Development of Runge–Kutta Methods”Runge and Kutta developed families of multi-stage explicit schemes in the late 19th and early 20th centuries, providing systematic ways to build higher-order integrators without higher derivatives.
🌍 Modern Perspective
Section titled “🌍 Modern Perspective”RK4 remains a widely used default explicit integrator due to its simplicity, accuracy per step, and predictable error behavior on smooth nonstiff dynamics.
📚 References
Section titled “📚 References”- Hairer, Nørsett, Wanner, Solving Ordinary Differential Equations I
- Butcher, Numerical Methods for Ordinary Differential Equations