Lagrange interpolation
The Lagrange basis functions, the cardinal property that defines them, the polynomial as a direct combination of the data, its error and a worked example with the census data.
Cardinal basis functions
Lagrange builds the same unique polynomial in direct, symmetric form. The functions equal 1 at their node and 0 at the others:
The numerator has all factors except ; the denominator has all except . With these functions the polynomial is a combination of the known values:
To check this at a specific node , evaluate the polynomial there:
The cardinal property cancels all basis functions except the one attached to the node :
Only the term remains, and the interpolant reproduces the datum at that node:
Newton versus Lagrange
- Lagrange is direct and symmetric: ideal for few nodes and for deriving rules (quadrature, differentiation).
- Newton is incremental: adding a node costs one term, not a full rebuild.
- Both give the same polynomial and share the same error bound.
Worked example
With the same census data (1971–2011), build the degree-4 Lagrange polynomial and estimate the 2005 population.
Each has the four factors of the other nodes. For example, for :
The polynomial sums each times its value :
The result matches (up to rounding) the Newton one, as uniqueness requires: