Adaptive Euler step doubling for exponential decay Created 2026-10-14 Updated 2026-10-14
Consider the nonstiff scalar initial value problem , , on . Its exact solution is the exponential decay . Use step-doubling error estimation with the explicit Euler method: from the same numerical starting value , form one coarse step and two half steps giving :
Accept when the absolute and relative error tolerances test passes, with . There is no Richardson extrapolation in the accepted value. Both approximations have order of a numerical method one, while this local error estimator has step exponent . Consequently the adaptive step-size controller uses a square root, not a cube root:
Start with . A rejected trial retains both and , caps at one, and retries. A zero estimate uses . Before every trial, cap at . Stop with a failure if floating-point arithmetic gives , or after 100000 trials. These rules specify the example completely; they are not a prescription for every ordinary differential equation solver.
Figure 1.
Adaptive two-half-step Euler decay: exact and numerical trajectories, accepted step sizes and rejected trials
. Details.
The first two trials, and , have and and are rejected. The next trial has and and is accepted. For positive decreasing numerical values, , so the local error estimator gives
When the relative term dominates, this suggests nearly constant accepted steps, approximately . When falls below the crossover size , the absolute term increasingly permits longer steps. The sharp final decrease in only lands on ; it does not indicate a sudden loss of smoothness.
The actual signed local defect from the same numerical input is
Here is Big O notation, obtained from Taylor's theorem for the exponential function. Thus agrees with the leading term as , but is not identical to . At , , the estimate is while the actual local defect is . Their closeness improves for the smaller accepted steps. Had we added using Richardson extrapolation, the accepted formula would instead be , of order of a numerical method two; the same raw difference would still scale as and would not estimate that improved value's leading defect.
Figure 2.
Estimated versus actual local Euler defects, rejected trials, and actual accumulated global error scaled by the local tolerance
. Details.
The global error obeys an exact recurrence relation involving the actual local defects:
Each previous global error contracts, yet the local defects keep adding. In the plotted run, 101 steps are accepted and two trials are rejected. Every accepted is at most approximately , while the largest is approximately . At , the numerical value is approximately , compared with the exact , giving absolute error approximately . The right-hand plot deliberately scales actual global error by the same used for local acceptance; it is not a new global error tolerance test.
Tightening both absolute and relative error tolerances by a factor ten gives 315 accepted steps and endpoint absolute error approximately ; tightening both by a factor one hundred gives 991 accepted steps and endpoint absolute error approximately . This is a convergence comparison for this particular initial value problem. The endpoint error decreases by about a factor three per tenfold tightening, rather than by ten: a first-order Euler method accumulates defects across many steps, while its local error estimator varies quadratically with . A variable-step global ODE error bound needs propagation information as well as accepted local tests.
The absolute stability boundary remains a separate constraint. On the Dahlquist test equation with , the accepted two-half-step formula has stability function . It strictly damps perturbations only for . Its local error estimator is , which can pass an absolute-tolerance test at tiny even outside this damping interval. In a stiff two-mode linear system, a fast mode can therefore constrain the step long after its visible amplitude has become small. An adaptive step-size controller does not turn an explicit Euler method into an A-stable method. Official solver documentation likewise distinguishes explicit Runge-Kutta methods for nonstiff problems from implicit Runge-Kutta methods and backward differentiation formulas for stiff equations.[ref]
Consistency of a numerical method Created 2026-09-28 Updated 2026-10-14
For a one-step approximation to an ordinary differential equation, insert the exact solution and define the unscaled local truncation error
Consistency of a numerical method requires uniformly on the finite interval being approximated, under the stated smoothness assumptions. Merely asking is too weak: the useless update has defect , which tends to zero but generally fails the scaled test. Here denotes Big O notation. MIT uses this division-by-step convention.[ref]
For the Euler method, Taylor's theorem gives . A bounded second derivative therefore gives local truncation error and a scaled defect . Under a uniform Lipschitz continuity assumption on in , within a region containing the exact and numerical solutions, numerical stability controls accumulation over about steps. This yields global error with exact starting data. Consistency of a numerical method checks each step; numerical stability controls their combination.
Euler method 2026-10-14
The Euler method approximates an initial value problem , , by evaluating the derivative at the current point and moving along that tangent line for a time . With , its displayed update needs one evaluation of per step. This simple rule turns local slope information into a whole approximate trajectory. MIT's course notes derive it by dropping the second-order Taylor remainder.[ref]
Take , , whose exact solution is the exponential function . The Euler method gives
At , the first values are . At , five steps give , compared with . The result decays but is too small: absolute stability alone does not ensure accuracy. At , the first values are , and at five steps give , while the exact solution is about .
Figure 1.
Euler approximations to exponential decay on the same finite time interval
. Details.
For the Dahlquist test equation , the Euler method has stability function with . Its absolute stability region is , the closed disk centred at with radius one. For the present real decay problem and , bounded numerical values require ; strict decay requires . At the values alternate without decay. These conditions follow directly from the amplification factor , matching MIT's criterion for .[ref]
The Euler method is first order: with bounded second derivative and suitable Lipschitz continuity, its global error is on a fixed interval. In this example the logarithm gives for small positive . At , this means . It explains both the downward bias and why halving the step roughly halves the error once is sufficiently small.
Peano existence theorem Created 2026-09-29 Updated 2026-10-14
Let be an open set, , and a continuous function. Through every there is a local solution of a differential equation: a continuously differentiable function on an open interval containing , satisfying the displayed initial value problem pointwise. No Lipschitz condition is assumed.[ref]
Continuity of a proposed rate law therefore guarantees at least one trajectory for a short time. For a physical model, this is a first consistency check: can the stated rule and initial condition actually be followed? Prediction also needs uniqueness. The delayed solutions of a square-root differential equation below show how the same rule and initial condition can leave a departure time undetermined. The Picard-Lindelöf theorem supplies a sufficient additional hypothesis for uniqueness; failure of that hypothesis alone does not prove nonuniqueness.
For the initial value problem , , a forward solution of a differential equation can stay zero until any , then follow . The delayed solutions of a square-root differential equation verify this freedom exactly.
Figure 1.
One initial condition admits an arbitrary forward waiting time
. Colored curves leave zero at the marked waits ; the dashed curve stays zero forever. Every curve satisfies the same original differential equation for . Details.
Local existence gives neither a global solution of a differential equation nor a bound on all future values. The continuous function already permits finite-time blowup; the finite-dimensional continuation criterion explains the additional issue of extending a trajectory within its domain.
Proof outline: choose a compact set . By the extreme value theorem, . Take with . Forward Euler method polygons remain in the closed ball and satisfy . The Arzelà-Ascoli theorem yields a convergent subsequence with uniform convergence. Uniform continuity of on makes their integral equation defect tend uniformly to zero, so the limit satisfies
The fundamental theorem of calculus gives a continuously differentiable function. Repeat backward and join at , where both derivatives equal .[ref]
The compact set here uses a finite-dimensional vector space; bounded closed balls in an arbitrary Banach space need not be compact. When , the constant solution of a differential equation works on the entire time interval in . In general the proof selects a subsequence, without asserting that all polygons converge to one unique trajectory.
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.
Stability of a numerical method Created 2026-10-05 Updated 2026-10-14
For a numerical evolution, numerical stability means that perturbations remain controlled over a fixed finite interval by a bound independent of sufficiently small discretization parameters. With perturbations to starting data and added step defects , a typical estimate is
where is independent of . For a linear homogeneous recurrence, a uniform bound on powers of its update matrix supplies this control. von Neumann stability analysis and the energy method provide complementary tools.
Finite-interval numerical stability differs from absolute stability at a fixed step size. Applying the Euler method to multiplies a perturbation by each step. At this is , so perturbations shrink; at it is , so they alternate and grow. Nevertheless the Euler method converges as for this problem: failure at a coarse step does not contradict the convergence theorem. Absolute stability asks whether a selected step preserves boundedness of the Dahlquist test equation over arbitrarily many steps. MIT's analysis uses strict decay, , rather than the boundary-inclusive boundedness convention.[ref]