Hermite interpolation and piecewise / cubic spline interpolation
Anchor (Master): de Boor 2001 *A Practical Guide to Splines* revised ed. (Springer) Ch. V (the minimum-curvature variational characterisation, the $O(h^4)$ convergence, and the spline projector) and Ch. IX-X; Hall-Meyer 1976 *J. Approx. Theory* 16(2) (the sharp $5/384$ constant in the clamped cubic-spline error bound); Holladay 1957 *Quart. Appl. Math.* 15 (the original minimum-bending-energy theorem for the natural cubic spline)
Intuition Beginner
The last unit ended on a warning. If you sample a smooth curve at many evenly spaced points and force a single high-degree polynomial through all of them, the fit can swing wildly near the ends — the Runge phenomenon. One polynomial stretched across a wide interval is simply too stiff in the middle and too floppy at the edges. This unit gives two repairs, and both come from the same instinct: stop asking one polynomial to do everything.
The first repair sharpens what "passing through a point" means. So far you matched the height of the curve at each node. But you often know more — you know the slope there too. Matching both the height and the slope at each node is called Hermite interpolation. It is like a handshake that agrees not only on where to meet but on which direction both curves are heading, so the fit hugs the true curve more snugly around each point.
The second repair is the one that defeats Runge for good. Instead of one tall polynomial, lay down many short low-degree pieces, one per gap between neighbouring points, and glue them together. Each piece is mild and cannot misbehave. The art is in the gluing. If you join cubic pieces so that the heights, the slopes, and even the bending all match where two pieces meet, the seams disappear and the whole curve looks perfectly smooth. That glued-up curve is a cubic spline.
The name is borrowed from the drafting tool: a thin flexible strip of wood that draughtsmen bent through pegs to draw a fair curve. The wood settles into the shape that stores the least bending energy. The mathematical cubic spline does exactly that — among all smooth curves through your points, it is the one that bends as little as possible.
Visual Beginner
Picture the same data dots from the Runge unit. On the left, one stiff high-degree polynomial overshoots near the ends. On the right, short cubic pieces are laid down between neighbouring dots and joined so smoothly you cannot spot the joins. The table below contrasts the two strategies and lists what a cubic spline forces to match at each interior seam.
| strategy | how many pieces | degree of each piece | what matches at a seam |
|---|---|---|---|
| one global polynomial | one | high (grows with data) | nothing to glue |
| cubic spline | many (one per gap) | three (cubic) | height, slope, and bending |
Each row tells the same story: spreading the work over many gentle cubic pieces keeps every piece tame, and matching height, slope, and bending at the seams hides the joins so the eye sees one smooth curve. That triple match at each seam is what makes the spline so much steadier than the single stiff polynomial.
Worked example Beginner
Let us build the Hermite cubic on one interval that matches both a value and a slope at each end. Take the interval from to , and ask for a curve with , slope at the left, , and slope at the right. Four conditions pin down a cubic .
Step 1. Use the two left conditions. The value forces . The slope at is (since the derivative is , which equals at ), so . The cubic so far is .
Step 2. Use the two right conditions. The value . The slope at is .
Step 3. Solve the pair. From we get . Substituting into gives , so and .
Step 4. Write the answer and check. The cubic is . At it is ; at it is . Its derivative is , which is at both and . All four conditions hold.
What this tells us: matching a value and a slope at each of two ends needs four numbers, and a cubic has exactly four free numbers, so the fit is determined. This little curve, , is the smooth S-shaped ramp that engineers call "smoothstep"; it is the basic tile a cubic spline lays down between neighbouring points.
Check your understanding Beginner
Formal definition Intermediate+
Throughout, , and the nodes are with subinterval lengths and mesh size . As in 43.08.01, is the space of polynomials of degree at most , and the functions with continuous derivatives. The node polynomial of 43.08.02 is .
Definition (Hermite / osculatory interpolation). Given nodes and, at each node, prescribed values and derivatives up to order (the multiplicity of , with total ), the Hermite interpolant is the unique satisfying
$$
p^{(j)}(x_k) = f^{(j)}(x_k), \qquad 0 \le j \le m_k - 1, \quad 0 \le k \le n.
$$
The canonical case matches value and first derivative at every node ( for all ), giving . The interpolant is computed by the Newton form on the confluent node list in which each is repeated times, using the generalized divided differences of 43.08.01 under the convention .
Definition (piecewise polynomial interpolant). A piecewise polynomial of degree on the mesh is a function whose restriction to each subinterval is a polynomial in . It is interpolatory if for all . The smoothness class is the largest with ; the seams (interior knots) are where smoothness can fail.
Definition (cubic spline). A cubic spline on the mesh is a piecewise cubic () lying in : at each interior knot () the two adjoining cubics agree in value, first derivative, and second derivative. The interpolating cubic spline additionally satisfies for all . Counting degrees of freedom, the cubics carry coefficients; interpolation and matching impose conditions, leaving free, fixed by end conditions:
- natural: ;
- clamped (complete): , with prescribed end slopes;
- not-a-knot: is continuous across and , so the first two and last two cubics coincide (the knots are "not knots").
The symbols , , , , , and the moments are recorded in _meta/NOTATION.md; the node polynomial and the divided-difference calculus are inherited from 43.08.01 and 43.08.02.
Counterexamples to common slips Intermediate+
"A piecewise cubic that interpolates the data is automatically a spline." Interpolation alone forces only . Hermite cubics joined by value and slope are merely . The spline demands the extra condition that the second derivative also match at every seam; that single additional requirement per interior knot is what couples the pieces into the global tridiagonal system.
"Matching more derivatives always improves the fit." Hermite interpolation with value and derivative at equispaced nodes is still a single polynomial of degree , and its error carries the squared node polynomial . The Runge mechanism of
43.08.02is not cured by osculation; it is cured only by lowering the degree, which is what going piecewise does."The natural end condition is the most accurate default." Setting at the ends is convenient and yields the minimum-curvature spline, but it degrades the accuracy near the boundary from to unless genuinely vanishes there. Clamped (true end slopes) or not-a-knot conditions restore the full order.
"The tridiagonal spline matrix could be singular." The moment system has rows with and , so the matrix is strictly diagonally dominant. Diagonal dominance of this sign pattern guarantees invertibility, so existence and uniqueness never fail for distinct ordered nodes.
Key theorem with proof Intermediate+
The signature result is that the interpolating cubic spline exists and is unique, because the -matching conditions reduce to a strictly diagonally dominant tridiagonal system in the second derivatives at the knots. The unknowns are called the moments; once they are known, each cubic piece is reconstructed by integrating the linear twice and fixing the constants by the interpolation values. This follows Süli-Mayers [Süli-Mayers §11.4].
Theorem (existence, uniqueness, and the moment system). Let with . For prescribed values and either the natural or clamped end conditions, there exists a unique interpolating cubic spline . Its moments satisfy, for each interior knot , $$ \mu_i M_{i-1} + 2 M_i + \lambda_i M_{i+1} = d_i, \qquad \mu_i = \frac{h_{i-1}}{h_{i-1} + h_i}, \quad \lambda_i = \frac{h_i}{h_{i-1} + h_i}, $$ where , with two further rows supplied by the end conditions. The system matrix is strictly diagonally dominant, hence invertible.
Proof. On the spline is cubic, so is linear and is determined by its endpoint values : $$ s''(x) = M_i \frac{x_{i+1} - x}{h_i} + M_{i+1} \frac{x - x_i}{h_i}. $$ Integrating twice introduces two constants per piece, which the interpolation conditions and fix; carrying out the integration gives the piece explicitly and, in particular, the one-sided first derivatives at the endpoints. Differentiating the integrated form and evaluating at from the right yields $$ s'(x_i^+) = \frac{f_{i+1} - f_i}{h_i} - \frac{h_i}{6}(2 M_i + M_{i+1}), $$ and from the piece the left derivative is $$ s'(x_i^-) = \frac{f_i - f_{i-1}}{h_{i-1}} + \frac{h_{i-1}}{6}(M_{i-1} + 2 M_i). $$ The defining continuity at the interior knot demands . Equating and clearing denominators by multiplying through by produces exactly with the stated coefficients; the continuity is built in because the linear already shares the endpoint value across the two pieces. This is equations in the unknowns .
The natural condition adds directly; the clamped condition adds, at each end, the analogous equation from matching the prescribed and , namely and its mirror. In every interior row , and the end rows have diagonal against off-diagonal (or a pure on the diagonal for the natural case), so the matrix is strictly diagonally dominant. A strictly diagonally dominant matrix is nonsingular, so the moments are uniquely determined; back-substituting them into the integrated pieces reconstructs the unique spline.
Corollary (reduction to a linear-time solve). The moment matrix is tridiagonal and diagonally dominant, so the system is solved by the Thomas algorithm (Gaussian elimination without pivoting) in arithmetic, and the elimination is numerically stable because diagonal dominance is preserved at every step. The whole spline therefore costs work, against the of building a divided-difference table for a single global polynomial of comparable size.
Bridge. This theorem is the foundational reason the spline tames the Runge divergence of 43.08.02: the global high-degree polynomial is replaced by local cubics whose only global coupling is the benign tridiagonal moment system, and strict diagonal dominance is exactly the structural fact that organises existence, uniqueness, and the solve into one statement. The moment formulation builds toward the variational characterisation of the Master tier, where the same second derivative reappears as the integrand of the bending energy , and it appears again in the finite-element assembly of 24.04.07, where Hermite/spline elements produce the identical banded, diagonally dominant stiffness pattern. The construction is dual to the Hermite confluent limit of 43.08.01: a spline is what a chain of Hermite cubics becomes once the slopes are not prescribed but solved for so that the curvature also matches. Putting these together, the central insight is that smoothness across seams is a sparse linear constraint, not a dense one, which is the bridge from local interpolation to a global yet cheaply solvable interpolant.
Exercises Intermediate+
Advanced results Master
The elementary theory delivers the spline as the solution of a tridiagonal system; the master layer concerns why that solution is optimal among all smooth interpolants, the sharp order of its convergence, and the projector that makes spline interpolation, unlike high-degree polynomial interpolation, uniformly bounded.
Theorem 1 (minimum bending energy / variational characterisation). Among all interpolating the data , the natural cubic spline is the unique minimiser of the bending energy , with the Pythagorean identity [Holladay 1957]. The clamped spline is the corresponding minimiser within the class additionally matching the prescribed end slopes. The identity is the function-space statement that is the orthogonal projection of any interpolant onto the spline subspace in the seminorm : the cross term vanishes because is piecewise constant and vanishes at the nodes, while the boundary term is killed by at the ends. This is the precise mathematical content of the draughtsman's flexible strip, whose stored elastic energy is, to leading order, .
Theorem 2 (sharp convergence). For and the clamped (or not-a-knot) interpolating cubic spline on a mesh of size , $$ \lVert f - s \rVert_\infty \le \frac{5}{384}, h^4 \lVert f^{(4)} \rVert_\infty, $$ with the constant best possible, and the derivatives converge at the graded orders for [Hall-Meyer 1976]. Thus the spline recovers not only the function to fourth order but its slope, curvature, and even its third derivative to orders — the superconvergence picture that makes cubic splines the default for smooth interpolation and for the construction of geometric curves. The natural end condition degrades the boundary rate to where at the ends, a localised loss that does not propagate into the interior.
Theorem 3 (boundedness of the spline projector). The map sending to its interpolating (not-a-knot or complete) cubic spline is a linear projection onto the spline space , and its -norm operator norm — the spline analogue of the Lebesgue constant of 43.08.02 — is bounded by a constant independent of the mesh: for complete splines on any mesh, and is uniformly bounded for not-a-knot on quasi-uniform meshes [de Boor 2001]. This mesh-independent bound is the structural reason the spline cannot exhibit the Runge phenomenon: where the polynomial interpolation projector has Lebesgue constant growing like for equispaced nodes, the spline projector stays bounded, so converges whenever the best spline approximation does.
Theorem 4 (Hermite error and the confluent remainder). The Hermite interpolant matching value and first derivative at distinct nodes has, for , the error
$$
f(x) - p(x) = \frac{f^{(2n+2)}(\xi(x))}{(2n+2)!}\prod_{k=0}^{n}(x - x_k)^2,
$$
the confluent limit of the Lagrange remainder of 43.08.02 in which each node is doubled and the node polynomial acquires squared factors [Süli-Mayers §6.5]. The squared product is everywhere non-negative, so a value-and-slope Hermite fit at a single pair of nodes has one-signed error, but for many equispaced nodes inherits the endpoint swelling of 43.08.02 amplified by the square: osculation does not defeat Runge. The cubic spline is the resolution — it is, on each subinterval, exactly a cubic Hermite piece whose interior slopes are solved for rather than prescribed, so the degree stays fixed at three while smoothness is achieved globally.
Synthesis. The variational theorem is the foundational reason the cubic spline is the canonical smooth interpolant: it is the unique minimiser of among interpolants, and the orthogonality is exactly the projection statement that organises the whole subject — the same second-derivative object that appears as the moment in the tridiagonal system, as the integrand of the bending energy, and as the curvature whose continuity defines the spline. The central insight is that going piecewise trades one global high-degree polynomial for many fixed-degree cubics coupled only through a sparse, diagonally dominant, -solvable system, and this is precisely what bounds the spline projector independently of the mesh where the polynomial Lebesgue constant of 43.08.02 diverges. Putting these together, the cubic spline is dual to the Hermite confluent limit of 43.08.01: a chain of Hermite cubics whose slopes are not given but determined by demanding the curvature also match, which generalises local osculatory interpolation into a global interpolant with the sharp accuracy of Hall-Meyer. The bridge is that smoothness across seams is a sparse linear constraint and minimum energy is its variational shadow, so the spline at once defeats the Runge divergence that 43.08.02 diagnosed, supplies the shape primitives used in 24.04.07 and in computer-aided geometry, and prefigures the finite-element philosophy of replacing global polynomials by assembled local ones — one principle, piecewise low degree plus matched derivatives, behind interpolation, approximation, and the numerical solution of differential equations alike.
Full proof set Master
Proposition 1 (moment system and existence-uniqueness). For distinct ordered nodes and natural or clamped end conditions, the interpolating cubic spline exists and is unique, its moments solving a strictly diagonally dominant tridiagonal system.
Proof. On , is linear with endpoint values , so . Integrating twice and imposing , determines the two constants, giving $$ s(x) = M_i\frac{(x_{i+1}-x)^3}{6h_i} + M_{i+1}\frac{(x-x_i)^3}{6h_i} + \Big(f_i - \frac{M_i h_i^2}{6}\Big)\frac{x_{i+1}-x}{h_i} + \Big(f_{i+1} - \frac{M_{i+1}h_i^2}{6}\Big)\frac{x-x_i}{h_i}. $$ Differentiating gives the one-sided slopes and, from the left piece, . Imposing continuity and multiplying by yields with , , ; continuity holds automatically as shares across pieces. The natural condition closes the system with ; the clamped condition adds the end rows from matching . Interior rows satisfy and the clamped end rows , so the matrix is strictly diagonally dominant, hence nonsingular (a nonzero kernel vector would, at its largest-modulus entry, violate dominance). The moments are unique; substitution reconstructs .
Proposition 2 (minimum-bending-energy theorem). Let be the natural cubic spline interpolating the data and any interpolant of the same data. Then , so uniquely minimises .
Proof. Put with for all . Then . Integrate the cross term by parts: . The natural condition annihilates the boundary term. On each the cubic spline has constant , so because vanishes at every node. Hence and the Pythagorean identity holds, giving . Equality forces , so and is affine; an affine function vanishing at the nodes is identically zero, so .
Proposition 3 (Hermite confluent remainder). For and the Hermite interpolant matching and at distinct , every admits with .
Proof. Set , monic of degree . For off the node set put and . Since matches value and first derivative at each , both and have double zeros at every ; thus has a double zero at each of the nodes and a simple zero at , accounting for zeros counted with multiplicity. Iterated Rolle (a double zero of is also a zero of , and between consecutive zeros of lies a zero of ) gives at least zeros, and after differentiations has a zero . As has and is monic of degree with , , so and the claim follows.
Proposition 4 ( uniform convergence, complete spline). For the complete cubic spline interpolant on a uniform mesh of size satisfies for an absolute constant (the sharp value being ).
Proof (order, with the constant cited). Let . The moments solve the tridiagonal system whose right-hand side is the centred second difference of , which equals by Taylor expansion of to fourth order [Süli-Mayers §11.5]. Subtracting the exact relation satisfied by (with the consistency error from the difference approximation) gives a tridiagonal system for with right-hand side ; strict diagonal dominance bounds the solution by its right-hand side (Exercise 8's maximum-index argument), so . On each subinterval is the cubic Hermite interpolant of the nodal values and the (spline-determined) slopes; writing via the Hermite/Peano representation on and inserting the nodal second-derivative error propagates the bound to . The sharp constant , attained in the limit by the worst-case quartic, is established by the Peano-kernel optimisation of Hall-Meyer [Hall-Meyer 1976]; the graded derivative bounds follow from differentiating the same representation.
Connections Master
The Hermite interpolant of this unit is the confluent (repeated-node) limit of the Lagrange/Newton construction of
43.08.01: the generalized divided differences are the Hermite-Newton coefficients, and the squared node polynomial in the error is the doubled form of the node polynomial of43.08.02; the cubic spline assembles local Hermite cubics into a global interpolant by solving for the interior slopes rather than prescribing them.The cubic spline directly resolves the Runge phenomenon diagnosed in
43.08.02: where equispaced high-degree polynomial interpolation has a Lebesgue constant growing like , the spline interpolation projector is bounded independently of the mesh, so the spline converges at the sharp rate for smooth functions instead of diverging; the same node polynomial that swelled at the endpoints there is here confined to a single short subinterval where it cannot grow.The tridiagonal moment system and its strict diagonal dominance prefigure the assembly of / finite elements in
24.04.07, where Hermite and spline elements produce the identical banded, diagonally dominant stiffness matrices solved in ; the minimum-bending-energy variational characterisation is the interpolation-theoretic shadow of the energy-minimisation (Ritz) principle on which the finite-element method rests, and the spline is the one-dimensional thin-beam element.The minimum-curvature theorem realises the spline as an orthogonal projection in the second-derivative seminorm, the same projection structure that governs the best approximation by orthogonal polynomials in
43.08.05; both are instances of a Hilbert-space best-approximation theorem, with the spline projecting onto a piecewise-polynomial subspace under the bending-energy inner product and the least-squares approximant projecting onto under a weighted inner product.
Historical & philosophical context Master
The word spline names a thin flexible strip of wood or metal that shipwrights and draughtsmen bent through fixed pegs (ducks) to trace a fair curve; the strip settles into the shape minimising its stored bending energy, which to leading order is . The transfer of this physical object to a mathematical interpolation scheme is due to Isaac Jacob Schoenberg, whose 1946 Quarterly of Applied Mathematics papers introduced spline functions and the contributions to their approximation theory, founding the subject during his wartime work at the Aberdeen Proving Ground. The variational characterisation — that the natural cubic spline uniquely minimises among interpolants — was proved by John C. Holladay in 1957, giving the precise sense in which the mathematical spline reproduces the physical one [Holladay 1957].
Hermite interpolation carries the name of Charles Hermite, whose work on the confluent form of the divided-difference calculus in the 1870s, with Angelo Genocchi, supplied the integral representation that handles repeated nodes and derivative matching. The sharp error analysis of cubic spline interpolation, including the best-possible constant in the uniform bound and the graded convergence of the derivatives, was settled by Charles A. Hall and W. Weston Meyer in 1976 [Hall-Meyer 1976]. The comprehensive computational and approximation-theoretic treatment, including the B-spline basis that makes splines numerically robust and the boundedness of the spline projector, is Carl de Boor's 1978 A Practical Guide to Splines, for which he received the 2003 National Medal of Science [de Boor 2001].
Bibliography Master
@book{sulimayers2003,
author = {S\"{u}li, Endre and Mayers, David F.},
title = {An Introduction to Numerical Analysis},
publisher = {Cambridge University Press},
year = {2003}
}
@book{deboor2001,
author = {de Boor, Carl},
title = {A Practical Guide to Splines},
edition = {Revised},
series = {Applied Mathematical Sciences},
volume = {27},
publisher = {Springer},
year = {2001}
}
@article{holladay1957,
author = {Holladay, John C.},
title = {A smoothest curve approximation},
journal = {Mathematical Tables and Other Aids to Computation},
volume = {11},
number = {60},
year = {1957},
pages = {233--243}
}
@article{hallmeyer1976,
author = {Hall, Charles A. and Meyer, W. Weston},
title = {Optimal error bounds for cubic spline interpolation},
journal = {Journal of Approximation Theory},
volume = {16},
number = {2},
year = {1976},
pages = {105--122}
}
@article{schoenberg1946,
author = {Schoenberg, Isaac J.},
title = {Contributions to the problem of approximation of equidistant data by analytic functions},
journal = {Quarterly of Applied Mathematics},
volume = {4},
year = {1946},
pages = {45--99 and 112--141}
}