Polynomial interpolation and node geometry
Build exact fits at samples while separating interpolation error, data sensitivity, and stable evaluation.
On this page
The question for today
What you’ll understand
- Construct a polynomial from distinct sample nodes.
- Identify assumptions behind the interpolation remainder.
- Explain why node placement and evaluation formula both matter.
An interpolant agrees with every supplied sample, yet can behave badly between them. This is not paradoxical: sample agreement constrains a finite set of positions, while the desired approximation lives across an interval. Polynomial interpolation brings three questions together. Does a unique interpolant exist? How much can it amplify errors in the sample values? How accurately can its chosen formula be evaluated? Answering one does not answer the others. We will use a small exact example, then examine why simply increasing a global polynomial's degree can be a poor refinement strategy.
Exact fitting has an algebraic construction
For n+1 distinct real nodes, there is exactly one polynomial of degree at most n taking prescribed values at those nodes. The Lagrange basis builds it from polynomials that equal one at their own node and zero at every other node. Existence follows by adding the weighted basis functions. Uniqueness follows because the difference of two candidates would have n+1 distinct zeros despite degree at most n. Repeated nodes require derivative conditions and a different formulation.
Writing the interpolant in monomial coefficients is mathematically valid, but solving the associated Vandermonde system can be poorly conditioned. A barycentric evaluation formula reuses node-dependent weights and usually offers a better computational route. At an exact node, return that node's supplied value rather than forming a division by zero. Stable evaluation cannot rescue information lost through poorly chosen nodes or noisy data; it addresses the arithmetic of evaluating a particular interpolant, not every aspect of the approximation problem.
Smoothness and nodes jointly control approximation
When the target function has n+1 continuous derivatives over an interval containing the nodes and the evaluation point, the interpolation remainder contains two factors: a high derivative and the product of distances from all nodes. Neither factor is automatically small as degree increases. The famous oscillations of some equally spaced high-degree interpolants show that smoothness alone does not guarantee useful uniform convergence along that particular sequence of nodes. Exact sample matching is weaker than control between samples.
Chebyshev-type nodes cluster toward interval endpoints and control the nodal product more effectively than equally spaced global nodes. Another strategy is to keep degree modest and refine with piecewise polynomials or splines. Choice depends on smoothness, data noise, desired derivatives, and whether new evaluations are available. Extrapolation outside the sampled interval is a separate and often much more sensitive task. An interior accuracy observation should never be silently promoted into an exterior prediction guarantee.
Interpolation can amplify sample uncertainty
Because the interpolant depends linearly on its sample values, a perturbation in each value passes through the same basis. The sum of the absolute basis values bounds worst-case amplification at a point. Its maximum over the interval is the Lebesgue constant. This separates data sensitivity from the target function's approximation error. Even an exact evaluator cannot avoid the amplification permitted by the chosen interpolation operator. Node geometry therefore affects both approximation quality and robustness to measurement noise.
In practice, inspect errors at independent test points rather than just at the fitting nodes. Compare refinements that change nodes or local mesh spacing, and test any requested derivatives separately because differentiation can amplify interpolation errors. If observations are noisy, least squares or regularized fitting may reflect the measurement model better than forcing exact passage through every point. The correct goal is a controlled approximation to the quantity of interest, not the largest possible degree or a visually perfect fit to training samples.
Work it through
Three points determine a quadratic
Interpolate the values y=(1,2,5) at nodes x=(0,1,2), then evaluate at x=1.5.
The Lagrange basis is ℓ₀=(x−1)(x−2)/2, ℓ₁=−x(x−2), and ℓ₂=x(x−1)/2. Check each at the three nodes before using it.
At x=1.5, the basis values are −0.125, 0.75, and 0.375. They sum to one, as required for reproduction of a constant.
The interpolated value is 1(−0.125)+2(0.75)+5(0.375)=−0.125+1.5+1.875=3.25. Expanding the interpolant gives p(x)=x²+1, which confirms the value independently.
If each sample has absolute error at most 0.01, the value at 1.5 can change by at most (0.125+0.75+0.375)×0.01=0.0125. This is a data perturbation bound, not a bound on an unknown target's interpolation error.
The same basis produces the interpolated value and an explicit sensitivity estimate. Exact agreement at nodes alone supplies no target-function error bound.
The living notebook
Explore the model
Interactive lab · function
A polynomial you can inspect exactly
Set a=1 on y=a x². At x=1.5, the plotted value is 2.25; adding the worked example's constant one gives 3.25. Vary a and predict how all sample values would change. The lab shows one quadratic family, tangent, and area; it neither fits samples nor demonstrates high-degree interpolation oscillations.
- y at chosen x
- 0.608
- Tangent slope · 2ax
- 1.35
- Signed area · ax³/3
- 0.182
This lab uses only y = ax². Playback traces the curve within the fixed integration interval from 0 to x; it does not estimate numerical error or change the chosen point. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forAn inspectable exact family checks arithmetic, while claims about interpolation error require node and smoothness analysis.
Pause & reason
Check your understanding
Your turn
Try it yourself
Linearly interpolate f(0)=0 and f(2)=4 at x=0.5. If the target is f(x)=x², find the actual approximation error there.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Find the line through the two supplied points, then compare with the target's independent value.
Compare with the solution
The interpolating line is p(x)=2x, so p(0.5)=1. The quadratic target gives f(0.5)=0.25. Thus f−p=−0.75 and the absolute error is 0.75. Both endpoint errors are zero, which clearly does not bound the interior error by zero.
Keep the idea
Take it with you
- Distinct nodes determine a unique polynomial of bounded degree.
- Remainder formulas require smoothness and reveal the role of node placement.
- Data sensitivity, approximation error, and evaluation stability are separate quantities.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.