# Newton polynomial

In the mathematical field of numerical analysis, a Newton polynomial, named after its inventor Isaac Newton,[1] is an interpolation polynomial for a given set of data points. The Newton polynomial is sometimes called Newton's divided differences interpolation polynomial because the coefficients of the polynomial are calculated using Newton's divided differences method.

## Definition

Given a set of k + 1 data points

${\displaystyle (x_,y_),\ldots ,(x_,y_),\ldots ,(x_,y_)}$

where no two xj are the same, the Newton interpolation polynomial is a linear combination of Newton basis polynomials

${\displaystyle N(x):=\sum _^a_n_(x)}$

with the Newton basis polynomials defined as

${\displaystyle n_(x):=\prod _^(x-x_)}$

for j > 0 and ${\displaystyle n_(x)\equiv 1}$.

The coefficients are defined as

${\displaystyle a_:=[y_,\ldots ,y_]}$

where

${\displaystyle [y_,\ldots ,y_]}$

is the notation for divided differences.

Thus the Newton polynomial can be written as

${\displaystyle N(x)=[y_]+[y_,y_](x-x_)+\cdots +[y_,\ldots ,y_](x-x_)(x-x_)\cdots (x-x_).}$

### Newton forward divided difference formula

The Newton polynomial can be expressed in a simplified form when

${\displaystyle x_,x_,\dots ,x_}$

are arranged consecutively with equal spacing. Introducing the notation ${\displaystyle h=x_-x_}$ for each ${\displaystyle i=0,1,\dots ,k-1}$

and ${\displaystyle x=x_+sh}$,

the difference ${\displaystyle x-x_}$ can be written as ${\displaystyle (s-i)h}$. So the Newton polynomial becomes

${\displaystyle {\beginN(x)&=[y_]+[y_,y_]sh+\cdots +[y_,\ldots ,y_]s(s-1)\cdots (s-k+1)^\\&=\sum _^s(s-1)\cdots (s-i+1)^[y_,\ldots ,y_]\\&=\sum _^i!^[y_,\ldots ,y_].\end}}$

This is called the Newton forward divided difference formula[citation needed].

### Newton backward divided difference formula

If the nodes are reordered as ${\displaystyle _,_,\dots ,_}$, the Newton polynomial becomes

${\displaystyle N(x)=[y_]+[_,_](x-_)+\cdots +[_,\ldots ,_](x-_)(x-_)\cdots (x-_).}$

If ${\displaystyle _,\;_,\;\dots ,\;_}$ are equally spaced with ${\displaystyle x=_+sh}$ and ${\displaystyle _=_-(k-i)h}$ for i = 0, 1, ..., k, then,

${\displaystyle {\beginN(x)&=[_]+[_,_]sh+\cdots +[_,\ldots ,_]s(s+1)\cdots (s+k-1)^\\&=\sum _^{(-1)}^{-s \choose i}i!^[_,\ldots ,_].\end}}$

is called the Newton backward divided difference formula[citation needed].

## Significance

Newton's formula is of interest because it is the straightforward and natural differences-version of Taylor's polynomial. Taylor's polynomial tells where a function will go, based on its y value, and its derivatives (its rate of change, and the rate of change of its rate of change, etc.) at one particular x value. Newton's formula is Taylor's polynomial based on finite differences instead of instantaneous rates of change.

As with other difference formulas, the degree of a Newton interpolating polynomial can be increased by adding more terms and points without discarding existing ones. Newton's form has the simplicity that the new points are always added at one end: Newton's forward formula can add new points to the right, and Newton's backward formula can add new points to the left.

The accuracy of polynomial interpolation depends on how close the interpolated point is to the middle of the x values of the set of points used. Obviously, as new points are added at one end, that middle becomes farther and farther from the first data point. Therefore, if it isn't known how many points will be needed for the desired accuracy, the middle of the x-values might be far from where the interpolation is done.

Gauss, Stirling, and Bessel all developed formulae to remedy that problem.[2]

Gauss's formula alternately adds new points at the left and right ends, thereby keeping the set of points centered near the same place (near the evaluated point). When so doing, it uses terms from Newton's formula, with data points and x values renamed in keeping with one's choice of what data point is designated as the x0 data point.

Stirling's formula remains centered about a particular data point, for use when the evaluated point is nearer to a data point than to a middle of two data points.

Bessel's formula remains centered about a particular middle between two data points, for use when the evaluated point is nearer to a middle than to a data point.

Bessel and Stirling achieve that by sometimes using the average of two differences, and sometimes using the average of two products of binomials in x, where Newton's or Gauss's would use just one difference or product. Stirling's uses an average difference in odd-degree terms (whose difference uses an even number of data points); Bessel's uses an average difference in even-degree terms (whose difference uses an odd number of data points).

## Strengths and weaknesses of various formulae

For any given finite set of data points, there is only one polynomial of least possible degree that passes through all of them. Thus, it is appropriate to speak of the "Newton form", or Lagrange form, etc., of the interpolation polynomial. However, the way the polynomial is obtained matters. There are several similar methods, such as those of Gauss, Bessel and Stirling. They can be derived from Newton's by renaming the x-values of the data points, but in practice they are important.

### Bessel vs. Stirling

The choice between Bessel and Stirling depends on whether the interpolated point is closer to a data point, or closer to a middle between two data points.

But it should be pointed out that a polynomial interpolation's error approaches zero, as the interpolation point approaches a data-point. Therefore, Stirling's formula brings its accuracy improvement where it is least needed and Bessel brings its accuracy improvement where it is most needed.

So, Bessel's formula could be said to be the most consistently accurate difference formula, and, in general, the most consistently accurate of the familiar polynomial interpolation formulas.

### Divided-Difference Methods vs. Lagrange

Lagrange is sometimes said to require less work, and is sometimes recommended for problems in which it is known, in advance, from previous experience, how many terms are needed for sufficient accuracy.

The divided difference methods have the advantage that more data points can be added, for improved accuracy, without re-doing the whole problem. The terms based on the previous data points can continue to be used. With the ordinary Lagrange formula, to do the problem with more data points would require re-doing the whole problem.

There is a "barycentric" version of Lagrange that avoids the need to re-do the entire calculation when adding a new data point. But it requires that the values of each term be recorded.

But the ability, of Gauss, Bessel and Stirling, to keep the data points centered close to the interpolated point gives them an advantage over Lagrange, when it isn't known, in advance, how many data points will be needed.

Additionally, suppose that one wants to find out if, for some particular type of problem, linear interpolation is sufficiently accurate. That can be determined by evaluating the quadratic term of a divided difference formula. If the quadratic term is negligible—meaning that the linear term is sufficiently accurate without adding the quadratic term—then linear interpolation is sufficiently accurate. If the problem is sufficiently important, or if the quadratic term is nearly big enough to matter, then one might want to determine whether the _sum_ of the quadratic and cubic terms is large enough to matter in the problem.

Of course, only a divided-difference method can be used for such a determination.

For that purpose, the divided-difference formula and/or its x0 point should be chosen so that the formula will use, for its linear term, the two data points between which the linear interpolation of interest would be done.

The divided difference formulas are more versatile, useful in more kinds of problems.

The Lagrange formula is at its best when all the interpolation will be done at one x value, with only the data points' y values varying from one problem to another, and when it is known, from past experience, how many terms are needed for sufficient accuracy.

With the Newton form of the interpolating polynomial a compact and effective algorithm exists for combining the terms to find the coefficients of the polynomial.[3]

### Accuracy

When, with Stirling's or Bessel's, the last term used includes the average of two differences, then one more point is being used than Newton's or other polynomial interpolations would use for the same polynomial degree. So, in that instance, Stirling's or Bessel's is not putting an N−1 degree polynomial through N points, but is, instead, trading equivalence with Newton's for better centering and accuracy, giving those methods sometimes potentially greater accuracy, for a given polynomial degree, than other polynomial interpolations.

## General case

For the special case of xi = i, there is a closely related set of polynomials, also called the Newton polynomials, that are simply the binomial coefficients for general argument. That is, one also has the Newton polynomials ${\displaystyle p_(z)}$ given by

${\displaystyle p_(z)=={\frac }}$

In this form, the Newton polynomials generate the Newton series. These are in turn a special case of the general difference polynomials which allow the representation of analytic functions through generalized difference equations.

## Main idea

Solving an interpolation problem leads to a problem in linear algebra where we have to solve a system of linear equations. Using a standard monomial basis for our interpolation polynomial we get the very complicated Vandermonde matrix. By choosing another basis, the Newton basis, we get a system of linear equations with a much simpler lower triangular matrix which can be solved faster.

For k + 1 data points we construct the Newton basis as

${\displaystyle n_(x):=\prod _^(x-x_)\qquad j=1,\ldots ,k.}$

Using these polynomials as a basis for ${\displaystyle \Pi _}$ we have to solve

${\displaystyle {\begin1&&\ldots &&0\\1&x_-x_&&&\\1&x_-x_&(x_-x_)(x_-x_)&&\vdots \\\vdots &\vdots &&\ddots &\\1&x_-x_&\ldots &\ldots &\prod _^(x_-x_)\end}{\begina_\\\\\vdots \\\\a_\end}={\beginy_\\\\\vdots \\\\y_\end}}$

to solve the polynomial interpolation problem.

This system of equations can be solved iteratively by solving

${\displaystyle \sum _^a_n_(x_)=y_\qquad j=0,\dots ,k.}$

## Taylor polynomial

The limit of the Newton polynomial if all nodes coincide is a Taylor polynomial, because the divided differences become derivatives.

${\displaystyle \lim _{(x_,\dots ,x_)\to (z,\dots ,z)}f[x_]+f[x_,x_]\cdot (\xi -x_)+\dots +f[x_,\dots ,x_]\cdot (\xi -x_)\cdot \dots \cdot (\xi -x_)=}$
${\displaystyle =f(z)+f'(z)\cdot (\xi -z)+\dots +{\frac (z)}}\cdot (\xi -z)^}$

## Application

As can be seen from the definition of the divided differences new data points can be added to the data set to create a new interpolation polynomial without recalculating the old coefficients. And when a data point changes we usually do not have to recalculate all coefficients. Furthermore, if the xi are distributed equidistantly the calculation of the divided differences becomes significantly easier. Therefore, the divided-difference formulas are usually preferred over the Lagrange form for practical purposes.

### Examples

The divided differences can be written in the form of a table. For example, for a function f is to be interpolated on points ${\displaystyle x_,\ldots ,x_}$. Write

${\displaystyle {\beginx_&f(x_)&&\\&&)-f(x_) \over x_-x_}&\\x_&f(x_)&&{)-f(x_) \over x_-x_}-)-f(x_) \over x_-x_} \over x_-x_}\\&&)-f(x_) \over x_-x_}&\\x_&f(x_)&&\vdots \\&&\vdots &\\\vdots &&&\vdots \\&&\vdots &\\x_&f(x_)&&\\\end}}$

Then the interpolating polynomial is formed as above using the topmost entries in each column as coefficients.

For example, suppose we are to construct the interpolating polynomial to f(x) = tan(x) using divided differences, at the points

 ${\displaystyle x_=-{\tfrac }}$ ${\displaystyle x_=-{\tfrac }}$ ${\displaystyle x_=0}$ ${\displaystyle x_={\tfrac }}$ ${\displaystyle x_={\tfrac }}$ ${\displaystyle f(x_)=-14.1014}$ ${\displaystyle f(x_)=-0.931596}$ ${\displaystyle f(x_)=0}$ ${\displaystyle f(x_)=0.931596}$ ${\displaystyle f(x_)=14.1014}$

Using six digits of accuracy, we construct the table

${\displaystyle {\begin-{\tfrac }&-14.1014&&&&\\&&17.5597&&&\\-{\tfrac }&-0.931596&&-10.8784&&\\&&1.24213&&4.83484&\\0&0&&0&&0\\&&1.24213&&4.83484&\\{\tfrac }&0.931596&&10.8784&&\\&&17.5597&&&\\{\tfrac }&14.1014&&&&\\\end}}$

Thus, the interpolating polynomial is

${\displaystyle -14.1014+17.5597(x+{\tfrac })-10.8784(x+{\tfrac })(x+{\tfrac })+4.83484(x+{\tfrac })(x+{\tfrac })(x)+0(x+{\tfrac })(x+{\tfrac })(x)(x-{\tfrac })=}$
${\displaystyle =-0.00005-1.4775x-0.00001x^+4.83484x^}$

Given more digits of accuracy in the table, the first and third coefficients will be found to be zero.

Another example:

The sequence ${\displaystyle f_}$ such that ${\displaystyle f_(1)=6,f_(2)=9,f_(3)=2}$ and ${\displaystyle f_(4)=5}$, i.e., they are ${\displaystyle 6,9,2,5}$ from ${\displaystyle x_=1}$ to ${\displaystyle x_=4}$.

You obtain the slope of order ${\displaystyle 1}$ in the following way:

• ${\displaystyle f_(x_,x_)={\frac (x_)-f_(x_)}-x_}}={\frac }=3}$
• ${\displaystyle f_(x_,x_)={\frac (x_)-f_(x_)}-x_}}={\frac }=-7}$
• ${\displaystyle f_(x_,x_)={\frac (x_)-f_(x_)}-x_}}={\frac }=3}$

As we have the slopes of order ${\displaystyle 1}$, it is possible to obtain the next order:

• ${\displaystyle f_(x_,x_,x_)={\frac (x_,x_)-f_(x_,x_)}-x_}}={\frac {-7-3}}=-5}$
• ${\displaystyle f_(x_,x_,x_)={\frac (x_,x_)-f_(x_,x_)}-x_}}={\frac }=5}$

Finally, we define the slope of order ${\displaystyle 3}$:

• ${\displaystyle f_(x_,x_,x_,x_)={\frac (x_,x_,x_)-f_(x_,x_,x_)}-x_}}={\frac }={\frac }}$

Once we have the slope, we can define the consequent polynomials:

• ${\displaystyle p_(x)=6}$.
• ${\displaystyle p_(x)=6+3(x-1)}$
• ${\displaystyle p_(x)=6+3(x-1)-5(x-1)(x-2)}$.
• ${\displaystyle p_(x)=6+3(x-1)-5(x-1)(x-2)+{\frac }(x-1)(x-2)(x-3)}$