Runge–Kutta–Fehlberg 4(5)
📐 Definition
Section titled “📐 Definition”For and timestep , define
The fifth-order solution estimate is
and the embedded fourth-order estimate is
The local error estimate is .
Domain and Codomain
Section titled “Domain and Codomain”Applies to (or function spaces) with sufficiently smooth to support fifth-order truncation error. Outputs and lie in the same space.
⚙️ Key Properties
Section titled “⚙️ Key Properties”Embedded Error Estimate
Section titled “Embedded Error Estimate”The difference provides a cheap local error proxy that enables adaptive step-size control.
Adaptive Step Control (Typical Form)
Section titled “Adaptive Step Control (Typical Form)”A common controller selects a new step size using a normed tolerance test and
where the exponent reflects the scaling of the embedded local error estimate.
Cost and Stability
Section titled “Cost and Stability”RKF45 is explicit (no solves) and typically uses six drift evaluations per attempted step. Like other explicit Runge–Kutta schemes, stability restricts timesteps on stiff problems.
🎯 Special Cases and Limits
Section titled “🎯 Special Cases and Limits”For linear , both estimates reduce to applying the stability polynomials to . As , the fourth- and fifth-order estimates coincide and converge to the exact flow.
🔗 Related Functions
Section titled “🔗 Related Functions”Compared to classical RK4, RKF45 adds an embedded estimator for step-size control. Heun’s method is the two-stage analogue with lower order and no embedded pair.
Usage in Oakfield
Section titled “Usage in Oakfield”Oakfield exposes RKF45 as an adaptive built-in explicit integrator:
- Integrator name:
rkf45(Lua:sim.sim_create_context_integrator(ctx, "rkf45", {...})). - Always adaptive: Oakfield forces
adaptive = truefor RKF45 even if the caller requests a fixed step, since the method relies on embedded error control. - Complex + stochastic support: supports complex primary fields and optional stochastic increments after each accepted step.
Historical Foundations
Section titled “Historical Foundations”📜 Embedded Runge–Kutta Pairs
Section titled “📜 Embedded Runge–Kutta Pairs”Fehlberg’s embedded 4(5) construction provided a practical way to estimate local error and adapt step sizes without extra drift evaluations, helping popularize adaptive explicit solvers.
🌍 Modern Perspective
Section titled “🌍 Modern Perspective”Embedded Runge–Kutta pairs (including RKF-type and Dormand–Prince variants) are now standard workhorses for adaptive nonstiff ODE integration.
📚 References
Section titled “📚 References”- Hairer, Nørsett, Wanner, Solving Ordinary Differential Equations I
- Fehlberg, Low-Order Classical Runge-Kutta Formulas with Stepsize Control (NASA TR R-315)