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.
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 givesWhen 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 isHere 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.
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]
scipy.integrate.solve_ivp. solve_ivp, method parameter: explicit versus implicit methods and stiffness
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 errorConsistency 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]
https://ocw.mit.edu/courses/18-330-introduction-to-numerical-analysis-spring-2012/a9d2bd9be098f0ada172af40379a17cc_MIT18_330S12_Chapter5.pdf. Laurent Demanet, MIT 18.330, Chapter 5, Definition 6, 2012
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-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 areThe 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 . ThereforeThe 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 hasThese 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.
Euler method Created 2026-10-14 Updated 2026-10-20
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 givesAt , 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 .
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]
https://web.mit.edu/10.001/Web/Course_Notes/Differential_Equations_Notes/node3.html. MIT 10.001, Forward and Backward Euler Methods, linear decay example
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.
Euler one-step defect 2026-10-31
For a smooth solution of , Taylor's theorem gives the displayed local truncation error when an Euler method step starts at an exact solution value. Thus the one-step defect is . Dividing it by gives a normalized local truncation error of ; these are different conventions for reporting the same residual. Also along the solution by the chain rule. A global error conclusion additionally requires the usual regularity and stability control over successive steps.
The coefficients of this linear multistep method are , , and , . Substitution into the order of a numerical method conditions givesThe second equation gives ; substituting this into the third gives . Consequently there is exactly one second-order choice,The resulting scheme is the BDF2 method,For a exact solution, Taylor's theorem in the original normalization gives the exact leading order defectIn particular the coefficient is nonzero: the method has formal order exactly two, rather than three. Bounded third derivatives already suffice for the uniform estimate ; the stronger smoothness above only makes the displayed remainder immediate. Multiplying the recurrence by instead gives the common derivative normalization with leading defect .
The first of the characteristic polynomials of a linear multistep method isBoth roots are simple and lie in the closed unit disk, so the root condition for a multistep method proves zero-stability.
The Dahlquist equivalence theorem states that, for fixed-coefficient linear multistep methods on the usual class of initial value problems with a right-hand side continuous in and uniformly Lipschitz continuous in , convergence of a numerical method for every such problem and every convergent set of starting values is equivalent to consistency of a numerical method and zero-stability. The statement is on fixed finite intervals where the exact solution exists, with implicit updates well defined. Its order estimate says that a zero-stable method with and starting errors has global error under the corresponding solution smoothness and Lipschitz continuity assumptions; merely convergent starting values do not ensure the order- rate.
For this application, sufficient assumptions are a unique solution , a uniform Lipschitz continuity bound in on a neighborhood of its graph, and the nearby solution branch of each implicit update. For sufficiently small , the mapis a contraction mapping with factor at most on a suitable small closed neighborhood. The Banach fixed-point theorem supplies local solvability of the nearby update. With starting errorsthe order estimate givesThus the BDF2 method is second-order convergent under these standard hypotheses. Exact together with one Euler method step for already gives the required starting error when is bounded, since only one starting step is taken.
The question's assumption of continuity of alone does not establish uniqueness, the needed solution smoothness, or this uniform convergence estimate. The added Lipschitz continuity condition is a sufficient hypothesis for the theorem used here; its failure does not imply that every particular initial value problem is nonunique or that its numerical approximations cannot converge.
If one retains the Euler approximation , its exact norm matrix isThe additional term can mix the instantaneous symmetric-part eigenvectors, so they no longer generally diagonalize finite-time error amplification. However, when is material, a reliable physical propagator must itself be calculated beyond first-order Euler: a large Euler-step amplification can be a numerical artifact. For constant , the exact map is ; for a changing reference trajectory it solves , .
Use its singular value decomposition, . The initial orthonormal right singular vectors diagonalize and satisfyA singular value gives finite-time norm growth, decay, and the leading right singular vector is the initial perturbation with greatest amplification in the stated norm. The left singular vector describes the resulting final error pattern. Non-normal dynamics can give transient growth even if every Jacobian matrix eigenvalue has negative real part, so selecting observations from those eigenvalues alone is insufficient. Over a genuinely short interval, , recovering the symmetric-part result. Initial observations should target the relevant growing right singular projections, with prior covariance and observational precision included when they are not isotropic.
- Lines 1–7 set the grid dimensions, domain lengths, thermal diffusivity and time interval. The elapsed time is .
- Lines 9–10 supply coordinates, subject to the periodic-grid correction above. Lines 16–17 sample the initial Gaussian function.
- Lines 11–14 construct the discrete Fourier transform frequency order and . Negative frequencies occupy the second half of each array. This is the discrete version of replacing each spatial derivative by multiplication by .
- Line 20 computes the two-dimensional Fast Fourier transform. Lines 22–24 multiply every mode by at every step, implementing the modal solution derived above.
- Line 26 performs the inverse discrete Fourier transform. Taking the real part removes tiny imaginary roundoff errors; conjugate symmetry of the exact transformed real data already guarantees a real result.
- Lines 28–42 display the initial and final arrays. A common colour scale is needed to compare their peak temperatures; independent automatic colour scales can hide the decrease in amplitude.
For this linear homogeneous problem, the exponential update is exact for the retained modes, apart from roundoff error. It is not a forward Euler method step and does not require the explicit finite-difference diffusion stability restriction. Sampling, periodic modelling and spatial resolution still matter.
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]
Ordinary Differential Equations and Dynamical Systems by Gerald Teschl. Gerald Teschl, Ordinary Differential Equations and Dynamical Systems, §2.7, Theorem 2.19, printed p. 56: forward existence and the analogous backward result
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.
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 satisfiesThe 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-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 computesHere 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]
6.4 Runge-Kutta methods. Fundamentals of Numerical Computation, §6.4.3, equations 6.4.10–6.4.11: multistage recipe and tableau
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 iswhere 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]
https://ocw.mit.edu/courses/18-330-introduction-to-numerical-analysis-spring-2012/a9d2bd9be098f0ada172af40379a17cc_MIT18_330S12_Chapter5.pdf. Laurent Demanet, MIT 18.330, Chapter 5, Example 14, 2012



