From first principles
Construct the unique interpolating polynomial
A polynomial of degree at most \(n\) has \(n+1\) coefficients. To interpolate \(n+1\) distinct abscissae \(x_i\), build one basis polynomial for each measurement. The factors \(x-x_j\) make it vanish at every other node; dividing by its value at \(x_i\) gives unit height there,
At \(x=x_i\) all terms except \(y_i\) disappear. Uniqueness follows because the difference of two such fits would have degree at most \(n\) and at least \(n+1\) distinct roots. The same representation also exposes sensitivity to equal bounded reading errors,
The sum depends on the node placement and the evaluation location. Distinctness ensures existence and uniqueness but gives no guarantee of uniformly small amplification at high degree.
Background · Interpolation condition
The polynomial matches the tabulated values at distinct nodes. Small nodal discrepancies do not guarantee a small error between nodes.
Derivation and applications
Derive barycentric weights from the node polynomial
Every cardinal basis polynomial contains nearly the same product of factors. Factoring out the common part leads to a practical evaluation formula. Assume \(n+1\) distinct real nodes and denote their monic node polynomial by \(L(x)=\prod_{i=0}^n(x-x_i)\). At a root \(x_i\) only one term in the derivative survives. Define a weight using that derivative,
For \(x\) away from the nodes, express the interpolant as \(L(x)\) times a rational sum. Apply the same formula to a polynomial identically equal to one, using the fact that interpolation reproduces constants. The two identities have the same factor \(L(x)\),
Their ratio cancels the product and gives the barycentric form
A common factor in the weights also cancels, allowing rescaling. At a node the individual terms have poles but the limit equals its stored datum; an implementation should return that datum directly on an exact match. The representation improves evaluation without repairing intrinsically poor node placement. If nodes are fixed and many observation sets arrive, their weights can be reused.
Worked example
Reconstruct a calibration at a new input
Use nodes \(0,1,3\), data \(2,1,5\), and common-scaled weights \((2,-3,1)\). At \(x=2\), the three terms in the denominator are \(1,-3,-1\); their data-weighted sum is \(2-3-5=-6\). Thus
Direct construction gives \(p(x)=x^2-2x+2\), confirming the reconstructed value.
Second application
Derive reusable weights for a different measurement grid
For nodes \(-1,0,1,2\), the four products \(L'(x_i)\) are \(-6,2,-2,6\). Multiplying all reciprocals by six gives weights \((-1,3,-3,1)\). At \(x=1/2\), the normalized interpolation weights reduce to \((-1,9,9,-1)/16\). An isolated unit error at the right endpoint changes this midpoint prediction by \(-1/16\), while a uniform shift of all readings by one moves the result by exactly one.
One polynomial through all measurements
Given \(n+1\) distinct nodes \(x_j\), seek one polynomial \(p\) of degree at most \(n\) matching \(y_j\) at each node. Define \(\ell_j(x)=\prod_{i\ne j}(x-x_i)/(x_j-x_i)\). This basis has value one at its own node and zero at all the others, so \(p=\sum_j y_j\ell_j\) satisfies the observations. If another such polynomial existed, the difference would have \(n+1\) separate zeros despite degree at most \(n\). It must vanish identically. Uniqueness concerns exact arithmetic and says little by itself about sensitivity.
For the nodes \(-1,0,1\), the three basis functions are \(x(x-1)/2,\ 1-x^2,\ x(x+1)/2\). At \(x=1/2\) their values are \(-1/8,3/4,3/8\). They sum to one but are not all positive. Consider samples \(2,1,2\): the predicted value is \(1.25\), consistent with the quadratic \(1+x^2\). If the three readings instead carry independent signed perturbations bounded by \(\epsilon\), the possible prediction error at this point reaches
The worst perturbation takes signs matching those of the basis values.
Separate noise and approximation
The maximum of \(\sum_j|\ell_j(x)|\) over the interval, the Lebesgue constant, bounds the operator’s amplification of data errors. A different quantity controls the error of interpolation from exact samples. For sufficiently smooth \(f\), repeating the Rolle argument with \(n+2\) zeros gives
This formula compares the exact function with the selected polynomial. It contains both a geometric factor controlled by the nodes and a higher derivative that may grow quickly with degree. A small geometric factor cannot by itself establish convergence for an arbitrary function.
On \([-1,1]\) let \(T_m(x)=\cos(m\arccos x)\). From the cosine addition formula, \(T_{m+1}=2xT_m-T_{m-1}\) with \(T_0=1,T_1=x\). Thus \(T_m\) is a polynomial of degree \(m\) with leading coefficient \(2^{m-1}\) for \(m\geq1\). Its \(m\) zeros lie at \(\cos[(2k+1)\pi/(2m)]\). Choosing them as interpolation nodes makes the monic geometric factor \(2^{1-m}T_m(x)\), whose maximum magnitude is exactly \(2^{1-m}\).
Why the alternating extrema matter
At the \(m+1\) points \(\cos(k\pi/m)\), this monic factor alternates between its positive and negative extreme. Suppose another monic degree-\(m\) polynomial had a strictly smaller maximum magnitude. Subtract it from the Chebyshev factor. The leading powers cancel, leaving degree at most \(m-1\). At the successive extrema the difference must alternate in sign, forcing at least \(m\) distinct zeros between them. That contradicts its degree. This minimax argument concerns the node polynomial, and explains the deliberate concentration of nodes near the endpoints.
For \(m=3\) the recommended points are \(0,\pm\sqrt3/2\); their monic factor is \(x^3-3x/4\) with magnitude at most 0.25. The equally spaced alternative \(-1,0,1\) has factor \(x^3-x\), whose largest magnitude is
If data already exist at fixed locations, moving them is seldom an option. Subdividing the interval and fitting lower-degree polynomials locally instead limits long-range coupling. For evaluation at many points, barycentric interpolation can reuse stored node weights while avoiding explicit construction of a large monomial coefficient vector.

Predict the degree from the nearest complex singularity
Well-chosen nodes control amplification of data errors. The rate at which a smooth target itself can be approximated also depends on what happens away from the real interval. Write \(x=(z+z^{-1})/2\). The unit circle maps to \([-1,1]\), and the circle \(|z|=\rho>1\) maps to an ellipse with foci at the endpoints. The Chebyshev polynomial obeys \(T_k(x)=(z^k+z^{-k})/2\). Consequently the Laurent coefficients of \(f((z+z^{-1})/2)\) determine the Chebyshev coefficients of \(f\). If the function extends analytically through the closed ellipse and has magnitude at most \(M\) there, the Cauchy coefficient bound gives \(|a_k|\le2M\rho^{-k}\) for \(k\ge1\). Summing this geometric tail bounds the error of the degree-\(n\) truncated series by \(2M\rho^{-n}/(\rho-1)\) on the interval. A real-axis corner invalidates this analytic argument.
A rational response with an exactly measurable tail
For \(0<q<1\), take \(f(x)=(1-q^2)/(1-2qx+q^2)\). With \(x=\cos\theta\), summing the two geometric series in \(qe^{\pm i\theta}\) gives
Its pole at \(x=(q+q^{-1})/2\) lies on the ellipse with parameter \(1/q\). The exact coefficients decay like \(q^k\). At \(x=1\) all omitted terms have the same positive sign. Since \(|T_k|\le1\), the uniform truncation error equals \(2q^{n+1}/(1-q)\).
For \(q=1/3\) the pole is at \(5/3\), and the error equals \(3^{-n}\). Degree six leaves error \(1/729\approx0.00137\). Degree seven reduces it to \(1/2187\approx0.000457\). This establishes a degree for a specified error before constructing a node grid. These exact errors concern the truncated series. An interpolant fitted on Chebyshev nodes combines unresolved modes into lower coefficients and need not have precisely the same error, although analyticity still gives geometric convergence.
Practise on sheet 1 · How close can a pole move before the degree budget fails?. Further reading · University of Oxford · Chebyshev Series, Nick Trefethen · Lecture 3, Chebyshev series, part 2, Smoothness and convergence theorems.
Evaluate without forming monomial coefficients
Define barycentric weights \(w_j=1/\prod_{i\ne j}(x_j-x_i)\). Dividing the Lagrange interpolation formula and the identity \(\sum\ell_j=1\) by the common nodal polynomial gives the evaluation ratio \(\sum_j w_j y_j/(x-x_j)\) divided by \(\sum_j w_j/(x-x_j)\). At an exact interpolation node, return its stored value directly. Multiplying all weights by the same constant has no effect, which is useful for numerical scaling.
For nodes \(-1,0,1\) the weights are proportional to \(1,-2,1\). At \(x=1/2\) with data \(2,1,2\), the weighted numerator is \(4/3-4-4=-20/3\), and the denominator is
Their ratio gives 1.25. This evaluates the very same polynomial as the basis construction. Better arithmetic for evaluation cannot remove an intrinsically large Lebesgue constant associated with a poor set of nodes.
Determine exactly how node errors can reinforce
For fixed distinct interpolation nodes let \(L_j(x)\) denote the cardinal polynomials. Changing the readings by errors \(e_j\) changes a reconstructed value by \(\sum_j e_j L_j(x)\). With independent bounds \(|e_j|\le\delta\), taking absolute values gives an amplification no larger than \(\delta\sum_j|L_j(x)|\). At any fixed evaluation point this bound can be attained by choosing the sign of \(e_j\) to agree with the sign of \(L_j(x)\). The sum of absolute cardinal values is therefore the exact pointwise error amplification for this particular error model.
If all reading errors are a single unknown constant instead, the amplification is exactly one because the cardinal polynomials sum to one. The same nodes have different noise behaviour for coherent offsets and independent bounded perturbations. Statistical independence with equal variances provides a third measure: the output variance is \(\sigma^2\sum_jL_j(x)^2\). The worst pointwise absolute sum, its maximum across the interval, and this root-sum-of-squares factor should not be interchanged. They correspond to questions about adversarial signs, location and probabilistic noise, respectively.
Check a three-station calibration inside and beyond its range
Take stations at \(-1,0,1\). Their cardinal polynomials are \(x(x-1)/2,\ 1-x^2,\ x(x+1)/2\). At \(x=1/2\) they take values \((-1/8,3/4,3/8)\). The weights sum to one, but their absolute values sum to \(5/4\). If each observation is accurate to within 0.02 units, the interpolated calibration can be wrong by 0.025 from observations alone. The specific error pattern \((-0.02,0.02,0.02)\) attains that value. Polynomial exactness for noise-free quadratic inputs provides no protection against that sign pattern.
With independent standard deviations 0.02, the same evaluation instead has standard deviation \(0.02\sqrt{1/64+9/16+9/64}=0.02\sqrt{46}/8\approx0.01696\). The smaller value follows from the assumed random cancellation and is not a guaranteed bound. At \(x=2\), beyond the calibration interval, the same weights become \(1,-3,3\). The worst bounded measurement error is now \(7(0.02)=0.14\). Every tabulated station can pass a calibration check while extrapolation is seven times more sensitive than an original reading.
Inside \([0,1]\) the absolute sum simplifies to \(1+x-x^2\); its maximum occurs at one half and equals \(5/4\). Symmetry gives the same maximum on the other half. For quadratic interpolation this gives a complete guarantee throughout the stated interval, with construction of the worst perturbation. A graph of the fitted polynomial itself would reveal none of these conditioning facts. A sensor specification therefore needs both an admissible evaluation range and a description of how the raw station errors may vary together.
The maximum amplification also gives a way to compare retrospective calibrations. If a process must meet a total error of 0.03 units and each raw persistent bounded error may be as large as 0.02, the three-point design leaves at most \(0.03-1.25(0.02)=0.005\) units for polynomial approximation bias throughout the interval. A check at the three stations themselves would assign a larger remaining allowance and would miss the interior maximum.
Change parameters · Polynomial interpolation and node placement
Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.
Study the full derivation
Integrating cosine interpolants on nested grids · Function approximation and numerical integration
Chebyshev points turn polynomial interpolation into a cosine series. Derive the exact moments of each basis polynomial, explain aliasing and find a case where two consecutive quadrature grids confidently agree on the wrong answer.