Jump to content

Neville's algorithm

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Dcoetzee (talk | contribs) at 06:54, 12 February 2010 (Restore links to reputable sites with extensive supplementary explanation and visual aids; remove links to immature, poorly-documented implementations). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In mathematics, Neville's algorithm is an algorithm used for polynomial interpolation. Given n + 1 points, there is a unique polynomial of degree ≤ n which goes through the given points. Neville's algorithm evaluates this polynomial.

Neville's algorithm is based on the Newton form of the interpolating polynomial and the recursion relation for the divided differences. It is similar to Aitken's algorithm, which is nowadays not used.

The algorithm

Given a set of n+1 data points (xi, yi) where no two xi are the same, the interpolating polynomial is the polynomial p of degree at most n with the property

p(xi) = yi for all i = 0,…,n

This polynomial exists and it is unique. Neville's algorithm evaluates the polynomial at some point x.

Let pi,j denote the polynomial of degree ji which goes through the points (xk, yk) for k = i, i + 1, …, j. The pi,j satisfy the recurrence relation

This recurrence can calculate p0,n(x), which is the value being sought. This is Neville's algorithm.

For instance, for n = 4, one can use the recurrence to fill the triangular tableau below from the left to the right.

This process yields p0,4(x), the value of the polynomial going through the n + 1 data points (xi, yi) at the point x.

This algorithm needs O(n2) floating point operations.

References

  • Press, William (1992). "§3.1 Polynomial Interpolation and Extrapolation". Numerical Recipes in C. The Art of Scientific Computing (2nd edition ed.). Cambridge University Press. ISBN [[Special:BookSources/978-0-521-43108-8, doi:10.2277/0521431085|978-0-521-43108-8, '"`UNIQ--templatestyles-00000013-QINU`"'[[doi (identifier)|doi]]:[https://doi.org/10.2277%2F0521431085 10.2277/0521431085]]]. {{cite book}}: |edition= has extra text (help); Check |isbn= value: invalid character (help); External link in |chapterurl= and |isbn= (help); Unknown parameter |chapterurl= ignored (|chapter-url= suggested) (help); Unknown parameter |coauthors= ignored (|author= suggested) (help); templatestyles stripmarker in |isbn= at position 20 (help)