Continue the initial value problem , , to using the Euler-Heun embedded pair. Choose absolute and relative error tolerances and , so the scalar scale is throughout. This intentionally absolute-only test makes the local and accumulated errors directly comparable. Start with , accept the Heun's method endpoint precisely when , and after every trial use the capped adaptive step-size controller
For use the growth factor two. Cap every trial at ; on rejection retain the old time and state. These choices specify an original computation, rather than a claim about the defaults of a particular software solver.
The initial trial has and is rejected. Retrying from with gives and is accepted. The run takes 315 accepted steps and one rejected trial. Increasing exponential growth makes the local error estimator grow at a fixed , so subsequent steps shrink roughly like . The final step is additionally shortened to land at .
Figure 1.
Computed Euler-Heun step sizes and errors: every accepted local estimate passes, but accumulated global error exceeds the absolute tolerance
. Details.
The right panel plots errors against the accepted-step number, all divided by the same . The actual Heun local defect uses the restarted exact endpoint , while actual global error uses . All accepted are at most one, and the actual Heun local defects here are even smaller, at most about . Nevertheless the endpoint is , versus , with absolute error about . Passing local tests therefore does not certify the original trajectory's global error.
This failure of a global guarantee has an exact explanation for this example. Put and . Then
Each new local defect is added to the previous error amplified by . Iterating this identity, rather than merely inspecting , accounts for accumulation. The variable-step global ODE error bound describes the corresponding mechanism for more general ordinary differential equations.
Repeating with gives 98 accepted steps, one rejection and endpoint absolute error about ; with it gives 1001 accepted steps, two rejections and endpoint absolute error about . Accuracy improves on this smooth problem, but the endpoint error remains about fifteen times the requested local scale. A different initial value problem can amplify or damp defects differently.
Euler-Heun embedded pair 2026-10-14
The Euler-Heun 1(2) pair combines the explicit Euler method and Heun's method. Here 1(2) names their respective order of a numerical method; the accepted endpoint in this article is the second-order one. Its shared Runge-Kutta stages and endpoints are
The first output row in this Butcher tableau is Heun's method; the second is the explicit Euler method. Both outputs cost two evaluations of together, rather than one for Euler method plus two for a separately computed Heun's method.
For the initial value problem , , take . The first slope is ; the stage state is , giving . Therefore
The exact exponential function gives signed local defects approximately for the explicit Euler method and for Heun's method. Their difference is exactly . Thus the pair difference estimates the larger Euler defect; calling it the actual Heun defect would miss by a factor about fourteen here.
More generally, a step from on has
These original Taylor expansions separate three quantities: the accepted Heun's method has local truncation error and global error under suitable numerical stability, while the tested local error estimator is . For with held approximately fixed, use . A cube-root update would model a different quantity, the actual higher-order local defect.
Runge-Kutta method Created 2026-09-24 Updated 2026-10-14
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.