Motivation
A measuring device gives values at selected times, whereas a mathematical question may ask for a value between measurements, an instantaneous rate, or a total accumulated quantity. Interpolation, numerical differentiation, and quadrature answer these three questions. A common construction links them: choose a simple function that matches the samples, then evaluate, differentiate, or integrate that function. This viewpoint explains the formulas and also exposes their limitations.
Fitting the samples exactly does not establish accuracy between them. Many smooth functions pass through the same finite data. A useful error guarantee must therefore combine the data with an assumption about the unknown function, such as a bound on a derivative. We shall keep two errors separate: replacing the function by an approximant, and perturbing the supplied sample values. Arithmetic performed by a computer can add a third error, which is not automatically included in either bound.
Definitions
Definition 4.1.1
(Interpolating polynomial and Lagrange basis)
Let be distinct real nodes and let be their supplied values. Write for polynomials of degree at most , including the zero polynomial. An interpolating polynomial satisfies for every node. The Lagrange basis polynomials are
An empty product equals one, so the definition also covers . Distinctness makes all denominators nonzero. Because equals one when and zero otherwise, the formula matches the data. Interpolating the constant function also gives . The coefficients can nevertheless be negative; their sum being one does not make evaluation a convex average.
Definition 4.1.2
(Central difference)
For a function sampled at and , with , the central difference is
It is the slope of the straight line through those two samples.
Definition 4.1.3
(Composite trapezoid rule)
On a uniform partition of , where , is an integer and , the composite trapezoid rule is
It integrates the continuous piecewise linear interpolant. Interior samples belong to two adjacent panels, which explains their full weight. These definitions concern exact arithmetic applied to supplied values.
The notation means that the function has continuous derivatives through order on the interval, with the endpoint derivatives understood by continuous extension from the interior. Continuity of the highest derivative makes its absolute maximum finite on a compact interval. Finding a useful numerical upper bound for that maximum remains a separate mathematical task; it is not something the interpolation formula extracts from its input samples.
Theorem/Proposition
Theorem 4.1.4
(Unique interpolation and its remainder)
For distinct nodes , exactly one polynomial interpolates given data. If the data are and , where contains all nodes and an evaluation point , then for different from every node there is a point between the smallest and largest of these points such that
At a node the error is zero. In particular, if throughout the interval, then the absolute error is at most .
Proposition 4.1.5
(Sensitivity and two discretization bounds)
If samples change by with , their interpolants satisfy
If and , then
If and , then
The smoothness hypotheses concern the underlying function on the whole stated interval, not merely at the nodes. A table of values alone cannot certify them. Likewise, knowing a derivative bound over the nodes' span does not justify using it for extrapolation outside that span.
Concept lensStructural
The same data, different linear functionals
At a fixed target, all three formulas are weighted sums of samples. Interpolated evaluation uses weights ; central differentiation uses and ; trapezoid integration uses nonnegative weights summing to interval length. Under independent absolute uncertainty , the sum of absolute weights determines the worst-case amplification. Their very different sums explain why reconstructing a derivative can be much more sensitive than integrating the same type of data.
Proof sketch or proof idea
Why interpolation is unique and why the remainder has this form
Proof
(Uniqueness and the interpolation remainder)
Existence follows from the Lagrange construction. If two interpolants existed, their difference would have degree at most and distinct zeros. A nonzero polynomial of degree at most cannot have that many zeros, so their difference is zero.
Fix a nonnode and set . Consider
This function vanishes at each node and at , giving distinct zeros. Arrange them in increasing order. Rolle's theorem gives a zero of in each of the disjoint intervals between successive zeros. Apply the same argument to those ordered derivative zeros: has at least zeros. Continuing, has at least one zero inside the extreme original points. Since and is monic of degree ,
Substituting for proves the formula. At a node, use interpolation directly; division by would be invalid.
Proof X-ray
The extra zero turns an unknown error into a derivative
The coefficient is chosen to add one zero to the already supplied by interpolation. Repeated Rolle then reaches derivative order , precisely where the degree- interpolant disappears and the monic product becomes the known constant . The point depends on the evaluation point; the proof does not provide a single common for every .
How sample uncertainty enters
Proof
(Sensitivity of the interpolant to the data)
Linearity gives , and the triangle inequality gives the stated bound. For a fixed , choose for each nonzero coefficient. This attains , so the bound is a sharp worst-case bound for independently bounded absolute errors. It does not assert that typical random errors always align this way. Combining it with the remainder yields
Why central differences have second-order truncation error
Proof
(Second-order truncation of the central difference)
Taylor's theorem at , applied separately to and , gives
Subtract and divide by . The even terms cancel, leaving
The two remainder points need not coincide, but each derivative is bounded by , proving the bound. If the two supplied values each have absolute uncertainty at most , the difference quotient changes by at most . Consequently the exact evaluation of the formula on uncertain samples obeys
This model balances smoother local approximation against amplification of sample uncertainty. For positive and , minimizing this upper bound over unrestricted positive gives , provided that step is admissible within the smoothness interval. This is a bound-based choice, not an exact optimizer of the unknown actual error. It also omits rounding in forming , evaluating the function, subtracting, and dividing. A hardware error analysis must specify those operations and their rounding separately.
Why the trapezoid constant is twelve
Proof
(Panel-by-panel trapezoid bound)
On a panel of length , let interpolate the two endpoint values. The linear interpolation remainder gives, for interior ,
Thus . Integrate this inequality, rather than treating the unknown as constant:
Adding the panel bounds gives . If , then gives , so . This is the overestimate for convex functions.
Trapezoid weights are nonnegative and sum to . Perturbing every sample by at most therefore perturbs the integral estimate by at most , independently of in this data model.
Here “independently bounded” allows the errors to have any signs and any dependence: it specifies one interval of allowed error for each sample, rather than probabilistic independence. Taking more panels reduces the proved truncation bound while leaving this worst-case data bound unchanged. Statistical cancellation might yield a different uncertainty estimate under additional assumptions about the measurements, but none is needed for the deterministic guarantee. A sample shared by two panels must still be treated as the same supplied value. Floating-point summation can introduce further errors even though the exact sample weights are nonnegative.
Worked examples
Worked example 4.1.6
(A quadratic value and its noise amplification)
Sample at , giving values . At , direct substitution in the basis gives
Hence . Exactness also follows from uniqueness because . However, . Errors in the three supplied values shift the interpolated answer by . Being inside the node interval does not force the weights to be nonnegative.
Worked example 4.1.7
(Differentiating sine near zero)
For , and . Since , the truncation error is at most . At this is ; the actual difference is . If each sample has absolute uncertainty , add to the bound. Choosing reduces the truncation bound to about but increases the uncertainty term to . A smaller step can therefore weaken the available guarantee.
Worked example 4.1.8
(A sharp trapezoid bound)
For on with , and
The exact integral is , so the overestimate is . With , the theorem gives : equality holds. If all three samples are uncertain by at most , their weights give uncertainty at most . The total absolute-error guarantee is therefore for exact arithmetic on those samples.
Common mistakes
Counterexample mode
Smaller differentiation steps can magnify noise
The claim that decreasing always improves a numerical derivative fails even for the true function . Supply the admissible values and . The reported central difference is , although the true derivative and truncation error are both zero. For fixed positive , this grows without bound as . A useful repaired claim is that decreasing reduces the smooth-function truncation bound, while data uncertainty requires a separate analysis.
Common mistake
(Expecting a higher degree to be more accurate)
Raising the polynomial degree has no unconditional accuracy guarantee. The remainder involves a higher derivative bound and a different node product , and the sensitivity may grow. Exact interpolation of noisy values reproduces the noise; it does not remove it.
Common mistake
(Treating the remainder point as a constant)
The point in the interpolation remainder depends on in an unspecified way. Differentiating the remainder formula as though were fixed is not justified. The central-difference error was therefore derived from Taylor's theorem directly, not from the interpolation remainder.
Summary
An interpolant is uniquely determined within its stated polynomial space, but accuracy for an unknown function requires smoothness information. Repeated Rolle supplies a precise remainder; absolute sums of Lagrange weights quantify sample sensitivity. Central differences have an truncation bound and a sample-uncertainty term. Composite trapezoids have an global bound, overestimate convex functions, and preserve a simple uncertainty bound through nonnegative weights. Each conclusion has its own assumptions and error model.
Exercises
Quick check
(Interpolate the data , at nodes and evaluate at . Find the sharp absolute uncertainty bound when each value has error at most . If the data are exact samples of a function with on , bound the approximation error there at .)
Write the interpolant as and use the remainder with .
Solution · Answer
The linear interpolant is , so . The weights are ; their absolute sum is one. The sharp sample-uncertainty bound is , attained when both errors are . The remainder bound is . With both smoothness and sample uncertainty, the combined guarantee is .
Quick check
(For , compute and its error. Does it attain the bound with ? Add the worst-case uncertainty bound for sample errors at most and minimize that bound over when .)
Expand the two cubes; the even powers of cancel.
Solution · Answer
Expand . Thus , giving error , exactly . The combined upper bound is . Its derivative is , so the minimum occurs at . The derivative changes from negative to positive there, and the bound diverges at both ends of the positive axis. On a restricted sampling interval, admissibility must also be checked.
Quick check
(Compute for on with and . Find the errors and their ratio. If , what smallest positive integer guarantees truncation error at most using the theorem?)
Use in the trapezoid bound.
Solution · Answer
and . Subtracting gives overestimates and , with first-to-second ratio four. The theorem gives when . The smallest integer satisfying this is . Here the bound is exact, but that need not hold for another function.
Quick check
(At nodes , both and give zero data. Compare their values at and their integrals on . Explain why samples alone cannot give a uniform interpolation or integration error bound as varies.)
Compute before comparing derivative bounds.
Solution · Answer
At , and ; their integrals are respectively zero and . The same zero samples therefore correspond to arbitrarily different answers as grows. Each is smooth, but is not uniformly bounded. A stated common derivative bound would restrict and restore an error guarantee; smoothness without a quantitative bound does not do so.