If a scaled local error estimator behaves as with approximately unchanged error scale, the displayed update targets a fixed local level. A safety factor aims below the acceptance boundary. For an embedded Runge-Kutta pair with order of a numerical method for the accepted output and for the companion formula, the difference generally has ; for the actual unscaled local truncation error of an order- formula, . The exponent belongs to the quantity being controlled. Dividing the defect by changes that exponent. This follows by solving for the next step.[ref]
Rejecting a trial means retrying from the same accepted time and state, with a smaller step. Advancing time or retaining the rejected output would change the initial value problem being approximated. Minimum and maximum change factors prevent extreme updates; a zero estimate requires finite capped growth. After acceptance, cap the next step at the remaining interval length. Detect a step that cannot advance time in floating-point arithmetic, and report failure rather than an endless retry. An adaptive step-size controller can use earlier estimates to smooth step sequences, but the memoryless rule here is sufficient to explain acceptance and rejection.[ref]
Butcher tableau Created 2026-09-28 Updated 2026-10-14
A Butcher tableau records a Runge-Kutta method's stage matrix , time nodes , and output weights in the block array
Read row above the line as the recipe for Runge-Kutta stage : the left entry gives , and the right entries give the coefficients in . Below the line, weights slope in the final update. Zeros on and above the diagonal identify an Explicit Runge-Kutta method. For the internally consistent convention, row sums of equal ; first-order consistency of a numerical method also requires . An embedded Runge-Kutta pair adds another weight row while retaining .
Embedded Runge-Kutta pair Created 2026-10-14 Updated 2026-10-14
Two Runge-Kutta methods share a stage matrix and nodes but use different output weights. An order- and order- pair with gives an output difference generally of order , estimating the lower-order defect. Shared stage evaluations reduce the cost. The adaptive step-size controller exponent must reflect this estimator order, rather than blindly the higher reported solution order.
Using the slope convention for Runge-Kutta stages, an embedded Runge-Kutta pair computes
Its Butcher tableau has two output rows, and . Evaluating is often the expensive part of solving an ordinary differential equation; after the shared slopes have been computed, the extra row needs only another linear combination.[ref]
Write for the exact endpoint from the current numerical state, and define signed local defects and . Then . If and , with , the difference reproduces the leading lower-order defect. It does not reproduce the leading higher-order defect. Here the powers use big O notation and a smooth Taylor expansion; a vanishing leading coefficient or accidental cancellation can make the estimate misleading.
A common choice accepts after testing with absolute and relative error tolerances. With the scale approximately unchanged on a retry, the adaptive step-size controller uses exponent . Accepting a better endpoint does not change the power in the quantity being tested. The Euler-Heun embedded pair makes this visible without a large coefficient table.[ref]
Error control for ODE solvers Created 2026-10-14 Updated 2026-10-14
Error control selects discretization parameters and checks approximations against requested accuracy. Local error estimators, absolute and relative error tolerances and an adaptive step-size controller provide practical local control. Propagation of defects determines the global error, while stiffness, roundoff error and algebraic-solve accuracy impose additional limits.
For an ordinary differential equation, the practical loop is to propose a step, form a local error estimator, scale it by absolute and relative error tolerances, and accept or retry before choosing the next step. An embedded Runge-Kutta pair supplies two endpoints from shared Runge-Kutta stages, making this extra accuracy check inexpensive. The Euler-Heun embedded pair below exposes the distinction between the accepted formula's order of a numerical method and the estimator's step exponent; its Adaptive Euler-Heun integration of exponential growth shows accepted local tests alongside accumulated global error.
Local error estimator 2026-10-14
A local error estimator approximates a numerical step's defect from the exact solution starting at the same input. Differences between formulas estimate error only after their asymptotic orders and constants are accounted for. Step-doubling error estimation, an embedded Runge-Kutta pair and predictor-corrector error estimation are common constructions. They do not by themselves bound accumulated global error.
Let be the exact endpoint of the ordinary differential equation started at the numerical value , and let be the candidate numerical endpoint. The signed local defect being estimated is . In contrast, actual global error compares with the solution of the original initial value problem, including all previous steps. The local truncation error convention inserts original exact data instead. These starting-value distinctions matter even when the same formula is used for every step. A practical local error estimator also relies on a smooth Taylor expansion; a small difference can reflect accidental cancellation rather than a rigorous upper bound.
An ODE solver must distinguish the error made by one step started from exact data from the error accumulated along the computed trajectory. For an order- one-step map , define the exact-start defect . If the step map is Lipschitz with factor , its global error obeys
Iteration, using , proves the variable-step global ODE error bound
It explains the difference between local defect order and global order , and why local tolerance control alone does not certify a prescribed global error. Strong dynamical amplification can magnify many individually small defects.
A practical solver needs an inexpensive local error estimator. In step-doubling error estimation, compare one full step with two half steps . Smoothness and propagation through the second half step give and . Therefore
The difference estimates the finer local correction with the correct denominator and sign; adding it cancels the leading error by Richardson extrapolation. The common starting value and the smooth error expansion are essential, and the extra evaluations make this estimator relatively expensive.
An embedded Runge-Kutta pair instead shares the stage computations and uses two output weight vectors. For orders and , their difference is generally and estimates the lower-order local defect, even when the higher-order output is accepted. Its controller exponent is therefore , not . For example the explicit Euler and Heun outputs share the first slope; their difference is , while Heun's own defect is . Predictor-corrector differences can also estimate a defect when scaled by the appropriate leading error constants; an uncalibrated raw difference need not be the corrected method's error.
For a vector equation, choose positive component scales
The absolute and relative error tolerances allow meaningful tests both near zero and for large components with different physical scales. The max-norm criterion controls every scaled estimated component. A root-mean-square criterion is another common choice but has a weaker individual-component implication.
If the estimate scales like , an adaptive step-size controller uses
with lower and upper bounds on the change factor. A rejected step leaves the old state and time unchanged and recomputes with a smaller step; an accepted step advances with the chosen output and adjusts the next step. A zero estimate receives capped finite growth rather than division by zero. The safety factor allows for variation in the error constant. Step doubling has , whereas a embedded pair usually has . If a solver instead controls defect per unit time, division by changes the scaling exponent and must be included in the controller design.
Using previous estimates can smooth the sequence of accepted steps. A proportional-integral controller can take with , appropriate scaling by the estimator order and bounded factors. It avoids overreacting to a single noisy estimate, but needs safeguards after rejected steps, changes of order and abrupt coefficient changes. Event locations and discontinuities require locating the event and restarting the error expansion; blindly applying a smooth-step estimator across a jump can be misleading.
For a multistep method, adaptive step sizes change the interpolation history and coefficients. Constant-step coefficients cannot simply be reused with arbitrary step ratios. Variable-step formulas, compatible starting/restarting procedures and bounded ratios preserve the needed stability; local error and sometimes order are selected together to balance evaluation cost against accuracy.
Stiffness imposes an additional requirement. On a rapidly decaying mode , explicit Euler requires for absolute stability. Once is small, a local absolute-tolerance test can propose a large step even though roundoff or a small perturbation would then be amplified. A stiff solver therefore also uses a suitable implicit A-stable or L-stable method and solves its algebraic equations accurately enough for the estimator to be meaningful. A-stability alone does not ensure stiff decay, as the Lobatto stability function in question 4 tends to one for large negative arguments.
Finally, over-tightening tolerance eventually encounters roundoff and algebraic-solve error rather than further truncation-error improvement. Inexact Newton or linear solves must have errors below the local budget; a tiny time step with an inaccurate stage solve does not deliver the formal order. Global error assessment can use controlled refinements, defect propagation or adjoint weighting for a chosen output. Sensible error and step-size control therefore combines asymptotic estimators, tolerance scaling, stability, event handling and implementation error, rather than treating the accepted local estimate as a complete guarantee about the trajectory.
For a discretized ordinary differential equation, error control must distinguish the local truncation error of one exact-start step from accumulated global error. For a smooth order- one-step method, these are usually and respectively, provided perturbations propagate stably. A small local defect is useful only when the underlying problem and the numerical update do not amplify it excessively.
There are several practical local error estimators. In step-doubling error estimation, compute one step and two half steps from the same starting value. If the leading method error is , the two-half-step error is , up to higher terms. Their difference therefore gives
for exact minus fine-step error. Adding that estimate is Richardson extrapolation. This costs extra evaluations but gives an independent check on a single-method implementation; nonsmooth events can invalidate the assumed expansion.
An embedded Runge-Kutta pair shares stages and uses two output weight vectors to obtain orders and . Their difference generally estimates the lower-order local error , not the higher-order error directly. Stage reuse makes this much cheaper than independent integrations. Predictor-corrector error estimation uses the appropriately calibrated difference of two formulas; raw predictor/corrector differences require their known error constants. For multistep schemes, changing the step size also changes interpolation coefficients and requires controlled step ratios and proper history updates, rather than reusing constant-step coefficients.
Component scales should reflect the requested physical accuracy. An example of absolute and relative error tolerances is
Positive absolute tolerances avoid singular scaling when a component vanishes, while relative tolerances track widely differing magnitudes. Accept the step if ; otherwise reject it without committing the new state or multistep history. If the estimated defect scales as , a basic adaptive step-size controller proposes
Growth limits, a safety factor, and proportional-integral smoothing reduce erratic changes. The exponent must match the actual estimator: for a genuine order- local defect, but for the usual embedded difference. It is not always or always . A zero estimate uses a finite maximum growth factor, not division by zero.
Local acceptance does not itself certify a global error tolerance. If a dense approximation has residual and is Lipschitz continuous with constant on the relevant trajectory region, Gronwall's inequality gives the residual bound for global ODE error
The discrete analogue propagates and sums local defects. A posteriori defect correction, repeat integrations with tighter tolerances, and adjoint-weighted estimates for a chosen final functional provide stronger global checks. A smaller local target may be needed in an unstable flow; trajectory sensitivity should not be mislabeled as a code defect.
For a stiff differential equation, absolute stability can constrain explicit steps far more tightly than accuracy alone. Use an appropriate implicit method and keep nonlinear stage/linear-solve errors below the discretization-error budget. A-stability, L-stability and B-stability address different linear damping and nonlinear contractivity properties. An error controller cannot repair a method outside its stability domain. Tolerance-driven adaptation also does not automatically preserve positivity, conservation laws or a symplectic structure; these may require a suitable method or an additional acceptance test.
Finally, event detection and dense output have their own errors. Locate an event with a consistent interpolant and account for its state sensitivity; a discontinuous right side may require restarting the integrator. Refining indefinitely eventually exposes roundoff error and conditioning limits. Reliable error control balances truncation, solution sensitivity, algebraic-solve error and floating-point error, while reporting failure to meet a target instead of endlessly shrinking a step.
Runge-Kutta method Created 2026-09-24 Updated 2026-10-31
A Runge-Kutta method advances an initial value problem , , by sampling its vector field at several trial states within one time step. These samples are Runge-Kutta stages; a weighted combination of their slopes produces the next state. The construction improves on the single tangent line used by the Euler method while requiring evaluations of , rather than explicit higher derivatives of the solution. It applies to scalar equations and systems of ordinary differential equations alike. The coefficient choices distinguish methods such as Heun's method, the classical fourth-order Runge-Kutta method and implicit Runge-Kutta methods.
For stages, write for the stage matrix, for relative time nodes and for output weights. A time step of length computes
Here is a slope, with units of state per time; is a state increment. Another common convention writes , so its stage states are and its output is . These are equivalent conventions: including both inside and again in the output would count the time step twice. The textbook formulation uses the increment convention.[ref]
Usually the Butcher tableau obeys , called internal consistency. Stage then combines slopes over an effective time . The second-order conditions with independent Runge-Kutta abscissae explain what changes when time nodes are specified independently. A Runge-Kutta stage is generally an auxiliary approximation, not a separate accepted solution value at its node. Several stages can even have the same time node but different state arguments, as in the classical fourth-order Runge-Kutta method.
The useful idea is to approximate the integral without knowing the intermediate exact trajectory. Trial states provide places to sample , and Butcher order conditions make the resulting combination agree with the exact Taylor expansion. More stages alone do not guarantee a higher order of a numerical method: their coefficients must satisfy the appropriate conditions. Embedded Runge-Kutta pairs reuse these same samples for a second output and a practical local error estimator.