# Numerical Analysis/Newton form example

We'll find the interpolating polynomial passing through the points $(1,-6)=(x_{0},y_{0})$ , $(2,2)=(x_{1},y_{1})$ , $(4,12)=(x_{2},y_{2})$ , using the Newton form of the interpolation polynomial.

The Newton form is given by the formula $p(x)=\sum _{j=0}^{k}a_{j}n_{j}(x)$ , where $a_{j}=[y_{0},\ldots ,y_{j}]$ and $n_{j}(x)=\prod _{i=0}^{j-1}(x-x_{i})$ , with $n_{0}(x)=1$ . We start by finding each $n_{j}(x)$ .

$n_{0}(x)=1$ $n_{1}(x)=x-1$ $n_{2}(x)=(x-1)(x-2)=x^{2}-3x+2$ Next, we find the necessary divided differences. First, $[y_{0}]=-6$ , $[y_{1}]=2$ , and $[y_{2}]=12$ . For the next level, we have:

$[y_{0},y_{1}]={\frac {2+6}{2-1}}=8$ $[y_{1},y_{2}]={\frac {12-2}{4-2}}=5$ Finally, we can find:

$[y_{0},y_{1},y_{2}]={\frac {5-8}{4-1}}=-1$ .

Now, we can find the coefficients $a_{j}$ .

$a_{0}=[y_{0}]=-6$ $a_{1}=[y_{0},y_{1}]=8$ $a_{2}=[y_{0},y_{1},y_{2}]=-1$ Substituting and simplifying, we get our interpolating polynomial:

$p(x)=-6+8(x-1)-(x^{2}-3x+2)=-x^{2}+11x-16$ .

Now let's add the point $(3,-10)=(x_{3},y_{3})$ to our data set and find the new polynomial using the same method. Due to the formula for the Newton form, we only have to add the term $a_{3}n_{3}(x)$ to our previous interpolating polynomial.

First, we have

$n_{3}(x)=(x-1)(x-2)(x-4)=x^{3}-7x^{2}+14x-8$ .

Now to find $a_{3}$ we calculate some more divided differences.

$[y_{3}]=-10$ $[y_{2},y_{3}]={\frac {-10-12}{3-4}}=22$ $[y_{1},y_{2},y_{3}]={\frac {22-5}{3-2}}=17$ $a_{3}=[y_{0},\ldots ,y_{3}]={\frac {17+1}{3-1}}=9$ So, our new interpolating polynomial is:

$p(x)=-x^{2}+11x-16+9(x^{3}-7x^{2}+14x-8)=9x^{3}-64x^{2}+137x-88$ .