HOME

TheInfoList



OR:

In
numerical analysis Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of numerical methods th ...
, polynomial interpolation is the
interpolation In the mathematical field of numerical analysis, interpolation is a type of estimation, a method of constructing (finding) new data points based on the range of a discrete set of known data points. In engineering and science, one often has ...
of a given bivariate
data set A data set (or dataset) is a collection of data. In the case of tabular data, a data set corresponds to one or more database tables, where every column of a table represents a particular variable, and each row corresponds to a given record of the d ...
by the
polynomial In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An ex ...
of lowest possible degree that passes through the points of the dataset. Given a set of data points (x_0,y_0), \ldots, (x_n,y_n), with no two x_j the same, a polynomial function p(x)=a_0+a_1x+\cdots+a_nx^n is said to interpolate the data if p(x_j)=y_j for each j\in\. There is always a unique such polynomial, commonly given by two explicit formulas, the
Lagrange polynomial In numerical analysis, the Lagrange interpolating polynomial is the unique polynomial of lowest degree that interpolates a given set of data. Given a data set of coordinate pairs (x_j, y_j) with 0 \leq j \leq k, the x_j are called ''nodes'' an ...
s and
Newton polynomial In the mathematical field of numerical analysis, a Newton polynomial, named after its inventor Isaac Newton, is an interpolation polynomial for a given set of data points. The Newton polynomial is sometimes called Newton's divided differences inte ...
s.


Applications

The original use of interpolation polynomials was to approximate values of important
transcendental function In mathematics, a transcendental function is an analytic function that does not satisfy a polynomial equation, in contrast to an algebraic function. In other words, a transcendental function "transcends" algebra in that it cannot be expressed alg ...
s such as
natural logarithm The natural logarithm of a number is its logarithm to the base of the mathematical constant , which is an irrational and transcendental number approximately equal to . The natural logarithm of is generally written as , , or sometimes, if ...
and
trigonometric function In mathematics, the trigonometric functions (also called circular functions, angle functions or goniometric functions) are real functions which relate an angle of a right-angled triangle to ratios of two side lengths. They are widely used in ...
s. Starting with a few accurately computed data points, the corresponding interpolation polynomial will approximate the function at an arbitrary nearby point. Polynomial interpolation also forms the basis for algorithms in
numerical quadrature In analysis, numerical integration comprises a broad family of algorithms for calculating the numerical value of a definite integral, and by extension, the term is also sometimes used to describe the numerical solution of differential equations ...
(
Simpson's rule In numerical integration, Simpson's rules are several approximations for definite integrals, named after Thomas Simpson (1710–1761). The most basic of these rules, called Simpson's 1/3 rule, or just Simpson's rule, reads \int_a^b f(x) ...
) and
numerical ordinary differential equations Numerical methods for ordinary differential equations are methods used to find numerical approximations to the solutions of ordinary differential equations (ODEs). Their use is also known as "numerical integration", although this term can also ...
(
multigrid method In numerical analysis, a multigrid method (MG method) is an algorithm for solving differential equations using a hierarchy of discretizations. They are an example of a class of techniques called multiresolution methods, very useful in problems exhi ...
s). In
computer graphics Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great deal ...
, polynomials can be used to approximate complicated plane curves given a few specified points, for example the shapes of letters in
typography Typography is the art and technique of arranging type to make written language legible, readable and appealing when displayed. The arrangement of type involves selecting typefaces, point sizes, line lengths, line-spacing ( leading), an ...
. This is usually done with
Bézier curve A Bézier curve ( ) is a parametric curve used in computer graphics and related fields. A set of discrete "control points" defines a smooth, continuous curve by means of a formula. Usually the curve is intended to approximate a real-world shape ...
s, which are a simple generalization of interpolation polynomials (having specified tangents as well as specified points). In numerical analysis, polynomial interpolation is essential to perform sub-quadratic multiplication and squaring, such as
Karatsuba multiplication The Karatsuba algorithm is a fast multiplication algorithm. It was discovered by Anatoly Karatsuba in 1960 and published in 1962. Knuth D.E. (1969) ''The Art of Computer Programming. v.2.'' Addison-Wesley Publ.Co., 724 pp. It is a div ...
and
Toom–Cook multiplication Toom–Cook, sometimes known as Toom-3, named after Andrei Toom, who introduced the new algorithm with its low complexity, and Stephen Cook, who cleaned the description of it, is a multiplication algorithm for large integers. Given two large integ ...
, where interpolation through points on a product polynomial yields the specific product required. For example, given ''a'' = ''f''(''x'') = ''a''0''x''0 + ''a''1''x''1 + ··· and ''b'' = ''g''(''x'') = ''b''0''x''0 + ''b''1''x''1 + ···, the product ''ab'' is a specific value of ''W''(''x'') = ''f''(''x'')''g''(''x''). One may easily find points along ''W''(''x'') at small values of ''x'', and interpolation based on those points will yield the terms of ''W''(''x'') and the specific product ''ab''. As fomulated in Karatsuba multiplication, this technique is substantially faster than quadratic multiplication, even for modest-sized inputs, especially on parallel hardware. In
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to practical disciplines (includin ...
, polynomial interpolation also leads to algorithms for secure multi party computation and
secret sharing Secret sharing (also called secret splitting) refers to methods for distributing a secret among a group, in such a way that no individual holds any intelligible information about the secret, but when a sufficient number of individuals combine th ...
.


Interpolation theorem

For any n+1 bivariate data points (x_0,y_0),\dotsc,(x_n,y_n) \in \R^2, where no two x_j are the same, there exists a unique polynomial p(x) of degree at most n that interpolates these points, i.e. p(x_0)=y_0, \ldots, p(x_n)=y_n. Equivalently, for a fixed choice of interpolation nodes x_j, polynomial interpolation defines a linear bijection L_n between the (''n''+1)-tuples of real-number values (y_0,\ldots,y_n)\in \R^ and the
vector space In mathematics and physics, a vector space (also called a linear space) is a set whose elements, often called '' vectors'', may be added together and multiplied ("scaled") by numbers called '' scalars''. Scalars are often real numbers, but ...
P(n) of real polynomials of degree at most ''n'': L_n : \mathbb^ \stackrel\, P(n). This is a type of unisolvence theorem. The theorem is also valid over any infinite
field Field may refer to: Expanses of open ground * Field (agriculture), an area of land used for agricultural purposes * Airfield, an aerodrome that lacks the infrastructure of an airport * Battlefield * Lawn, an area of mowed grass * Meadow, a grass ...
in place of the real numbers \R, for example the rational or complex numbers.


First proof

Consider the Lagrange basis functions L_1(x),\ldots,L_n(x) given by: L_j(x)=\prod_\frac = \frac . Notice that L_j(x) is a polynomial of degree n, and we have L_j(x_k)=0 for each j\neq k, while L_k(x_k)=1. It follows that the linear combination: p(x) = \sum_^n y_j L_j(x) has p(x_k)=\sum_j y_j \,L_j(x_k) = y_k , so p(x) is an interpolating polynomial of degree n. To prove uniqueness, assume that there exists another interpolating polynomial q(x) of degree at most n, so that p(x_k)=q(x_k) for all k=0,\dotsc,n. Then p(x)-q(x) is a polynomial of degree at most n which has n+1 distinct zeros (the x_k). But a non-zero polynomial of degree at most n can have at most n zeros, so p(x)-q(x) must be the zero polynomial, i.e. p(x)=q(x).


Second proof

Write out the interpolation polynomial in the form Substituting this into the interpolation equations p(x_j) = y_j, we get a system of linear equations in the coefficients a_j, which reads in matrix-vector form as the following
multiplication Multiplication (often denoted by the cross symbol , by the mid-line dot operator , by juxtaposition, or, on computers, by an asterisk ) is one of the four elementary mathematical operations of arithmetic, with the other ones being ad ...
: \begin x_0^n & x_0^ & x_0^ & \ldots & x_0 & 1 \\ x_1^n & x_1^ & x_1^ & \ldots & x_1 & 1 \\ \vdots & \vdots & \vdots & & \vdots & \vdots \\ x_n^n & x_n^ & x_n^ & \ldots & x_n & 1 \end \begin a_n \\ a_ \\ \vdots \\ a_0 \end = \begin y_0 \\ y_1 \\ \vdots \\ y_n \end. An interpolant p(x) corresponds to a solution A = (a_n,\ldots,a_0) of the above matrix equation X \cdot A = Y. The matrix ''X'' on the left is a
Vandermonde matrix In linear algebra, a Vandermonde matrix, named after Alexandre-Théophile Vandermonde, is a matrix with the terms of a geometric progression in each row: an matrix :V=\begin 1 & x_1 & x_1^2 & \dots & x_1^\\ 1 & x_2 & x_2^2 & \dots & x_2^\\ 1 & x ...
, whose determinant is known to be \textstyle \det(X) = \prod_ (x_j - x_i), which is non-zero since the nodes x_j are all distinct. This ensures that the matrix is
invertible In mathematics, the concept of an inverse element generalises the concepts of opposite () and reciprocal () of numbers. Given an operation denoted here , and an identity element denoted , if , one says that is a left inverse of , and that ...
and the equation has the unique solution A = X^\cdot Y; that is, p(x) exists and is unique.


Corollary

If f(x) is a polynomial of degree at most n, then the interpolating polynomial of f(x) at n+1 distinct points is f(x) itself.


Constructing the interpolation polynomial


Lagrange Interpolation

We may write down the polynomial immediately in terms of
Lagrange polynomial In numerical analysis, the Lagrange interpolating polynomial is the unique polynomial of lowest degree that interpolates a given set of data. Given a data set of coordinate pairs (x_j, y_j) with 0 \leq j \leq k, the x_j are called ''nodes'' an ...
s as: \begin p(x) &= \frac y_0 \\ pt &+ \fracy_1 \\ pt &+ \cdots\\ pt &+\fracy_n \\ pt&=\sum_^n \Biggl( \prod_ \frac \Biggr) y_i =\sum_^n \frac\,y_i \endFor matrix arguments, this formula is called
Sylvester's formula In matrix theory, Sylvester's formula or Sylvester's matrix theorem (named after J. J. Sylvester) or Lagrange−Sylvester interpolation expresses an analytic function of a matrix as a polynomial in , in terms of the eigenvalues and eigenvectors ...
and the matrix-valued Lagrange polynomials are the
Frobenius covariant In matrix theory, the Frobenius covariants of a square matrix In mathematics, a square matrix is a matrix with the same number of rows and columns. An ''n''-by-''n'' matrix is known as a square matrix of order Any two square matrices of the same ...
s. :


Newton Interpolation


Theorem

For a polynomial p_n of degree less than or equal to n, that interpolates f at the nodes x_i where i = 0,1,2,3,\cdots,n. Let p_ be the polynomial of degree less than or equal to n+1 that interpolates f at the nodes x_i where i = 0,1,2,3,\cdots,n, n+1. Then p_ is given by:p_(x) = p_n(x) +a_w_n(x) where w_n(x) := \prod_^n (x-x_i) also known as Newton basis and a_ := . Proof: This can be shown for the case where i = 0,1,2,3,\cdots,n:p_(x_i) = p_n(x_i) +a_\prod_^n (x_i-x_j) = p_n(x_i) and when i = n+1:p_(x_) = p_n(x_) + w_n(x_) = f(x_) By the uniqueness of interpolated polynomials of degree less than n+1, p_(x) = p_n(x) +a_w_n(x) is the required polynomial interpolation. The function can thus be expressed as: p_(x) = a_0+a_1(x-x_0)+a_2(x-x_0)(x-x_1)+\cdots + a_n(x-x_0)\cdots(x-x_) .


Polynomial coefficients

To find a_i, we have to solve the
lower triangular matrix In mathematics, a triangular matrix is a special kind of square matrix. A square matrix is called if all the entries ''above'' the main diagonal are zero. Similarly, a square matrix is called if all the entries ''below'' the main diagonal are ...
formed by arranging p_ (x_i)=f(x_i)=y_i from above equation in matrix form: : \begin 1 & & \ldots & & 0 \\ 1 & x_1-x_0 & & & \\ 1 & x_2-x_0 & (x_2-x_0)(x_2-x_1) & & \vdots \\ \vdots & \vdots & & \ddots & \\ 1 & x_k-x_0 & \ldots & \ldots & \prod_^(x_n - x_j) \end \begin a_0 \\ \\ \vdots \\ \\ a_ \end = \begin y_0 \\ \\ \vdots \\ \\ y_ \end The coefficients are derived as : a_j := _0,\ldots,y_j/math> where : _0,\ldots,y_j/math> is the notation for
divided differences In mathematics, divided differences is an algorithm, historically used for computing tables of logarithms and trigonometric functions. Charles Babbage's difference engine, an early mechanical calculator, was designed to use this algorithm in its ...
. Thus,
Newton polynomial In the mathematical field of numerical analysis, a Newton polynomial, named after its inventor Isaac Newton, is an interpolation polynomial for a given set of data points. The Newton polynomial is sometimes called Newton's divided differences inte ...
s are used to provide polynomial interpolation formula of n points.


Newton forward formula

The Newton polynomial can be expressed in a simplified form when x_0, x_1, \dots, x_k are arranged consecutively with equal spacing. If x_0, x_1, \dots, x_k are consecutively arranged and equally spaced with _=_+ih for ''i'' = 0, 1, ..., ''k'' and some variable x is expressed as =_+sh, then the difference x-x_i can be written as (s-i)h. So the Newton polynomial becomes : \begin N(x) &= _0+ _0,y_1h + \cdots + _0,\ldots,y_ks (s-1) \cdots (s-k+1)^ \\ &= \sum_^s(s-1) \cdots (s-i+1)^ _0,\ldots,y_i\\ &= \sum_^i!^ _0,\ldots,y_i \end Since relationship between divided differences and forward differences is given as: _j, y_, \ldots , y_= \frac\Delta^y_j,Taking y_i=f(x_i), if the representation of x in the previous sections was instead taken to be x=x_j+sh, the Newton forward interpolation formula is expressed as:f(x) \approx N(x)=N(x_j+sh) = \sum_^\Delta^ f(x_j) which is interpolation of all points after x_j. It is expanded as:f(x_j+sh)=f(x_j)+\frac\Delta f(x_j)+ \frac\Delta^2 f(x_j)+\frac\Delta^3 f(x_j)+\frac\Delta^4 f(x_j)+\cdots


Newton backward formula

If the nodes are reordered as _,_,\dots,_, the Newton polynomial becomes : N(x)= _k
, _ The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline o ...
x-_)+\cdots+ ,\ldots,_x-_)(x-_)\cdots(x-_). If _,\;_,\;\dots,\;_ are equally spaced with _=_-(k-i)h for ''i'' = 0, 1, ..., ''k'' and =_+sh, then, : \begin N(x) &=
, _ The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline o ...
h+\cdots+ ,\ldots,_(s+1)\cdots(s+k-1)^ \\ &=\sum_^^i!^ ,\ldots,_ \end Since relationship between divided differences and backward differences is given as: , y_,\ldots,_= \frac\nabla^y_j, taking y_i=f(x_i), if the representation of x in the previous sections was instead taken to be x=x_j+sh, the Newton backward interpolation formula is expressed as:f(x) \approx N(x) =N(x_j+sh)=\sum_^^\nabla^ f(x_j). which is interpolation of all points before x_j. It is expanded as:f(x_j+sh)=f(x_j)+\frac\nabla f(x_j)+ \frac\nabla^2 f(x_j)+\frac\nabla^3 f(x_j)+\frac\nabla^4 f(x_j)+\cdots


Lozenge Diagram

Lozenge diagram is a diagram that is used to describe different interpolation formulas that can be constructed for a given data set. A line starting on the left edge and tracing across the diagram to the right can be used to represent an interpolation formula if the following rules are followed: # Left to right steps indicate addition whereas right to left steps indicate subtraction # If slope of step is positive, the term to be used is product of the difference and the factor immediately below it. If slope of step is negative, the term to be used is product of the difference and the factor immediately above it. # If step is horizontal and passes through a factor, use the product of the factor and average of two terms immediately above and below it. If step is horizontal and passes through a difference, use the product of the difference and average of two terms immediately above and below it. The factors are expressed using the formula:C(u+k,n)=\frac


Proof of equivalence

If a path goes from \Delta^y_s to \Delta^y_ , it can connect through three intermediate steps, (a) through \Delta^y_ , (b) through C(u-s ,n) or (c) through \Delta^y_s . Proving the equivalence of these three two-step paths should prove that all (n-step) paths can be morphed with the same starting and ending, all of which represents the same formula. Path (a): C(u-s, n) \Delta^n y_+C(u-s+1, n+1) \Delta^ y_ Path (b): C(u-s, n) \Delta^n y_s + C(u-s, n+1) \Delta^ y_ Path (c): C(u-s, n) \frac \quad+\frac \Delta^ y_ Subtracting contributions from path a and b: \begin \text= & C(u-s, n)(\Delta^n y_-\Delta^n y_s) +(C(u-s+1, n+1)-C(u-s, n-1)) \Delta^ y_ \\ = & - C(u-s, n)\Delta^ y_ + C(u-s, n) \frac \Delta^ y_ \\ = & C(u-s, n)(-\Delta^ y_+\Delta^ y_ )=0 \\ \end Thus, the contribution of either path (a) or path (b) is the same. Since path (c) is the average of path (a) and (b), it also contributes identical function to the polynomial. Hence the equivalence of paths with same starting and ending points is shown. To check if the paths can be shifted to different values in the leftmost corner, taking only two step paths is sufficient: (a) y_ to y_ through \Delta y_ or (b) factor between y_ and y_ , to y_ through \Delta y_ or (c) starting from y_ . Path (a) y_+C(u-s-1,1) \Delta y_s - C(u-s, 1) \Delta y_s Path (b) \frac+\frac \Delta y_s - C(u-s, 1) \Delta y_s Path (c) y_ Since \Delta y_ = y_-y_s , substituting in the above equations shows that all the above terms reduce to y_ and are hence equivalent. Hence these paths can be morphed to start from the leftmost corner and end in a common point.


Newton formula

Taking negative slope transversal from y_0 to \Delta^n y_0 gives the interpolation formula of all the n+1 consecutively arranged points, equivalent to Newton's forward interpolation formula: \begin y(s) &=y_0+C(s, 1) \Delta y_0+C(s, 2) \Delta^2 y_0+C(s, 3) \Delta^3 y_0+\cdots \\ & =y_0+s \Delta y_0+\frac \Delta^2 y_0+\frac \Delta^3 y_0+\frac \Delta^4 y_0+\cdots \end whereas, taking positive slope transversal from y_n to \nabla^n y_n = \Delta^n y_0 , gives the interpolation formula of all the n+1 consecutively arranged points, equivalent to Newton's backward interpolation formula: \begin y(u) & = y_k+C(u-k, 1) \Delta y_+C(u-k+1,2) \Delta^2 y_ +C(u - k+2,3) \Delta^3 y_+\cdots \\ & = y_k+(u-k) \Delta y_ +\frac \Delta^2 y_+\frac \Delta^3 y_+\cdots \\ y(k+s) & = y_k+(s) \nabla y_ +\frac \nabla^2 y_+\frac \nabla^3 y_+\frac \nabla^4 y_+\cdots \\ \end where s=u-k is the number corresponding to that introduced in Newton interpolation.


Gauss formula

Taking a zigzag line towards the right starting from y_0 with negative slope, we get Gauss forward formula: y(u)=y_0+u \Delta y_0+\frac \Delta^2 y_ +\frac \Delta^3 y_+ \frac \Delta^4 y_ + \cdots whereas starting starting from y_0 with positive slope, we get Gauss backward formula: y(u)=y_0+u \Delta y_+\frac \Delta^2 y_ +\frac \Delta^3 y_+ \frac \Delta^4 y_ + \cdots


Stirling formula

By taking a horizontal path towards the right starting from y_0 , we get Stirling formula: \begin y(u)&= y_0 +u \frac+\frac \Delta^2 y_ +C(u+1,3) \frac+\cdots \\ & = y_0+u \frac+\frac \Delta^2 y_+\frac \frac+\frac\Delta^4 y_+\cdots \end Stirling formula is the average of Gauss forward and Gauss backward formulas.


Bessel formula

By taking a horizontal path towards the right starting from factor between y_0 and y_1 , we get Stirling formula: \begin y(u)&=1+\Delta y_+C(u,2)+\cdots\\ &= \frac+\left(u-\right)\Delta y_+\frac\frac+\frac\Delta^ y_ + \frac\frac+\cdots\\ \end


Vandermonde Algorithms

The
Vandermonde matrix In linear algebra, a Vandermonde matrix, named after Alexandre-Théophile Vandermonde, is a matrix with the terms of a geometric progression in each row: an matrix :V=\begin 1 & x_1 & x_1^2 & \dots & x_1^\\ 1 & x_2 & x_2^2 & \dots & x_2^\\ 1 & x ...
in the second proof above may have large
condition number In numerical analysis, the condition number of a function measures how much the output value of the function can change for a small change in the input argument. This is used to measure how sensitive a function is to changes or errors in the inpu ...
, causing large errors when computing the coefficients if the system of equations is solved using
Gaussian elimination In mathematics, Gaussian elimination, also known as row reduction, is an algorithm for solving systems of linear equations. It consists of a sequence of operations performed on the corresponding matrix of coefficients. This method can also be used ...
. Several authors have therefore proposed algorithms which exploit the structure of the Vandermonde matrix to compute numerically stable solutions in O(''n''2) operations instead of the O(''n''3) required by Gaussian elimination. These methods rely on constructing first a Newton interpolation of the polynomial and then converting it to a
monomial form In mathematics the monomial basis of a polynomial ring is its basis (as a vector space or free module over the field or ring of coefficients) that consists of all monomials. The monomials form a basis because every polynomial may be uniquely w ...
.


Non-Vandermonde algorithms

To find the interpolation polynomial ''p''(''x'') in the vector space ''P''(''n'') of polynomials of degree , we may use the usual
monomial basis In mathematics the monomial basis of a polynomial ring is its basis (as a vector space or free module over the field or ring of coefficients) that consists of all monomials. The monomials form a basis because every polynomial may be uniquely ...
for ''P''(''n'') and invert the Vandermonde matrix by Gaussian elimination, giving a
computational cost In computational complexity theory, a computational resource is a resource used by some computational models in the solution of computational problems. The simplest computational resources are computation time, the number of steps necessary to s ...
of O(''n''3) operations. To improve this algorithm, a more convenient basis for ''P''(''n'') can simplify the calculation of the coefficients, which must then be translated back in terms of the
monomial basis In mathematics the monomial basis of a polynomial ring is its basis (as a vector space or free module over the field or ring of coefficients) that consists of all monomials. The monomials form a basis because every polynomial may be uniquely ...
. One method is to write the interpolation polynomial in the
Newton form Newton most commonly refers to: * Isaac Newton (1642–1726/1727), English scientist * Newton (unit), SI unit of force named after Isaac Newton Newton may also refer to: Arts and entertainment * ''Newton'' (film), a 2017 Indian film * Newton ( ...
(i.e. using Newton basis) and use the method of
divided differences In mathematics, divided differences is an algorithm, historically used for computing tables of logarithms and trigonometric functions. Charles Babbage's difference engine, an early mechanical calculator, was designed to use this algorithm in its ...
to construct the coefficients, e.g.
Neville's algorithm In mathematics, Neville's algorithm is an algorithm used for polynomial interpolation that was derived by the mathematician Eric Harold Neville in 1934. Given ''n'' + 1 points, there is a unique polynomial of degree ''≤ n'' which goes through the ...
. The cost is O(''n''2) operations. Furthermore, you only need to do O(''n'') extra work if an extra point is added to the data set, while for the other methods, you have to redo the whole computation. Another method is preferred when the aim is not to compute the ''coefficients'' of ''p''(''x''), but only a ''single value'' ''p''(''a'') at a point ''x = a'' not in the original data set. The
Lagrange form In numerical analysis, the Lagrange interpolating polynomial is the unique polynomial of lowest degree that interpolates a given set of data. Given a data set of coordinate pairs (x_j, y_j) with 0 \leq j \leq k, the x_j are called ''nodes'' an ...
computes the value ''p''(''a'') with complexity O(''n''2). The
Bernstein form In the mathematical field of numerical analysis, a Bernstein polynomial is a polynomial that is a linear combination of Bernstein basis polynomials. The idea is named after Sergei Natanovich Bernstein. A numerically stable way to evaluate poly ...
was used in a constructive proof of the
Weierstrass approximation theorem Karl Theodor Wilhelm Weierstrass (german: link=no, Weierstraß ; 31 October 1815 – 19 February 1897) was a German mathematician often cited as the "father of modern analysis". Despite leaving university without a degree, he studied mathematics ...
by
Bernstein Bernstein is a common surname in the German language, meaning "amber" (literally "burn stone"). The name is used by both Germans and Jews, although it is most common among people of Ashkenazi Jewish heritage. The German pronunciation is , but in En ...
and has gained great importance in computer graphics in the form of
Bézier curve A Bézier curve ( ) is a parametric curve used in computer graphics and related fields. A set of discrete "control points" defines a smooth, continuous curve by means of a formula. Usually the curve is intended to approximate a real-world shape ...
s.


Interpolations as linear combinations of values

Given a set of (position, value) data points (x_0, y_0), \ldots, (x_j, y_j), \ldots, (x_n, y_n) where no two positions x_j are the same, the interpolating polynomial y(x) may be considered as a linear combination of the values y_j, using coefficients which are polynomials in x depending on the x_j. For example, the interpolation polynomial in the
Lagrange form In numerical analysis, the Lagrange interpolating polynomial is the unique polynomial of lowest degree that interpolates a given set of data. Given a data set of coordinate pairs (x_j, y_j) with 0 \leq j \leq k, the x_j are called ''nodes'' an ...
is the linear combination y(x) := \sum_^ y_j c_j(x) with each coefficient c_j(x) given by the corresponding Lagrange basis polynomial on the given positions x_j: c_j(x) = L_j(x_0,\ldots,x_n;x) = \prod_ \frac = \frac \cdots \frac \frac \cdots \frac. Since the coefficients depend only on the positions x_j, not the values y_j, we can use the ''same coefficients'' to find the interpolating polynomial for a second set of data points (x_0, v_0), \ldots, (x_n, v_n) at the same positions: v(x) := \sum_^ v_j c_j(x). Furthermore, the coefficients c_j(x) only depend on the relative spaces x_i-x_j between the positions. Thus, given a third set of data whose points are given by the new variable t = ax+b (an
affine transformation In Euclidean geometry, an affine transformation or affinity (from the Latin, ''affinis'', "connected with") is a geometric transformation that preserves lines and parallelism, but not necessarily Euclidean distances and angles. More generall ...
of x, inverted by x=\tfrac): (t_0, w_0), \ldots, (t_j, w_j) \ldots, (t_n, w_n) \qquad \text\qquad t_j = ax_j + b, we can use a transformed version of the previous coefficient polynomials:
\tilde c_j(t) := c_j(\tfrac) = c_j(x),
and write the interpolation polynomial as:
w(t) := \sum_^ w_j \tilde c_j(t).
Data points (x_j,y_j) often have ''equally spaced positions'', which may be normalized by an affine transformation to x_j = j. For example, consider the data points
(0,y_0), (1,y_1), (2,y_2).
The interpolation polynomial in the Lagrange form is the linear combination \begin y(x) := \sum_^2 y_j c_j(x) &= y_0 \frac + y_1 \frac + y_2 \frac \\ &= \tfrac12 y_0 (x-1)(x-2) - y_1 (x-0)(x-2) + \tfrac12 y_2 (x-0)(x-1). \end For example, y(3) = y_3 = y_0 - 3y_1 + 3y_2 and y(1.5) = y_ = \tfrac18 (-y_0 + 6y_1 + 3y_2). The case of equally spaced points can also be treated by the
method of finite differences A difference engine is an automatic mechanical calculator designed to tabulate polynomial functions. It was designed in the 1820s, and was first created by Charles Babbage. The name, the difference engine, is derived from the method of divided d ...
. The first difference of a sequence of values v=\_^\infty is the sequence \Delta v = u = \_^\infty defined by u_j = v_-v_j . Iterating this operation gives the ''n''th difference operation \Delta^n v = u, defined explicitly by:u_j = \sum_^n (-1)^ v_, where the coefficients form a signed version of Pascal's triangle, the triangle of binomial transform coefficients: A polynomial y(x) of degree ''d'' defines a sequence of values at positive integer points, y_j = y(j), and the (d+1)^ difference of this sequence is identically zero:
\Delta^ y = 0.
Thus, given values y_0,\ldots,y_n at equally spaced points, where n=d+1 , we have: (-1)^n y_0 + (-1)^ \binom y_1 + \cdots - \binom n y_ + y_n= 0. For example, 4 equally spaced data points y_0,y_1,y_2,y_3 of a quadratic y(x) obey 0 = -y_0 + 3y_1 - 3y_2 + y_3, and solving for y_3 gives the same interpolation equation obtained above using the Lagrange method.


Interpolation error: Lagrange remainder formula

When interpolating a given function ''f'' by a polynomial p_n of degree at the nodes ''x''0,..., ''x''''n'' we get the error f(x) - p_n(x) = f _0,\ldots,x_n,x\prod_^n (x-x_i) where f _0,\ldots,x_n,x/math> is the (''n''+1)st
divided difference In mathematics, divided differences is an algorithm, historically used for computing tables of logarithms and trigonometric functions. Charles Babbage's difference engine, an early mechanical calculator, was designed to use this algorithm in its ...
of the data points
(x_0,f(x_0)),\ldots,(x_n,f(x_n)),(x,f(x)) .
Furthermore, there is a ''Lagrange remainder form'' of the error, for a function ''f'' which is times continuously differentiable on a closed interval I, and a polynomial p_n(x) of degree at most that interpolates ''f'' at distinct points x_0,\ldots,x_n\in I. For each x\in I there exists \xi\in I such that f(x) - p_n(x) = \frac \prod_^n (x-x_i). This error bound suggests choosing the interpolation points to minimize the product \left , \prod (x - x_i) \right , , which is achieved by the
Chebyshev nodes In numerical analysis, Chebyshev nodes are specific real algebraic numbers, namely the roots of the Chebyshev polynomials of the first kind. They are often used as nodes in polynomial interpolation because the resulting interpolation polynomial ...
.


Proof of Lagrange remainder

Set the error term as R_n(x) = f(x) - p_n(x) , and define an auxiliary function: Y(t) = R_n(t) - \frac W(t) \qquad\text\qquad W(t) = \prod_^n (t-x_i). Thus: Y^(t) = R_n^(t) - \frac \ (n+1)! But since p_n(x) is a polynomial of degree at most , we have R_n^(t) = f^(t) , and: Y^(t) = f^(t) - \frac \ (n+1)! Now, since are roots of R_n(t) and W(t), we have Y(x)=Y(x_j)=0 , which means has at least roots. From
Rolle's theorem In calculus, Rolle's theorem or Rolle's lemma essentially states that any real-valued differentiable function that attains equal values at two distinct points must have at least one stationary point somewhere between them—that is, a point wher ...
, Y^\prime(t) has at least roots, and iteratively Y^(t) has at least one root in the interval . Thus: Y^(\xi) = f^(\xi) - \frac \ (n+1)! = 0 and: R_n(x) = f(x) - p_n(x) = \frac \prod_^n (x-x_i) . This parallels the reasoning behind the Lagrange remainder term in the
Taylor theorem In calculus, Taylor's theorem gives an approximation of a ''k''-times differentiable function around a given point by a polynomial of degree ''k'', called the ''k''th-order Taylor polynomial. For a smooth function, the Taylor polynomial is th ...
; in fact, the Taylor remainder is a special case of interpolation error when all interpolation nodes are identical. Note that the error will be zero when x = x_i for any ''i''. Thus, the maximum error will occur at some point in the interval between two successive nodes.


Equally spaced intervals

In the case of equally spaced interpolation nodes where x_i = a + ih, for i=0,1,\ldots,n, and where h = (b-a)/n, the product term in the interpolation error formula can be bound as \left, \prod_^n (x-x_i)\ = \prod_^n \left, x-x_i\ \leq \frac h^. Thus the error bound can be given as \left, R_n(x)\ \leq \frac \max_ \left, f^(\xi)\ However, this assumes that f^(\xi) is dominated by h^, i.e. f^(\xi) h^ \ll 1. In several cases, this is not true and the error actually increases as (see
Runge's phenomenon In the mathematical field of numerical analysis, Runge's phenomenon () is a problem of oscillation at the edges of an interval that occurs when using polynomial interpolation with polynomials of high degree over a set of equispaced interpolation ...
). That question is treated in the section ''Convergence properties''.


Lebesgue constants

We fix the interpolation nodes ''x''0, ..., ''x''''n'' and an interval 'a'', ''b''containing all the interpolation nodes. The process of interpolation maps the function ''f'' to a polynomial ''p''. This defines a mapping ''X'' from the space ''C''( 'a'', ''b'' of all continuous functions on 'a'', ''b''to itself. The map ''X'' is linear and it is a projection on the subspace P(n) of polynomials of degree ''n'' or less. The Lebesgue constant ''L'' is defined as the
operator norm In mathematics, the operator norm measures the "size" of certain linear operators by assigning each a real number called its . Formally, it is a norm defined on the space of bounded linear operators between two given normed vector spaces. Intr ...
of ''X''. One has (a special case of Lebesgue's lemma): \left\, f-X(f)\right\, \le (L+1) \left\, f-p^*\right\, . In other words, the interpolation polynomial is at most a factor (''L'' + 1) worse than the best possible approximation. This suggests that we look for a set of interpolation nodes that makes ''L'' small. In particular, we have for
Chebyshev nodes In numerical analysis, Chebyshev nodes are specific real algebraic numbers, namely the roots of the Chebyshev polynomials of the first kind. They are often used as nodes in polynomial interpolation because the resulting interpolation polynomial ...
: L \le \frac2\pi \log(n+1) + 1. We conclude again that Chebyshev nodes are a very good choice for polynomial interpolation, as the growth in ''n'' is exponential for equidistant nodes. However, those nodes are not optimal.


Convergence properties

It is natural to ask, for which classes of functions and for which interpolation nodes the sequence of interpolating polynomials converges to the interpolated function as ? Convergence may be understood in different ways, e.g. pointwise, uniform or in some integral norm. The situation is rather bad for equidistant nodes, in that uniform convergence is not even guaranteed for infinitely differentiable functions. One classical example, due to
Carl Runge Carl David Tolmé Runge (; 30 August 1856 – 3 January 1927) was a German mathematician, physicist, and spectroscopist. He was co-developer and co-eponym of the Runge–Kutta method (German pronunciation: ), in the field of what is today known ...
, is the function ''f''(''x'') = 1 / (1 + ''x''2) on the interval . The interpolation error grows without bound as . Another example is the function ''f''(''x'') = , ''x'', on the interval , for which the interpolating polynomials do not even converge pointwise except at the three points ''x'' = ±1, 0. attributes the last example to . One might think that better convergence properties may be obtained by choosing different interpolation nodes. The following result seems to give a rather encouraging answer: The defect of this method, however, is that interpolation nodes should be calculated anew for each new function ''f''(''x''), but the algorithm is hard to be implemented numerically. Does there exist a single table of nodes for which the sequence of interpolating polynomials converge to any continuous function ''f''(''x'')? The answer is unfortunately negative: The proof essentially uses the lower bound estimation of the Lebesgue constant, which we defined above to be the operator norm of ''X''''n'' (where ''X''''n'' is the projection operator on Π''n''). Now we seek a table of nodes for which \lim_ X_n f = f,\textf \in C( ,b. Due to the
Banach–Steinhaus theorem In mathematics, the uniform boundedness principle or Banach–Steinhaus theorem is one of the fundamental results in functional analysis. Together with the Hahn–Banach theorem and the open mapping theorem, it is considered one of the cornerst ...
, this is only possible when norms of ''X''''n'' are uniformly bounded, which cannot be true since we know that \, X_n\, \geq \tfrac \log(n+1)+C. For example, if equidistant points are chosen as interpolation nodes, the function from
Runge's phenomenon In the mathematical field of numerical analysis, Runge's phenomenon () is a problem of oscillation at the edges of an interval that occurs when using polynomial interpolation with polynomials of high degree over a set of equispaced interpolation ...
demonstrates divergence of such interpolation. Note that this function is not only continuous but even infinitely differentiable on . For better
Chebyshev nodes In numerical analysis, Chebyshev nodes are specific real algebraic numbers, namely the roots of the Chebyshev polynomials of the first kind. They are often used as nodes in polynomial interpolation because the resulting interpolation polynomial ...
, however, such an example is much harder to find due to the following result:


Related concepts

Runge's phenomenon In the mathematical field of numerical analysis, Runge's phenomenon () is a problem of oscillation at the edges of an interval that occurs when using polynomial interpolation with polynomials of high degree over a set of equispaced interpolation ...
shows that for high values of , the interpolation polynomial may oscillate wildly between the data points. This problem is commonly resolved by the use of
spline interpolation In the mathematical field of numerical analysis, spline interpolation is a form of interpolation where the interpolant is a special type of piecewise polynomial called a spline. That is, instead of fitting a single, high-degree polynomial to all ...
. Here, the interpolant is not a polynomial but a spline: a chain of several polynomials of a lower degree. Interpolation of
periodic function A periodic function is a function that repeats its values at regular intervals. For example, the trigonometric functions, which repeat at intervals of 2\pi radians, are periodic functions. Periodic functions are used throughout science to d ...
s by
harmonic A harmonic is a wave with a frequency that is a positive integer multiple of the '' fundamental frequency'', the frequency of the original periodic signal, such as a sinusoidal wave. The original signal is also called the ''1st harmonic'', ...
functions is accomplished by
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
. This can be seen as a form of polynomial interpolation with harmonic base functions, see
trigonometric interpolation In mathematics, trigonometric interpolation is interpolation with trigonometric polynomials. Interpolation is the process of finding a function which goes through some given data points. For trigonometric interpolation, this function has to be a t ...
and
trigonometric polynomial In the mathematical subfields of numerical analysis and mathematical analysis, a trigonometric polynomial is a finite linear combination of functions sin(''nx'') and cos(''nx'') with ''n'' taking on the values of one or more natural numbers. The c ...
.
Hermite interpolation In numerical analysis, Hermite interpolation, named after Charles Hermite, is a method of polynomial interpolation, which generalizes Lagrange interpolation. Lagrange interpolation allows computing a polynomial of degree less than that takes the s ...
problems are those where not only the values of the polynomial ''p'' at the nodes are given, but also all derivatives up to a given order. This turns out to be equivalent to a system of simultaneous polynomial congruences, and may be solved by means of the
Chinese remainder theorem In mathematics, the Chinese remainder theorem states that if one knows the remainders of the Euclidean division of an integer ''n'' by several integers, then one can determine uniquely the remainder of the division of ''n'' by the product of the ...
for polynomials.
Birkhoff interpolation In mathematics, Birkhoff interpolation is an extension of polynomial interpolation. It refers to the problem of finding a polynomial ''p'' of degree ''d'' such that certain derivatives have specified values at specified points: : p^(x_i) = y_i \q ...
is a further generalization where only derivatives of some orders are prescribed, not necessarily all orders from 0 to a ''k''.
Collocation method In mathematics, a collocation method is a method for the numerical solution of ordinary differential equations, partial differential equations and integral equations. The idea is to choose a finite-dimensional space of candidate solutions (usually ...
s for the solution of differential and integral equations are based on polynomial interpolation. The technique of
rational function modeling In statistical modeling (especially process modeling), polynomial functions and rational functions are sometimes used as an empirical technique for curve fitting. Polynomial function models A polynomial function is one that has the form : y = a_ ...
is a generalization that considers ratios of polynomial functions. At last,
multivariate interpolation In numerical analysis, multivariate interpolation is interpolation on functions of more than one variable; when the variates are spatial coordinates, it is also known as spatial interpolation. The function to be interpolated is known at given po ...
for higher dimensions.


See also

*
Newton series A finite difference is a mathematical expression of the form . If a finite difference is divided by , one gets a difference quotient. The approximation of derivatives by finite differences plays a central role in finite difference methods for the ...
*
Polynomial regression In statistics, polynomial regression is a form of regression analysis in which the relationship between the independent variable ''x'' and the dependent variable ''y'' is modelled as an ''n''th degree polynomial in ''x''. Polynomial regression fi ...


Notes


Citations


References

* * *


Further reading

* * * * *


External links

* {{springer, title=Interpolation process, id=p/i051970
ALGLIB
has an implementations in C++ / C#.
GSL
has a polynomial interpolation code in C
Polynomial Interpolation demonstration
Interpolation Polynomials Articles containing proofs