Hermite Polynomial Interpolation

Numerical Methods

Source inspiration: (Mathew 2000-2019).

Animations

These animations illustrate the cubic Hermite polynomial, which interpolates both function values and first derivatives at the endpoint nodes. Unlike ordinary polynomial interpolation, Hermite interpolation matches the slope at each node, giving a smoother fit.

Julia source scripts that generated these animations are linked under each case.

Case 1 — Piecewise cubic Hermite for \(\sin(x)\), refining the mesh

Behavior: Piecewise cubic Hermite interpolation uses \(n\) subintervals, each carrying a cubic polynomial that matches \(f\) and \(f'\) at its two endpoints. Doubling \(n\) decreases the maximum error by approximately \(2^4 = 16\), consistent with the \(O(h^4)\) convergence rate.

Julia source

Piecewise cubic Hermite interpolation of sin(x) on 0 to 2pi, showing n=1,2,4,8 intervals; the error shrinks rapidly as the mesh is refined

Case 2 — Hermite basis functions building the interpolant of \(e^x\) on \([0,1]\)

Behavior: The four cubic Hermite basis functions \(H_{00}\), \(H_{10}\), \(H_{01}\), \(H_{11}\) each carry one degree of freedom (a value or derivative at an endpoint). Their weighted combination \(H(x) = y_0 H_{00} + h y_0' H_{10} + y_1 H_{01} + h y_1' H_{11}\) equals the true function at both endpoints and matches the slope there.

Julia source

Four Hermite basis function contributions for e^x on [0,1] revealed one at a time and summed to form the complete cubic Hermite interpolant

Derivation Notes (Planned)

Short derivations will be added to explain the core equations and assumptions.

References

Mathew, John H. 2000-2019. Numerical Analysis - Numerical Methods Modules. https://web.archive.org/web/20190808102217/http://mathfaculty.fullerton.edu/mathews/n2003/NumericalUndergradMod.html.