Newton’s forward interpolation





Newton’s forward interpolation

Suppose \(y=f( x )\) is tabulated for equally spaced values \( x_i=x_0+ih \) for i=0,1,2,...,n for the entries
\( x=x_0,x_0+h,x_0+2h,...,x_0+nh \)
with the values
\( y=y_0,y_1,y_2,...,y_n\)
Here,
\( x_i =x_0+ih\) for \(i=0,1,2,\ldots ,n\)
Now, assuming \(y=f( x )\) is a polynomial of degree n in x, we write
\( y=a_0+a_1( x-x_0 )+a_2( x-x_0 )( x-x_1 )+\ldots +a_n( x-x_0 )\ldots ( x-x_{n-1} )\)


Putting, \( x=x_0\), we get
\( y=a_0+a_1( x-x_0 )+a_2( x-x_0 )( x-x_1 )+\ldots +a_n( x-x_0 )\ldots ( x-x_{n-1} )\)
or \( y_0=a_0+a_1 (\) \(x_0\) \(-x_0 )+a_2( \) \(x_0\) \(-x_0 )(\) \(x_0\) \(-x_1 )+\ldots +a_n( \) \(x_0\) \( -x_0 )\ldots (\) \(x_0\) \( -x_{n-1} )\)
or \( y_0=a_0+0+0+\ldots +0\)
or \( y_0=a_0\)


Putting, \( x=x_1\), we get
\( y=a_0+a_1( x-x_0 )+a_2( x-x_0 )( x-x_1 )+\ldots +a_n( x-x_0 )\ldots ( x-x_{n-1} )\)
or \( y_1=a_0+a_1 (\) \(x_1\) \(-x_0 )+a_2( \) \(x_1\) \(-x_0 )(\) \(x_1\) \(-x_1 )+\ldots +a_n( \) \(x_1\) \( -x_0 ) (\) \(x_1\) \( -x_1 ) \ldots (\) \(x_1\) \( -x_{n-1} )\)
or \( y_1=a_0+a_1 h+0+\ldots +0\)
or \( y_1=y_0+a_1h\)
or \( a_1h=y_1-y_0\)
or \( a_1=\frac{\Delta y_0}{h}\)


Putting, \( x=x_2\), we get
\( y=a_0+a_1( x-x_0 )+a_2( x-x_0 )( x-x_1 )+\ldots +a_n( x-x_0 )\ldots ( x-x_{n-1} )\)
or \( y_2=a_0+a_1 (\) \(x_2\) \(-x_0 )+a_2( \) \(x_2\) \(-x_0 )(\) \(x_2\) \(-x_1 )+a_3( \) \(x_2\) \( -x_0 ) (\) \(x_2\) \( -x_1 ) (\) \(x_2\) \( -x_2 )+...\)
or \( y_2=y_0+a_1(2h)+a_2(2h )( h )+0+...\)
or \( y_2=y_0+2(a_1h)+a_2(2h )( h )+0+...\)
or \( y_2=y_0+2(y_1-y_0)+2a_2h^2\)
or \( 2a_2h^2=y_2-y_0-2(y_1-y_0)\)
or \( 2a_2h^2=y_2-y_0-2y_1+2y_0\)
or \( 2a_2h^2=y_2-2y_1+y_0\)
or \( 2a_2h^2=y_2-y_1y_1+y_0\)
or \( 2a_2h^2=(y_2-y_1)-(y_1-y_0)\)
or \( 2a_2h^2=(\Delta y_1)-(\Delta y_0)\)
or \( 2a_2h^2=\Delta^2 y_0\)
or \( a_2=\frac{\Delta^2 y_0}{2!h^2}\)


Similarly, we get
\( a_i=\frac{\Delta ^iy_0}{i!h^i}\) for \( i=0,1,2,\ldots ,n\)


Setting \( x=x_0+ph\) and substituting, \(a_i\) for \( i=0,1,2,\ldots ,n\), we get
\( y=a_0+a_1( x-x_0 )+a_2( x-x_0 )( x-x_1 )+\ldots +a_n( x-x_0 )\ldots ( x-x_{n-1} )\)
or \( y=y_0+\frac{\Delta y_0}{h}[ph]+\frac{\Delta ^2y_0}{2!h^2}[p( p-1 )h^2]+\ldots +\frac{\Delta ^ny_0}{n!h^n}[p( p-1 )\ldots ( p-n+1 )h^n]\)
or \( y=y_0+p\Delta y_0+\frac{p( p-1 )}{2!}{{\Delta }^{2}}y_0+\ldots +\frac{p( p-1 )\ldots ( p-n+1 )}{n!}{{\Delta }^n}y_0\)


NOTE

  1. This is called Newton’s forward difference interpolation formula
  2. This formula is used for interpolating the values of y near the beginning of a set of tabulated values and extrapolating values of y a little backward (i.e., to the left) of \(y_0\)
  3. The first two terms of this formula give the linear interpolation while the first three terms give a parabolic interpolation and so on.



Example 1

The population of a town was as given below. Estimate the population for the year 1895.

x 1891 1901 1911 1921 1931
y 46 66 81 93 101

Solution
According to given set of data values, we form difference table as below

X Y 1st diff 2nd diff 3rd diff 4th diff
1891 46
66-46=20
1901 66 15-20=-5
81-66=15 (-3)-(-5)=2
1911 81 12-15=-3 (-1)-(2)=-3
93-81=12
(-4)-(-3)=-1
1921 93 8-12=-4
101-93=8
1931 101

Here,
\( h=10\) and \( x_0=1891\)
Thus, we have
\( x=x_0+ph\)
or \( 1895=1891+p\times 10\)
or \( p=0.4\)
Using formula, we get
\( y=y_0+p\Delta y_0+\frac{p( p-1 )}{2!}{{\Delta }^{2}}y_0+\ldots +\frac{p( p-1 )\ldots ( p-n+1 )}{n!}{{\Delta }^n}y_0\)
or \( y_{1895}=46+(0.4).(20)+\frac{(0.4)(-0.6)}{2!} (-5)+\frac{(0.4)(-0.6)(-1.6)}{3!} (2)+\frac{(0.4)(-0.6)(-1.6)(-2.6)}{3!} (-3)\)

or \( y_{1895}=46+8+0.6+0.128+0.1248\)

or \( P_{1895}= 54.85\)
This completes.




Example 2

The following table gives values of tan(x) for \(0.10\le x\le 0.30\). Find tan(0.12)

x 0.10 0.15 0.20 0.25 0.30
tan(x) 0.1003 0.1511 0.2027 0.2553 0.3039

Solution
According to given set of data values, we form difference table as below

X Y 1st diff 2nd diff 3rd diff 4th diff
0.10 0.1003
0.0508
0.15 0.1511 0.0008
0.1511 0.0002
0.20 0.2027 0.0010 0.0002
0.0526
0.0004
0.25 0.2553 0.0014
0.0540
0.30 0.3093

Here,
\( h=0.05\) and \(x_0=0.10\)
Thus, we have
\( x=x_0+ph\)
or \( 0.12=0.10+p\times 0.05\)
or \( p=0.4\)
Using formula, we get
\( y=y_0+p\Delta y_0+\frac{p( p-1 )}{2!}{{\Delta }^{2}}y_0+\ldots +\frac{p( p-1 )\ldots ( p-n+1 )}{n!}{{\Delta }^n}y_0\)
or \( \tan 0.12=0.1003+0.4\times 0.0508+\frac{0.4( -0.6 )}{2!}0.0008+\frac{( 0.4 )( -0.6 )( -1.6 )}{3!}0.0002+\frac{( 0.4 )( -0.6 )( -1.6 )( -2.6 )}{4!}0.0002\)
or \( \tan 0.12=0.1205\)
This completes.




Example 3

Find cubic polynomial which takes the following values.
\( y( 0 )=1,y( 1 )=0,y( 2 )=1\) and \(y( 3 )=10\)

Solution
According to given set of data values, we form difference table as below

X Y 1st diff 2nd diff 3rd diff
0 1
-1
1 0
2
1
6
2 1 8
9
3 10

Here,
\( h=1\) and \(x_0=0\)
Thus, we have
\( x=x_0+ph\)
or \( x=p\)
Now, cubic polynomial for given data value is
\( y=y_0+p\Delta y_0+\frac{p( p-1 )}{2!}{{\Delta }^2}y_0+\ldots +\frac{p( p-1 )\ldots ( p-n+1 )}{n!}{{\Delta }^n}y_0\)
or \( y=1+x( -1 )+\frac{x( x-1 )}{2!}2+\frac{x( x-1 )( x-2 )}{3!}6\)
or \( y=1-x+x( x-1 )+x( x-1 )( x-2 )\)
or \( y=1-x+{x^2}-x+x( {x^2}-3x+2 )\)
or \( y=1-x+{x^2}-x+{x^{3}}-3{x^2}+2x\)
or \( y={x^{3}}-2{x^2}+1\)
This completes.




Exercise

Use Newton's Forward difference formula to compute followings.
  1. Find the value when x=-1 from the following table [Answer: -2]
    x0123
    y10110
  2. Find solution of f(3) of an equation \(x^2-x+1\) using a = 2 and b= 10, step value h = 1.
  3. Estimate the number of students who obtained marks between 40 and 45
    Marks30-4040-5050-6060-7070-80
    Number3142513531
  4. Find cubic polynomial which takes the following values: y( 0 )=1,y( 1 )=2, y( 2 )=1 and y( 3 )=10

No comments:

Post a Comment