Adaptive Euler-Heun integration of exponential growth
ID: adaptive-euler-heun-integration-of-exponential-growth
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 controllerFor 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 .
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 . ThenEach 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.
New to topics? Read the docs here!
