📈Interpolation and Approximation
Polynomial Interpolation
Existence and uniqueness, the Lagrange and Newton forms, the barycentric formula and the error term
Every 15 minutes, to a few centimetres
The International GNSS Service combines tracking data from hundreds of ground stations into precise orbits for every GPS, Galileo, GLONASS and BeiDou satellite. Its final product gives each satellite's position to about 2–3 cm — but only at tabulated epochs, every 15 minutes.
A receiver doing precise positioning needs the satellite's position at the exact instant each signal left it — a time that never coincides with a table entry. In 15 minutes a GPS satellite travels about 3,500 km along a curved orbit. A straight line between two table entries misses the true position by tens of kilometres.
Yet processing software routinely recovers the position between epochs to millimetres, from nothing but the tabulated numbers. The method is older than the satellites by two centuries: pass a polynomial through nearby table entries, and evaluate it in between.
💡Existence and uniqueness
Given points with distinct , there is exactly one polynomial of degree at most with for every .
Existence: the construction below. Uniqueness: if two such polynomials existed, their difference would have degree at most and roots — so it is zero. Whatever form we write in — monomials, Lagrange, Newton — it is the same polynomial; the forms differ only in cost and numerical stability.
The Lagrange form. Each basis polynomial ℓⱼ equals 1 at its own node and 0 at all the others, so p takes the value yⱼ at xⱼ by construction.
Newton's form builds the same polynomial one node at a time:
The coefficients are divided differences, , computed by a triangular table: , and so on. Adding a new data point adds one coefficient and leaves the others unchanged, and evaluation by nested multiplication costs . Interpolating ISA air density from a table at 0, 2, …, 10 km gives 0.73645 kg/m³ at 5 km against the tabulated 0.73612 — and adding the 12 km entry keeps the first six coefficients exactly.
Derivation
Why Newton's coefficients are divided differences
Impose the interpolation conditions one node at a time; each new node brings in exactly one new coefficient, because every later term of Newton's form vanishes at the earlier nodes.
Node : every term after contains , so .
Node : , so — the slope of the chord.
Node : . Write ; then most terms cancel and
a difference of slopes divided by the width they span — a discrete second derivative (about ). The pattern continues:
which is the triangular table. A new node adds one new term and leaves alone, because they were fixed by the earlier nodes only.
💡The interpolation error
If has continuous derivatives, then for each there is a in the span of the nodes and with
Two factors: how wiggly is (its high derivatives) and where the nodes are (the node polynomial). For a smooth orbit the derivatives are modest and wins, so the error falls fast with . Outside the span of the nodes the node polynomial grows like : extrapolation is dangerous, which is why ephemeris software always centres its window of epochs on the requested time.
Derivation
The error formula, by Rolle's theorem
Fix a point that is not a node, and write for the node polynomial. Choose the constant so that the function
is zero at ; this is possible because . Now count the zeros of : it vanishes at all nodes (where and ) and at — zeros.
Rolle's theorem: between two zeros of a smooth function its derivative has a zero. So has at least zeros, at least , …, and at least one, at some point . Differentiate times: has degree , so ; is , so . Hence
Finally says , which is the formula above. The same argument with a single node is Taylor's theorem with the Lagrange remainder (lesson 1-3).
📐Interpolating an orbit
A GPS-like orbit ( = 26,560 km, = 0.01, = 55°) tabulated every 15 minutes, interpolated at 06:07:30 with a window of epochs centred on that time:
- 2 epochs (linear): 56 km error;
- 4 epochs (cubic): 170 m;
- 6 epochs: 0.47 m;
- 8 epochs: 0.19 mm;
- 10 epochs (degree 9): 0.02 mm.
Science is built up with facts, as a house is with stones. But a collection of facts is no more a science than a heap of stones is a house.
How to evaluate it. Do not solve the Vandermonde system for monomial coefficients: becomes hopelessly ill-conditioned — for 81 points on — and the result loses most of its digits. The barycentric formula
is the Lagrange form rearranged: per evaluation once the weights are known, and numerically stable. On 81 Chebyshev points it is accurate to while the Vandermonde route is off by .
scipy.interpolate.BarycentricInterpolator implements it.Derivation
The barycentric formula is Lagrange's, rearranged
Every Lagrange basis polynomial contains all the node factors except one. With and the weights above,
Now interpolate the constant function 1. The interpolant of a constant is that constant, so with every :
Divide the first line by the second: cancels and leaves the barycentric formula. The weights are computed once in ; each evaluation then costs and never forms a large monomial coefficient. For the Chebyshev extreme points of lesson 7-2 the weights are even known in closed form — up to a common factor they are with alternating signs, halved at the two ends.
💡Where you will use this
GNSS Navigation: Lagrange interpolation of precise ephemerides and clock tables, exactly as in the lab. Rocket Propulsion and Aircraft Engines: thermochemical tables (enthalpy, specific heat against temperature). Flight software: aerodynamic coefficient tables interpolated at every control cycle. Numerical integration and ODE solvers (Units 8–9): Simpson's rule, Gauss quadrature and Adams methods are all built by integrating interpolating polynomials.
📚Further reading
- Jean-Paul Berrut and Lloyd N. Trefethen, 'Barycentric Lagrange interpolation', SIAM Review 46(3), 501–517 (2004) — why the barycentric formula should replace every other way of evaluating an interpolant.
- Michael Heath, Scientific Computing: An Introductory Survey (2nd ed.; SIAM Classics 2018), chapter 7, 'Interpolation'.
- Endre Süli and David Mayers, An Introduction to Numerical Analysis (Cambridge University Press, 2003), chapter 6, 'Polynomial interpolation' — the error formula and divided differences with full proofs.
↓But there is a problem
For the orbit, more points gave a better answer every time. It seems obvious that this always holds: more data, more accuracy.
In 1901 the German mathematician Carl Runge tried the most natural experiment imaginable — interpolate the smooth, bell-shaped function at more and more equally spaced points on . In the middle the fit improved. Near the ends the polynomial began to oscillate, and the oscillations grew without bound as points were added.