Absolute error Created 2026-10-14 Updated 2026-10-14
The absolute error is the absolute value of the approximation error, , measured in the same units as the numerical reference . For example, approximating by gives absolute error .
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.
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]
Asymptotic equivalence Created 2026-09-24 Updated 2026-10-14
For functions with nonzero sufficiently near a specified limit,
The same definition applies to sequences as . Equivalently, : replacing by has a relative error tending to zero, and the difference is in little o notation. The limit and reference scale are essential parts of the statement.
For example, because . Replacing the former by the latter gives absolute error , which grows without bound. Thus asymptotic equivalence controls a ratio, rather than requiring the absolute error to vanish. This distinction is crucial when approximating a rapidly growing factorial with Stirling's formula.
By contrast, and have the same order in big theta notation, but are not asymptotically equivalent: their ratio remains two. For positive functions, asymptotic equivalence gives both-sided constant bounds eventually, whereas constant bounds alone do not recover the leading coefficient.
Figure 1.
Local exponential approximation: relative difference tends to zero and absolute error is quadratic
. Details.
For a local example with real , the exponential function obeys as . The Taylor theorem with Lagrange remainder gives
Thus for ,
This states in big O notation, and division by shows that the relative difference measured against vanishes. The diagram uses positive ; the bound is valid on both sides of zero. At , the absolute error is approximately and the relative difference against is approximately .
Even restricting to increasing sequences in with limit of a sequence one gives no common stopping index. For any positive integer , define
This is an increasing bounded sequence converging to one, but its absolute error is one through index . Since can exceed any proposed index, the bounded monotone sequence theorem alone cannot say when the absolute error will fall below . A zero difference between two successive terms is also insufficient: the initial plateau eventually ends.
There is no universal eventual rate either. Let be any proposed positive nonincreasing sequence tending to zero, with . Set
Then is increasing, lies in , and converges to one, but for every sufficiently large its absolute error satisfies . Indeed, , so no fixed constant multiple of bounds the absolute error eventually. If a proposed rate is not nonincreasing, replace it, after a finite initial segment if necessary, by the decreasing envelope ; this also tends to zero, and the same construction defeats the original rate. This is an original construction, rather than a quantitative claim attributed to the qualitative theorem.
For a concrete slow example, increases to one, where is the natural logarithm. Its absolute error is , so making it less than requires , using the exponential function. At , this first happens at . The reciprocal and geometric examples in increasing and decreasing approximations to a common limit meet the same tolerance at and , respectively. All three obey the same bounded monotone sequence theorem.
Bounded monotone sequence theorem Created 2026-10-07 Updated 2026-10-20
A monotone sequence of real numbers has a finite limit of a sequence exactly when it is a bounded sequence. In the increasing case, only an upper bound needs to be supplied, because the first term already gives a lower bound; in the decreasing case, only a lower bound needs to be supplied. The limit of a sequence is the exact edge of the set of terms:
The upper bound or lower bound need not itself be the limit of a sequence. A supremum or infimum identifies the sharp bound. [ref]
For example, is increasing and bounded above by one, and is decreasing and bounded below by one. Both have limit of a sequence one, although neither ever equals one. Their absolute errors are exactly . They also bracket any sequence satisfying : the squeeze theorem gives , even if itself is not a monotone sequence.
Figure 1.
Increasing and decreasing sequences bracket a common limit of a sequence, with explicitly shrinking absolute errors
. Left: and enclose one; for every both lie strictly inside the tolerance band . Right: the absolute errors and shrink at different rates. The markers are individual terms, and connecting segments only guide the eye. Details.
The theorem is useful when a recurrence relation gives successive improvements and a bound, before the answer has been identified. It proves existence of a limit of a sequence; further algebra, often using continuity, identifies the answer. A finite plot illustrates the formulas but does not establish the infinite claim. Error bounds for bounded monotone sequences require additional quantitative information.
A real increasing sequence bounded above converges to its supremum; a decreasing sequence bounded below converges to its infimum. For the increasing case, the definition of supremum provides a term above , and every later term remains between that term and . Negation reduces the decreasing case to the increasing case. This elementary result is distinct from the measure-theoretic monotone convergence theorem for integrals.
The existence of the real supremum in this short proof uses the least-upper-bound property, equivalently completeness of the real numbers. The approximation property of a supremum supplies , and monotonicity keeps every later term within the same tolerance:
The corresponding decreasing statement follows from the approximation property of an infimum. The converse uses the fact that every convergent sequence is a bounded sequence. [ref]
Apply the midpoint quadrature rule on each of equal panels of a partition of an interval, with :
Each quadrature node is a panel midpoint and each quadrature weight is . For , put . Summing the panel quadrature errors gives
for some . Each panel contributes at most ; there are panels, explaining the composite midpoint rule error of order in big O notation. On a nonuniform partition of an interval with panel widths and largest width , the corresponding bound is .
For on , summing the sampled polynomial exactly yields
Doubling divides the absolute error by exactly four. For a general function, halving divides the displayed error bound by four, but the actual absolute error need not follow that ratio: cancellation can make it smaller or zero. Continuous functions still give convergence as the largest panel width tends to zero, by uniform continuity; without the bounded second derivative, the second-order rate is not guaranteed. Noise sensitivity of a quadrature rule explains a separate limitation when samples are inexact.
Composite Simpson's rule 2026-10-18
Composite Simpson's rule applies Simpson's rule to consecutive pairs of equal subintervals. Choose a positive even integer , put , and take quadrature nodes for . There are subintervals, two-subinterval panels, and quadrature nodes. Then
The second sum is empty when , recovering one panel. The quadrature weights, before multiplication by , are . Every interior even-indexed quadrature node is an endpoint of two panels, so its two endpoint contributions add to two; every odd-indexed quadrature node is a midpoint with weight four. An odd cannot be covered by these pairs. The displayed formula requires equal spacing.[ref]
For the exponential function on the interval , the exact integral is . With , the formula gives , an overestimate of about . With , it gives , an overestimate of about . The figure shows the intermediate refinements and compares every computed absolute error with the error bound for composite Simpson's rule.
Figure 1.
Computed composite Simpson errors for the exponential function on zero to one approach fourth-order convergence; the dashed curve is the rigorous bound e over 180 n to the fourth power
. Details.
For this exponential function, a geometric series also gives a compact independent formula. With and , summing the panel contributions yields
A Taylor series at gives
The Big O notation describes the remaining terms as tends to zero. Consequently tends to sixteen: the computed ratios increase from about to . Fourth-order truncation error is also obtained by Richardson extrapolation of the composite trapezoidal rule.[ref]
Obtaining consistent computational results from the same input data, code and stated computational conditions. Exact bitwise agreement is stronger than agreement to a justified numerical or statistical tolerance.
Error bound 2026-10-14
An error bound is an established upper bound on a specified approximation error, on a stated domain and under stated assumptions. A numerical comparison at selected points can test an approximation but does not by itself establish a bound throughout that domain. An absolute error bound controls ; a relative error bound additionally specifies the reference scale.
Suppose has a fourth derivative that is a continuous function on the interval , and there. With , the signed quadrature error here is . Then, for some point ,
In particular, a strictly positive fourth derivative makes : composite Simpson's rule overestimates the integral.[ref]
The bound's scale follows by adding the panel errors. A panel of width has signed quadrature error and absolute error at most . There are panels, so the triangle inequality gives . The intermediate value theorem for the continuous fourth derivative replaces the average of the panel values by a single value , giving the signed formula.
The underlying single-panel calculation can be seen through the Peano kernel theorem. On the interval , define the raw Peano kernel , where is integral minus Simpson's rule and is the positive part. Then for and for . It is strictly negative inside the interval and has integral . Thus
The uniform norm bounds the fourth derivative. The polynomial attains equality. Scaling to endpoint spacing multiplies the coefficient by , giving the sharp single-panel bound . The normalized Peano kernel is , so the external factorial must be omitted when using that normalization.
For the exponential function on , , so and the bound is . Its leading actual absolute error is , smaller than the bound because a uniform upper bound on the fourth derivative does not use its variation across the interval. The theorem bounds truncation error with exact function evaluations; sample errors and roundoff error are additional contributions, as described by noise sensitivity of a quadrature rule.
For an increasing sequence converging to , its absolute error is and is nonincreasing. For a decreasing sequence, the absolute error is and is also nonincreasing. This tells us that later terms cannot be worse, but does not supply a computable stopping index for a chosen tolerance.
Suppose an increasing lower approximation and a decreasing upper approximation enclose the same limit of a sequence . Their observable gap gives
If , the squeeze theorem certifies a common limit of a sequence; the midpoint has a certified absolute error at most half the gap. This is the principle behind the bisection method. In the symmetric example , , the gap is , each endpoint's exact absolute error is , and the midpoint happens to equal one exactly. The bound is valid even when such symmetry is absent.
A fixed upper bound by itself supplies less. If and for all , then and , but the last gap need not vanish. Taking and makes . A shrinking bracket or an explicit remainder formula adds information that qualitative convergence does not provide.
Finite samples do not certify quadrature accuracy Created 2026-10-14 Updated 2026-10-25
For any finite set of quadrature nodes in , , consider the polynomial
Every sample is zero, so every quadrature rule at these quadrature nodes gives . Yet is nonnegative and strictly positive away from its finitely many polynomial roots; its continuity makes the integral positive. Consequently the smooth functions and have identical samples but definite integrals and . Multiplying by any positive constant makes the difference arbitrarily large. This is an information limit, even with exact arithmetic; merely assuming smoothness without quantitative bounds does not remove it. The related degree ceiling for quadrature exactness uses the same squared nodal polynomial to limit polynomial exactness.
For example, the endpoint quadrature nodes give , , and . Both the zero function and produce zero under the one-panel trapezoidal rule, although . More generally, any estimate based only on their shared samples has absolute error at least for one of these two integrands, by the triangle inequality.
The obstruction also applies to a deterministic adaptive procedure that terminates after finitely many evaluations on the zero function: form using every quadrature node it visited. On , the same zero responses lead to the same choices and answer. Certified quadrature error control therefore needs additional information, such as a known bound on relevant derivatives, rather than agreement among sampled approximations alone.
For the two sequences in bounded monotone sequence theorem,
Their directions and bounds are explicit. One is a succession of lower approximations and the other a succession of upper approximations to the same limit of a sequence. To obtain absolute error strictly below , it suffices to choose an integer , and then every works. For , the first such index is ; at the absolute error equals the tolerance.
A geometric sequence offers a faster example. The recurrence relation , gives . Thus is an increasing bounded sequence with limit of a sequence one and absolute error . For , already works, since , whereas . The bounded monotone sequence theorem guarantees both examples converge; the formulas explain their different speeds.
Interval bisection Created 2026-10-07 Updated 2026-10-14
Interval bisection solves a target equation by repeatedly halving a closed interval known to contain a solution. It is the bisection method applied to , so the target becomes a zero of a function. This reduction from an equation to root finding is described in Demanet's notes.[ref] Here the emphasis is on a continuous strictly increasing function: the target identifies one input, making interval bisection a way to evaluate its inverse function without an explicit inverse formula.
Let be a continuous function, with and . The intermediate value theorem guarantees existence; a strictly increasing function also guarantees uniqueness. Check endpoint equality first. Otherwise, for the current root bracket , evaluate its midpoint . If , retain ; if , retain ; if , return that exact solution. These comparisons preserve the target bracket. General bisection method needs continuity and opposite signs of at the endpoints, without requiring monotonicity or a unique zero of a function; see limitations of bisection.
An original dimensionless polynomial example is
Here and the derivative , so there is exactly one solution. In fact ; knowing this lets us check the computed absolute error independently of the guarantee. The first four halvings give the following exact rational numbers:
Figure 1.
Finding the input for a target output: cubic graph and four retained brackets
. Details.
The beauty of interval bisection is that the enclosure itself supplies the certificate: one comparison removes half the possible inputs, regardless of the steepness of the function graph. In exact arithmetic, after completed halvings without exact termination, the width and the bisection error bound for the new midpoint are
The reported midpoint after update four is , rather than the last tested point . Its certified absolute error is at most , and its actual absolute error is . For a requested position tolerance , the bisection stopping criterion requires eleven halvings: ten give , while eleven give
The actual absolute error is . The new midpoint need not be evaluated to obtain this certificate.
The signed output residual is ; the position approximation error is . They answer different questions: how close is the output to the target, and how close is the input to the solution? Driscoll and Braun explain why a small residual needs information about the derivative to imply small position error.[ref] For this particular polynomial, direct factorization gives
Thus at the residual is , despite position absolute error . If a differentiable function satisfies throughout the bracket, the mean value theorem gives the rigorous conversion
Our example permits and on . Strict increase alone supplies no positive lower derivative bound: is strictly increasing but . A small residual alone is therefore not a universal position certificate; even the target equation has residual at , a full unit from its solution.
Figure 2.
Certified position error and output residual measure different distances
. Details.
The guarantees require continuity and correct evaluations, not just narrowing endpoints. For the strictly increasing function when and when , the target lies between and but is never attained: a jump discontinuity defeats the existence argument. With floating-point arithmetic or an approximate evaluation, an incorrect comparison can discard the true solution. A certified interval enclosure of wholly below or above certifies the corresponding decision; an enclosure containing is inconclusive, rather than proof of equality. If rounding makes the midpoint equal an endpoint, report the precision limit; see bisection stopping criterion for the rounded position bound. Both figures are exact mathematical examples, not measured data.
Lp norm Created 2026-09-24 Updated 2026-10-14
An Lp norm measures the size of a measurable function by averaging a power of its absolute value with respect to a specified measure. For ,
when the integral is finite. The exponent controls how strongly large values influence the result. The Lp space identifies functions equal almost everywhere, so this becomes a norm on the corresponding equivalence classes. For , use the essential supremum of , as defined by the L-infinity norm. [ref].
For a two-coordinate vector , treat the coordinates as a function on two inputs with counting measure. Then , , and . The middle case is the Euclidean norm; the first adds the coordinate magnitudes, and the last takes their largest value. These are different answers to different questions about size, all satisfying the triangle inequality.
If instead each input has probability , the same values give and , while remains unchanged. Thus the measure is not an optional label. On a probability space, the finite Lp norms are nondecreasing in whenever they are finite, by Hölder's inequality; the unnormalized two-coordinate example above decreases instead. Statements comparing different exponents must specify their measure convention.
Why are these sizes useful? If is an error function, its L1 norm measures aggregate absolute error, its L2 norm measures the square root of aggregate quadratic loss, and its L-infinity norm bounds error almost everywhere. Concentrating a large error on a set of small positive measure can give a modest finite Lp norm but a large L-infinity norm. The three-point example and diagram in L-infinity norm show this explicitly, including why a null set behaves differently from a rare event.
Suppose an approximation is compared with a target through an intermediate approximation , with both error functions in the same Lp space. The identity and the Minkowski inequality combine two error budgets without any independence assumption. The L1 norm controls aggregate absolute error, the L2 norm controls the square root of aggregate quadratic loss, and the L-infinity norm controls the largest error almost everywhere. For equally weighted samples with the probability measure on each coordinate, the L2 norm is the root mean square error; the inequality still applies when this normalization is used consistently.
For example, two signed error vectors and have Euclidean norms and , while . Reinforcing errors and attain the bound ; opposing errors and cancel completely. The Minkowski inequality always allows reinforcement. A smaller combined budget requires additional information about the errors, not just their separate norms.
Iteration gives for every finite sum. For an infinite series, if all belong to one fixed Lp space with and , its partial sums form a Cauchy sequence in the full Lp norm. Completeness of this Banach space then gives norm convergence to an element of the same Lp space. A finite sum bound alone does not establish convergence, and completeness is an additional ingredient beyond the Minkowski inequality. [ref]
Nested interval theorem Created 2026-09-24 Updated 2026-10-14
If are nonempty closed intervals with finite endpoints, then at least one real number belongs to every member. If their lengths tend to zero, exactly one real number belongs to every member. The result turns an unlimited sequence of consistent enclosures into an existence guarantee.
Write . Nesting makes the left endpoints nondecreasing and the right endpoints nonincreasing. Their bounds give finite supremum and infimum, with
Indeed, every is an upper bound for all the , so the least-upper-bound property gives for every . This proves the displayed interval is nonempty. If , its two endpoints must coincide. This is the connection to the completeness of the real numbers discussed in Günther Hörmann and David Langer, Einführung in die Analysis, §§3.15–3.16: nested intervals and order completeness.
Figure 1.
Nested enclosures can converge to one point, retain a whole interval, or have no common point when endpoints are excluded
. Details.
The distinction between existence and uniqueness is useful in computation. If an unknown point lies in every , the midpoint satisfies
Thus the enclosure itself certifies an absolute error without knowing the answer. The bisection error bound is the special case where each update halves the width.
Closedness and a finite initial enclosure matter. The open intervals have no common point, while the closed but unbounded intervals also have empty intersection. A picture of a few intervals cannot certify the intersection of an infinite family; the hypotheses of the nested interval theorem do that work.
Numerical integration Created 2026-10-03 Updated 2026-10-18
Numerical integration approximates a definite integral using finitely many sampled function values. For an integrand on a finite interval , , a quadrature rule has the form
The quadrature nodes tell us where to evaluate ; the quadrature weights turn those values into an approximation to the accumulated signed area. The exact definite integral depends on the integrand throughout the interval, whereas the quadrature rule sees only these samples. Integrating a chosen interpolant exactly still generally approximates the original integrand's integral.[ref]
The fundamental theorem of calculus evaluates as when an antiderivative is available. Numerical integration is useful when no convenient antiderivative is known, or each evaluation of the integrand requires an expensive computation. The task then becomes choosing informative quadrature nodes and controlling the quadrature error with as few evaluations as possible. Fixed data also permit a quadrature rule, but refinement cannot supply new information between observations.[ref]
For an exact comparison, take the polynomial on . Its antiderivative gives . On a partition of an interval into equal panels, the composite midpoint quadrature rule uses midpoint samples, each with quadrature weight ; the composite trapezoidal rule uses endpoint samples, with outer quadrature weights and interior quadrature weights . The existing derivations under these two quadrature rules give
In particular, and already bracket ; two panels give and . The convex function explains the opposite signs. A midpoint rectangle can cross the curve within its panel, so its total signed area, rather than pointwise ordering, determines the underestimate.
Figure 1.
One and two panels for numerical integration of : midpoint and endpoint samples with their quadrature weights
. Details.
Define the signed approximation error as . In this example the absolute errors are and : doubling reduces each by exactly four. A plot with both axes on a logarithmic scale therefore has slope , expressing order two with respect to panel refinement. This is an exact calculation for this polynomial, including , rather than an observed rate extrapolated from a few computed answers.
Figure 2.
Exact absolute errors for midpoint and trapezoidal numerical integration of : slope and a factor-four reduction
. Details.
For a general integrand, the composite midpoint quadrature rule and composite trapezoidal rule give second-order quadrature error bounds when has two continuous derivatives on and a known bound on . These hypotheses describe behavior between samples. A formal error formula containing an unknown derivative is not a numerical accuracy certificate or a justified sample count. Finite samples do not certify quadrature accuracy makes the missing information explicit. Errors in the evaluations and roundoff error must also be considered; noise sensitivity of a quadrature rule treats the former.
More elaborate choices exploit other information: Gaussian quadrature obtains high polynomial exactness from carefully chosen quadrature nodes, and Simpson's rule uses a quadratic interpolant. Adaptive numerical integration compares approximations and concentrates samples where they disagree, often saving evaluations. Such a difference is an error estimate, not a certified bound without further assumptions: both approximations can miss the same feature.[ref]
For , the required derivatives are
At these give , , and . Setting , the three-term Taylor polynomial yields
By the Taylor theorem with Lagrange remainder, the signed error is
It is positive, and . Consequently
The last comparison is exact because . Thus the estimate is an underestimate with the required rigorous absolute error bound.