0% found this document useful (0 votes)
11 views

Interpolation

Chapter 5 discusses interpolation methods for deriving functions from discrete data sets, focusing on Newton's forward and backward interpolation formulas for equally spaced data. It also introduces Gauss's central difference formulas for interpolation near the middle of tabulated values. The chapter includes algorithms and examples for applying these interpolation techniques to calculate values such as tan(0.12) and tan(0.26).

Uploaded by

Abhijit Bhatye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Interpolation

Chapter 5 discusses interpolation methods for deriving functions from discrete data sets, focusing on Newton's forward and backward interpolation formulas for equally spaced data. It also introduces Gauss's central difference formulas for interpolation near the middle of tabulated values. The chapter includes algorithms and examples for applying these interpolation techniques to calculate values such as tan(0.12) and tan(0.26).

Uploaded by

Abhijit Bhatye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 58

Chapter - 5

Interpolation
Interpolation

Interpolation is a method of deriving a simple function from the given discrete


data set such that the function passes through the provided data points. This
helps to determine the data points in between the given data ones.

1) Interpolation with equal intervals:


 Newton forward/backward interpolation method
 Gauss forward/backward interpolation formula
 Sterling formula
 Bessel’s formula
 Everett’s formula

I)i)Newton forward difference interpolation formula:

This method based on developing difference tables for a given set of


Equally spaced data points. Let y = f(x) be a function for which given the
(n + 1) points (x0,y0), (x1,y1),…, (xn,yn) and the values of x are equidistant
Let
xi=x0+ih, i=0,1,2…,n.

Since yn(x) is polynomial of the nth degree, it may be written as

y n ( x )=a 0+ a1 ( x−x 0 )+ a2 ( x−x 0 ) ( x−x 1 )+ a3 ( x−x 1 ) ( x −x 2 ) +…


+ an ( x−x 0 )( x−x 1)…(x−x n−1)

Imposing now the condition that y and yn(x) should agree at the set of
tabulated points, we obtain
2 3 n
y 1− y 0 ∆ y 0 ∆ y0 ∆ y0 ∆ y0
a0=y0; a1= x 1−x 0 = ; a 2= 2 ; a 3 = = 3 ; . . . ;an== n ;
h h 2! h 3! h n!

Setting x=x0+ph and substituting for a0, a1,…,an yn (x) gives

p ( p−1) 2 p ( p−1)( p−2) 3


yn(x) =y0 + p∆ y 0 + ∆ y0 + ∆ y 0+ …+
2! 3!
p ( p−1)( p−2)…( p−n+1) n
∆ y0 .
n!

which is Newton’s forward difference interpolation formula and it is useful for


interpolation near the beginning of set of tabular values.
ii)Newton backward interpolation formula:

For Newton’s backward difference interpolation formula, consider

yn(x)=a0 + a1(x-xn)=a2(x-xn)(x-xn-1) + a3(x-xn)(x-xn-1)(x-xn-2) +…+


an(x-xn)(x-xn-1)…(x-x1)

and then impose the condition that y and yn(x) should agree the tabulated
points xn,xn-1,…,x2,x1, x0. We obtain

y n− y n−1 ∇ y n 2
∇ yn
n
∇ yn
a0=y0; a1= x −x = similarly a2= 2 , . . . ;an = n .
n n−1 h h 2! h n!

substituting for a0,a1,…,an yn(x) gives

p ( p+1) 2 p ( p+1)(p+ 2) 3
yn(x) =yn + p∆ y n + ∇ yn + ∇ y n+ …+
2! 3!

p ( p+1)(p+ 2)…( p+ n−1) n


∇ yn .
n!

where p= (x-xn)/h

which is Newton’s backward difference interpolation formula and it is useful


for interpolation near the end of set of tabular values.
Algorithm for Newton forward and backward interpolation:

Step 1: Write the given data (functional values).

Step 2: Observe whether the functional point we have to calculate is near to


beginning or the end of given tabulated values.

Step 3: i) If it is near to the beginning of tabulated values then use Newton’s


forward difference interpolation formula .

ii) If it is near to the end of tabulated values then use Newton’s


backward interpolation formula.

Step 4: Form a Forward/backward Difference table according to tabulated


values .

Step 5: find the value of p .

Step 6: Substitute the value of p and tabulated values from difference table in
forward/ backward difference formula.

Step 7: We get required functional value .


Example:

From the following table of values, find a) tan 0.12 and b) tan 0.26 .

x y=tan x
0.10 0.1003
0.15 0.1511
0.20 0.2027
0.25 0.2553
0.30 0.3093

Solution:

a) Here we have to find value of tan 0.12 which is the value near the beginning
of a set of tabular values. Hence we will use Newton’s forward interpolation
formula to solve this problem.

The table of difference is:

x y ∆ ∆
2

3

4

0.10 0.1003
0.0508
0.15 0.1511 0.0008
0.0516 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

We have x= x0 + ph
Here x0=0.10, h= 0.05 and x=0.12
0.12 = 0.10 + p(0.05)
=> p = (0.12-0.10)0.05
P =0.4
We have Newton forward interpolation formula as

p ( p−1) 2 p ( p−1)( p−2) 3


yn(x) =y0 + p∆ y 0 + ∆ y0 + ∆ y 0+ …+
2! 3!
p ( p−1)( p−2)…( p−n+1) n
∆ y0 .
n!

for this problem formula will be

p ( p−1) 2 p ( p−1)( p−2) 3 p ( p−1)( p−2)( p−3) 4


yn(x) =y0 + p∆ y 0 + ∆ y0 + ∆ y 0+ ∆ y0 .
2! 3! 3!

0.4(0.4−1) 0.4 ( 0.4−1 ) ( 0.4−2 )


tan (0.12)= 0.1003 + (0.4)(0.0508)+ ( 0.0008) +
2 3!
(0.0002)

0.4 ( 0.4−1 ) ( 0.4−2 ) (0.4−3)


+ (0.0002)
4!

= 0.1205

 tan(0.12)= 0.1205
Python program for newton’s forward difference interpolation formula:
Output :
b) Here we have to find value of tan 0.26 which is the value near the end of
tabular value. Hence we will use Newton’s backward interpolation formula to
solve the problem.

The table of difference is:

x y ∇ ∇
2

3

4

0.10 0.1003
0.0508
0.15 0.1511 0.0008
0.0516 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

We have x= xn + ph
Here xn=0.30, h= 0.05 and x=0.26
0.26 = 0.30 + p(0.05)
=> p = (0.26-0.30)0.05
P = -0.8
We have Newton backward interpolation formula as
p ( p+1) 2 p ( p+1)(p+ 2) 3
yn(x) =yn + p∆ y n + ∇ yn + ∇ y n+ …+
2! 3!

p ( p+1)(p+ 2)…( p+ n−1) n


∇ yn
n!
for this problem formula will be

p ( p+1) 2 p ( p+1)(p+ 2) 3 p ( p+1)(p+ 2)( p+ 3) 4


yn(x) =yn + p∆ y n + ∇ yn + ∇ y n+ ∇ y n.
2! 3! 4!

(−0.8)(−0.8+1)
tan(0.26)=0.3093+ (-0.8)(0.0540)+ (0.0014)
2!

(−0.8)(−0.8+1)(−0.8+2) (−0.8)(−0.8+1)(−0.8+2)(−0.8+3)
+ (0.0004) +
3! 4!
(0.0002)

=0.2660

tan(0.26)=0.2660
Python program for Newton backward difference interpolation formula:
Output:
Central difference interpolation formulae:
In the preceding section, we derived and discussed Newton’s forward and
backward interpolation formulae, which are applicable for interpolation near
the beginning and end respectively, of tabulated values, we now discuss the
central difference formulae which are most suited for interpolation near the
middle of tabulated set.

II)Gauss’ Central difference formulae


i) Gauss’ forward formula:
We consider the following difference table in which the central ordinate is
taken for convenience as y0 corresponding to x= x0.

The difference used in this formula lie on the line shown in Table-1.
The formula is therefore, of the form
y p(x) =y0 + G1∆ y 0 + G2 ∆ 2 y −1 + G3 ∆ 3 y −1+G4 ∆ n y −2 +. . . ( ** )

Difference table for gauss central difference formula:

Table - 1

x y ∆ ∆
2

3

4

5

6

x-3 y-3
∆ y −3
x-2 y-2 2
∆ y −3
∆ y −2 3
∆ y −3
x-1 y-1 2
∆ y −2
4
∆ y−3
∆ y −1 3
∆ y −2
5
∆ y −3
x0 y0 ∆ y-1
2 4
∆ y−2
6
∆ y−3
∆ y0 3
∆ y −1
5
∆ y −2
x1 y1 2
∆ y0
4
∆ y−1
∆ y −1 ∆ y0
3

x2 y2 2
∆ y −1
∆ y −2
x3 y3

Clearly,
y p = E p y0
= (1+∆ ¿ p y0
p ( p−1) 2 p ( p−1)( p−2) 3
= y0 + p∆ y 0 + ∆ y0 + ∆ y 0 +. . .
2! 3!

Similarly, the right side of equation (**) can also be expressed in terms of y 0,
∆ y 0and higher order differences. We have

∆ y-1 = ∆ E-1y0
2 2

= ∆ 2 (1+∆)-1y0
= ∆ 2 ( 1−∆+ ∆2−∆3 +… ) y0
= ∆ 2y0 -∆ 3y0 +∆ 4y0 -∆ 5y0 +…

∆ y-1 = ∆ y0 -∆ y0 +∆ y0 -∆ y0 +…
2 3 4 5 6

∆ y-2 = ∆ E-1y0
4 2

=∆ 4 (1+ ∆)-2y0
= ∆ 4y0 -2 ∆5 y0 +3 ∆ 6y0 -4 ∆7 y0 +…

Hence eq. (**) gives the identity

p ( p−1) 2 p ( p−1)( p−2) 3


y 0 + p∆ y 0 + ∆ y0 + ∆ y 0 +. . .
2! 3!

= y0 + G1∆ y 0 + G2 ¿y0 -∆ 3y0 +∆ 4y0 -∆ 5y0 +…)+ G3¿ ¿y0 -∆ 4y0 +∆ 5y0 -∆ 6y0

+…) + G4( ∆ 4y0 -2 ∆5 y0 +3 ∆ 6y0 -4 ∆7 y0 +…) +… -(***)

Equating the coefficients of ∆ y 0 ,∆ 2 y 0 , ∆ 3 y 0 etc., on both sides of eq.(***)

We obtain

G1=p;

p ( p−1)
G 2= ;
2!

p ( p−1)( p+1)
G3 = ;
3!

p ( p−1)( p+1)( p−2)


G 4=
4!

Substituting these value in yp (x)

p ( p−1) 2 p ( p−1)( p+1) 3 p ( p−1)( p+1)( p−2) n


yp(x)= y0 + p∆ y 0 + ∆ y −1 + ∆ y −1+ ∆ y −2
2! 3! 4!
+.
..
Algorithm for Gauss’s forward formula:

Step 1: Write the given data (functional values).

Step 2: Here we have to calculate functional value near to the central point of
tabulated value.

Step 3: Form a Difference table according to tabulated values

Step 4: find the value of p by formula x= x 0+ ph


Step 5: Write Gauss’ Forward formula :

p ( p−1) 2 p ( p−1)( p+1) 3


yp(x)= y0 + p∆ y 0 + ∆ y −1 + ∆ y −1+
2! 3!
p ( p−1)( p+1)( p−2)
4!

∆ y −2 +. . .
n

and substitute the value of p and tabulated values from difference table
according to arrows shown in the Table -1 .

Step 7: We get required functional value .

ii) Gauss’ backward formula:

yp(x) =y0 + G1' ∆ y−1 + G2 ' ∆2 y −1 + G3' ∆3 y −2+G4 ' ∆n y−2 +. . .


Difference table for Gauss’ backward formula is

Table -2

x y ∆ ∆
2

3

4

5

6

⋮ ⋮
x-1 y-1 2
∆ y −2
4
∆ y−3
∆ y −1 3
∆ y −2
5
∆ y −3
x0 y0 ∆ y-1
2 4
∆ y−2
6
∆ y−3
∆ y0 3
∆ y −1
5
∆ y −2
x1 y1 2
∆ y0
4
∆ y−1
⋮ ⋮
Where G1 ,G2 , . . . have to be determined .following the same procedure as in
' '

Gauss’s forward formula, we obtain:

G1 =p
'

p ( p+1)
G2 = ;
'
2!

p ( p−1)( p+1)
G3 = ;
'
3!
p ( p−1)( p+1)( p +2)
G4 = ;. . .
'
4!

Substituting these values in y p (x )

p ( p+1) 2 p ( p−1)( p+1) 3 p ( p−1)( p+1)( p +2) 4


yp(x)= y0 + p∆ y 0 + ∆ y −1 + ∆ y −1+ ∆ y−2
2! 3! 4!
+. . .

The difference used in this formula lie on the arrows shown in Table-2.

Algorithm for Gauss’s backward formula:

Step 1: Write the given data (functional values).

Step 2: Here we have to calculate functional value near to the central point of
tabulated value.

Step 3: Form a Difference table according to tabulated values

Step 4: find the value of p by formula x= x 0+ ph

Step 5: Write Gauss’ backward formula :

p ( p+1) 2 p ( p−1)( p+1) 3 p ( p−1)( p+1)( p +2)


yp(x)= y0 + p∆ y 0 + ∆ y −1 + ∆ y −1+
2! 3! 4!
+

∆ y−2 + . . .
4

and substitute the value of p and tabulated values from difference table
according to arrows shown in the Table -2 .

Step 7: We get required functional value.


III) Stirling formula:

Taking the mean of Gauss’s Forward and Backward formulae, we obtain

∆ y 0 +∆ y −1 p 2 2 3 3 2 2
p ( p2−1) ∆ y−1 +∆ y −2 p (p −1) 4
yp(x) = y0 + p + ∆ y −1 + + ∆ y−2+…
2 2 3! 2 4!

Algorithm for Stirling formula:

Step 1: Determine the values of the function f(x) at a set of known points
x0 , x1 , … , xn .

Step 2: Calculate the differences between the values of the function at each
Pair of adjacent points.

Step 3: Calculate the first order differences ∆ y i = y i+1− y i for i= 0,…,n-1.

Step 4: Calculate the second order differences ∆ 2 y i=∆ y i+1−∆ y i


for i= 0,…,n-1.

Step 5: Continue this process until you have calculated all the nth –order
differences.

Step 6: Use Sterling formula to estimate the value of function at the point x
That you are interested in. The Sterling formula states that :

∆ y 0 +∆ y −1 p 2 2 3 3
p ( p2−1) ∆ y−1 +∆ y −2
yp(x) = y0 + p + ∆ y −1 +
2 2 3! 2
2 2
p (p −1) 4
∆ y−2+…
4!

Where y0 is the value of the function at the point x 0 .


x−x 0
p= here h is the difference between tabulated points.
h

Step 7: Substitute the values of y , y 0 and the differences that you are
Calculated in steps 1 to 5 into Sterling formula to estimate the value of
Function at the point x.

Step 8: Check the accuracy of your estimate by comparing it to the actual


Value .
IV) Bessel’s Formula:
This is very useful formula for practical interpolation and it uses the differences
as shown in the following table, where the brackets mean that the average of
the values has to be taken:

. .
. .
. .
x-1 Y-1

X0 ( y 0 y 1) ∆ y0 2 3
(∆¿¿ 2 y−1 ∆ y 0) ¿ ∆ y −1
4 5
(∆¿¿ 4 y−2 ∆ y−1 )¿ ∆ y −2 ¿¿
6
∆ y−2 ¿
X1
. .
. .
. .

Bessel’s Interpolation formula is written as:

y 0+ y 1 2 2
∆ y−1 +∆ y 0
4 4
∆ y −2+ ∆ y −1
yp(x) = + B1 0+ B2
∆ y + B3∆ y −1 + B4
3
+…
2 2 2

2 2 4 4
∆ y−1 +∆ y 0 ∆ y −2+ ∆ y −1
=y0 + (B1 +1/2) ∆ y 0 + B2 + B3∆ 3 y −1 + B4 +…
2 2
Using the method outlined in Gauss forward formula, we obtain,-
1
B1 + 2 =p,

p ( p−1)
B2 =
2!

1
p ( p−1)( p− )
B3 = 2
3!

p ( p−1)( p+1)( p−2)


B4 = ...
4!

Hence Bessel’s interpolation formula may be written as:


1
p ( p−1) ∆2 y−1 +∆ 2 y 0 p ( p−1)( p− ) 3
yp(x) = y0 + p∆ y 0+ + 2 ∆ y −1 +
2! 2 3!
p ( p−1)( p+1)( p−2) ∆ 4 y −2+ ∆4 y −1
+…
4! 2
Algorithm for Bessel’s formula:

Step 1: Determine the values of the function f(x) at a set of known points
x0 , x1 , … , xn .

Step 2: Calculate the differences between the values of the function at each
Pair of adjacent points.

Step 3: Calculate the first order differences ∆ y i = y i+1− y i for i= 0,…,n-1.

Step 4: Calculate the second order differences ∆ 2 y i=∆ y i+1−∆ y i


for i= 0,…,n-1.

Step 5: Continue this process until you have calculated all the nth –order
differences.

Step 6: Use Bessel’s formula to estimate the value of function at the point x
That you are interested in. The Bessel’s formula states that :

1
p ( p−1) ∆2 y−1 +∆ 2 y 0 p ( p−1)( p− ) 3
yp(x) = y0 + p∆ y 0+ + 2 ∆ y −1 +
2! 2 3!

p ( p−1)( p+1)( p−2) ∆ 4 y −2+ ∆4 y −1


+…
4! 2

Where , y0 is the value of the function at the point x 0.


x−x 0
p= here h is the difference between tabulated points.
h

Step 7: Substitute the values of y , y 0 and the differences that you are
Calculated in steps 1 to 5 into Bessel’s formula to estimate the value of
Function at the point x.

Step 8: Check the accuracy of your estimate by comparing it to the actual


Value .
V) Everett’s Formula:
This is an extensively used interpolation formula and uses only even order
differences, as shown in following table:

x0 y0 ∆ y-1
2
∆ y−2
4 6
∆ y−3
- - - -
x1 y1 ∆ y0
2
∆ y−1
4 6
∆ y−2

Hence the formula has form

yp(x) = E0y0 + E2∆ y −1 + E4 ∆ 2 y −1 + …+ F0y1 + F2 ∆ 2 y 0 + F4 ∆ 4 y−1 +…

The coefficient E0,F0,E2,F2,E4,F4,… can be determined by the same method as in


the preceding cases and we obtain

E0= 1-p= q F0=p


2 2 2 2
q(q −1 ) p ( p −1 )
E 2= F 2=
3! 3!

2 2 2 2 2 2 2 2
q(q −1 )(q −2 ) p ( p −1 )(p −2 )
E4 == F 4=
5! 5!

. .
. .
. .

Hence Everett’s formula is given by

2 2 2 2 2 2
q(q −1 ) 2 q(q −1 )(q −2 )
yp(x) = qy0 + ∆ y −1 + ∆ y−2 +…
4

3! 5!

2 2 2 2 2 2 2
p ( p −1 ) p ( p −1 )(p −2 ) 4
+ py1 + ∆ y0 + ∆ y−1 +…
3! 5!

Where q= 1-p
Algorithm for Everett’s formula:

Step 1: Determine the values of the function f(x) at a set of known points
x0 , x1 , … , xn .

Step 2: Calculate the differences between the values of the function at each
Pair of adjacent points.

Step 3: Form a difference table by calculating first order, second order upto
n-1 order differences.

Step 4: Calculate value of q by formula q= 1-p

Step 5: Use Everett’s formula to estimate the value of function at the point x
That you are interested in. The Everett’s formula states that
2 2 2 2 2 2
q(q −1 ) 2 q(q −1 )(q −2 )
yp(x) = qy0 + ∆ y −1 + ∆ y−2 +…
4

3! 5!

2 2 2 2 2 2 2
p ( p −1 ) p ( p −1 )(p −2 ) 4
+ py1 + ∆ y0 + ∆ y−1 +…
3! 5!

Step 6: Substitute the values of p and q and the differences which are
Calculated in the Everett’s formula to estimate the value of function
at point x.

Step 7: Check the accuracy of your estimate by comparing it to the actual


Value.

Example:
The following table gives the values of ex for certain equidistant values of x.
Find the value of ex when x= 0.644.

x y=ex
0.61 1.840431
0.62 1.858928
0.63 1.877610
0.64 1.896481
0.65 1.915541
0.66 1.934792
0.67 1.954237

Solution:

The table of difference is

x Y=ex ∆ ∆
2

3

4

0.61 1.840431
0.018497
0.62 1.858928 0.000185
0.018682 0.000004
0.63 1.877610 0.000189 -0.000004
0.018871 0
0.64 1.896481 0.000189 0.000002
0.019060 0.000002
0.65 1.915541 0.000191 0.000001
0.019251 0.000003
0.66 1.934792 0.000194
0.019445
0.67 1.954237

Here x0= 0.64 , x= 0.644 and x= x0 + ph

0.644−0.64
Hence p= 0.01
=0.4
A) Gauss forward interpolation formula is given by

p ( p−1) 2 p ( p−1)( p+1) 3 p ( p−1)( p+1)( p−2) n


yp(x)= y0 + p∆ y 0 + ∆ y −1 + ∆ y −1+ ∆ y −2
2! 3! 4!
+. . .

0.4(0.4−1)
y(0.644)= 1.896481 + 0.4 (0.019060) + (0.000189)+
2!

0.4(0.4−1)(0.4+1) 0.4(0.4−1)(0.4+1)(0.4−2)
(0.000002) + (0.000002).
3! 4!

=1.904082253

Here actual value of ex at x=0.644 is 1.904081995

Error= |actual value – calculated value|

=|1.904081995 - 1.904082253|

= 2.58×10−7

B) Gauss backward interpolation formula is given by

p ( p+1) 2 p ( p−1)( p+1) 3 p ( p−1)( p+1)( p +2) 4


yp(x)= y0 + p∆ y 0 + ∆ y −1 + ∆ y −1+ ∆ y−2
2! 3! 4!
+. . .

0.4(0.4+1)
y(0.644)= 1.896481 + 0.4 (0.018871) + (0.000189)+
2!

0.4(0.4−1)(0.4+1) 0.4(0.4−1)(0.4+1)(0.4+ 2)
(0) + (0.000002)
3! 4!

=1.904082253

Error= |actual value – calculated value|

=|1.904081995 - 1.904082253|

= 2.58 ×10−7
C) Sterling formula is given by

∆ y 0 +∆ y −1 p 2 2 3 3
p ( p2−1) ∆ y−1 +∆ y −2 + p ( p2−1) 4
yp(x) = y0 + p + ∆ y −1 + + ∆ y−2+…
2 2 3! 2 4!

0.018871+0.019060 0.16
y(0.644)= 1.896481 + (0.4) 2
+ 2 ( 0.000189)

0.4(0.16−1) 0+0.000002 0.16(0.16−1)


+ + (0.000002)
6 2 24

=1.904082253

Error= |actual value – calculated value|

=|1.904081995 - 1.904082253|

= 2.58×10−7

D)Bessel’s formula is given by

1
p ( p−1) ∆2 y−1 +∆ 2 y 0 p ( p−1)( p− ) 3
yp(x) = y0 + p∆ y 0+ + 2 ∆ y −1 +
2! 2 3!

p ( p−1)( p+1)( p−2) ∆ 4 y −2+ ∆4 y −1


+…
4! 2

0.4(0.4−1) 0.000189+0.000191
y(0.644)= 1.896481+ 0.4(0.019060) +
2! 2

1
0.4(0.4−1)(0.4− )
+ 2 (0.0000020)
3!

0.4(0.4−1)(0.4+1)(0.4−2) 0.000002+0.000001
+ 2
4!

=1.904082242

Error= |actual value – calculated value|

=1.904081995 - 1.904082242
= 2.47 ×10−7

E) Everett’s Formula is given by


2 2 2 2 2 2
q(q −1 ) 2 q(q −1 )(q −2 )
yp(x) = qy0 + ∆ y −1 + ∆ y−2 +…
4

3! 5!

2 2 2 2 2 2 2
p ( p −1 ) p ( p −1 )(p −2 ) 4
+ py1 + ∆ y0 + ∆ y−1 +…
3! 5!

Here q= 1-0.4= 0.6

0.6(0.36−1)
y(0.644)= 0.6(1.896481)+ (0.000189)
3!

0.6(0.36−1)(0.36−4)
+ (0.000002) +0.4(1.915541)
5!

0.4(0.16−1) 0.4 ( 0.16−1 ) (0.16−4 )


+ (0.000191) + (0.000001)
3! 5!

=1.904082242

Error= |actual value – calculated value|

=|1.904081995 - 1.904082242|

= 2.47 ×10−7

In all the above cases, the value obtained is correct to six decimal places.
Python program for Gauss forward interpolation formula:
Output:

Python program for Gauss Backward interpolation formula:


Output:
Python program for Stirling formula:
Output:
Python program for Bessel’s interpolation
Output:

Python program for Everett’s interpolation method:

Output:
Relation between Bessel’s and Everett’s Formulae

These formulae are very closely related, and it is possible to deduce one from
the other by suitable rearrangement. To see this we start with Bessel’s formula
1
p ( p−1) ∆2 y−1 +∆ 2 y 0 p ( p−1)( p− ) 3
yp(x) = y0 + p∆ y 0+ + 2 ∆ y −1 +
2! 2 3!

p ( p−1)( p+1)( p−2) ∆ 4 y −2+ ∆4 y −1


+…
4! 2

1
p ( p−1) ∆2 y−1 +∆ 2 y 0 p ( p−1)( p− )
= y0 + p( y 1− y 0 ¿ ¿ + + 2 (∆¿¿ 2 y 0−∆ 2 y −1 )¿ +
2! 2 3!

p ( p−1)( p+1)( p−2) ∆ 4 y −2+ ∆4 y −1


+…
4! 2

Expressing the odd order differences in terms of low even order differences.
This gives on simplification

1
p( p−1)(p− )
y p= (1-p)y0 + p ( p−1) 2 ∆ 2 y −1+…

4 6

1
p( p−1)(p− )
p y 1+ p ( p−1) 2 ∆ 2 y 0 +…

4 6

q (q 2−12) 2 p ( p 2−12 ) 2
=q y 0+ ∆ y−1+ …+ ∆ y 0 +…
3! 3!

Which is Everett’s formula truncated after second differences.


Hence we have a result of practical importance that Everett’s formula
truncated after second differences is equivalent to Bessel’s formula truncated
after third differences. In a similar way, Bessel’s formula may be deduced from
Everett’s.

2)Interpolation with unevenly spaced points:

In the preceding sections, we have derived interpolation formulae of utmost


importance and discussed their practical use in some detail. But ,as is well
known ,they possess the disadvantage of requiring the values of the
independent variable to be equally spaced. It is therefore desirable to have
interpolation formulae with unequally spaced values of argument. We discuss,
in the present section and the next, four such formulae:

 Lagrange’s interpolation formula


 Hermite’s interpolation formula
 Newton’s general interpolation formula
 Aitken’s method of interpolation by iteration

I) Lagrange’s Interpolation formula

Let y(x) be continuous and differentiable (n+1) times in the interval (a,b). Given
the (n + 1) points (x0,y0), (x1,y1),…, (xn,yn) and the values of x are not necessarily
equidistant. We wish to find a polynomial of degree n, say Ln(x), such that

Ln(xi)= y(xi)=yi, i=0,1,…,n.- (1)


2 n
Let Ln(x)= a0+ a1x+ a2x +…+anx (2)
Be the desired polynomial of nth degree such that conditions given in eq. (I)
(called interpolatory conditions) are satisfied.
Substituting the conditions in eq.(1),we obtain the system of equations

Y0= a0+ a1x0+ a2x02+…+ anx0n


Y0= a0+ a1x1+ a2x12+…+ anx1n
Y0= a0+ a1x2+ a2x22+…+ anx2n
.
. (3)
.
Y0= a0+ a1xn+ a2xn2+…+ anxnn

The set of eqs. (2) will have a solution if

| |
2 n
1 x0 x0 ⋯ x0
2 n
1 x1 x1 ⋯ x1
≠0
⋮ ⋮ ⋮ ⋱ ⋮
1 x n x 2n ⋯ x nn
The value of this determinant, called Vandermonde’ s determinant ,is
(x0-x1) (x0-x2) . . . (x0-xn) (x1-x2) . . . (x1-xn) . . . (xn-1-xn).

Eliminating a0, a1,.., an from (2) & (3), we obtain


| |
2 n
Ln (x ) 1 x x ⋯ x
2 n
y0 1 x0 x0 ⋯ x0
x1 ⋯ x 1 = 0,
2 n
y1 1 x1
⋮ ⋮ ⋮ ⋮ ⋱ ⋮
2 n
yn 1 xn xn ⋯ xn

Which shows that Ln (x ) is a linear combination of y 0, y 1, …, y n.


Hence we write
n
Ln (x )=∑ l i (x ) y i (4)
i=0

Where li (x) are polynomials in x of degree n.


Since Ln (x j )= y j for j= 0,1,2,…,n

We have
l i (x j )= 0 if i≠ j
l i (x j )= 1 if i¿j

Hence li (x) may be written as

( x −x 0) ( x− x1 ) … ( x−x i−1 ) ( x−x i+1 ) …(x−x n )


l i ( x )= (5)
( x i−x 0 ) ( x i−x 1 ) … ( x i−x i−1 ) ( x i−x i+1 ) … (xi −x n)

If we now set

n +1
( x )=¿ ¿ ( x−x 0 ) ( x−x 1 ) … ( x−x i−1 )( x −xi ) ( x−x i+ 1) … (x−x n),

Then
'
d
∏ (x i)= dx [∏
n +1
( x )]x=xi
n +1

=( x i−x 0 ) ( x i−x 1 ) … ( xi −xi−1 ) ( x i−x i+1 ) …(x i−x n )

So that Eq. (5) becomes


n+1
(x)
li ( x ) = ' (6)
( x−x i ) ∏ (x i )
n+1

Hence Eq. (4) gives


n ∏ (x )
Ln ( x ) =∑
n+1
'

( x−x i ) ∏ (x i)
i=0

n+1

Which is called Lagrange’s interpolation formula. The coefficients l i ( x ), defined


in Eq. (4) are called Lagrange’s interpolation coefficients.

Algorithm for Lagrange’s formula:

Step 1: Read n [n being the number of values]

Step 2: Read values of xi, fi for i = 1, 2,..., n.

Step 3: Set sum = 0, i = 1

Step 4: Read x [x being the interpolating point]

Step 5: Set j = 1, product = 1

Step 6: Check if j ≠ i, product = product × (x – xj)/(xi– xj)


else go to Step 7

Step 7: Set j = j + 1

Step 8: Check if j > n, then go to Step 9 else go to Step 6

Step 9: Compute sum = sum + product × fi

Step 10: Set i = i + 1

Step 11: Check if i > n, then go to Step 12 else go to Step 5

Step 12: Write x, sum


II)Hermite’s Interpolation Formula:

The interpolation formulae so far considered make use of only a certain


number of function values .We now derive an interpolation formula in which
both the function and its first derivative values are to be assigned at each point
of interpolation. This is referred to as Hermite’s interpolation formula. The
interpolation problem is then defined as follows: Given the set of data points
(xi,yi,yi’),i=0,1,…,n, it is required to determine a polynomial of the least degree,
say H 2 n+1(x),such that

H 2 n+1 ( x i),= y i and H ' 2 n+1 ( x i),= y ' i : i=0,1,…n ---------(1)

Where the primes denote differentiation with respect to x. The polynomial


H 2 n+1 (x) is called Hermite’s Interpolation polynomial. We have here (2n+2)
conditions and therefore the number of coefficients to be determined is (2n+2)
and the degree of polynomial is (2n+1). In analogy with the Lagrange’s
interpolation formula (1), we seek a representation of form
n n
H 2 n+1 (x)=∑ u i (x) y i + ∑ v i (x) y ' i ----------------(2)
i=0 i=0

Where ui (x ) and v i( x) are polynomials in x of degree (2n+1). Using conditions


(1) ,we obtain

1, if i = j
ui ( x j ) = 0 , if i≠; j v i ( x ) = 0, for all i

----(3)
1, if i = j
u ' i ( x j ) = 0, for all I ; vi ( x j ) = 0 , if i≠ j

Since ui (x ) and v i( x) are polynomials in x of degree (2n+1), we write

ui (x )= Ai (x ) [l i (x) ]2 and v i( x)= Bi (x) [l i (x) ]2 ------------(4)

Where li (x) are given by eq. (6) in Lagrange’s interpolation formula. It is easy to
see that Ai ( x ) and Bi (x) are both linear functions in x. We therefore write

ui (x )= (a i x +bi ¿ [l i (x) ]2 and v i( x)= (cx +d ¿ [l i (x) ]2 -------(5)


Using conditions Eq. (3) in (5), we obtain

a i x +bi =1
c i x + di =0

And (6)

a i+ ¿ 2 l 'i ( x i )=0
c i=1

From Eq. (6) we deduce

a i=−¿ 2 l 'i ( x i ), b i=1+2 x i l 'i ( xi )


(7)
c i=1 d i=−x i

Hence Eq. (50 become

ui (x ) =[ −2 l 'i ( x i )+1+2 xi l 'i ( xi ) ¿ [l i (x) ]2

'
=[1- 2( x−x i ¿l i ( x i )] [l i (x)]2
(8)
And

v i( x) = ( x−x i ¿[l i (x) ]2

Using the above expressions for ui (x ) and v i( x) in Eq. (2), we obtain finally
n
H 2 n+1 (x)=∑ [1−2(x−x i )l 'i ( xi ) ][l i (x )]2 y i+( x−x i ¿[l i (x) ]2 y ' i –(8)
i=0

Which is required Hermite’s Interpolation Formula.

Algorithm for Hermite’s formula:

Step 1: Determine the values of the function f '(x) at a set of known points
x0 , x1 , … , xn .

n+1
(x)
Step 2: Calculate li (x) by using formula l i ( x ) = ' for i=0,1,…,n-1.
( x−x i ) ∏ (x i )
n+1

Step 3: Then substitute the value of x at which we want to calculate functional


Value in li ( x ) .

Step 4: Calculate li ' ( xi ) for values of i=0,1,…,n-1.

Step 5: Use Hermite’s formula to estimate the value of function at the point x
That you are interested in. The Hermite’s formula states that
n
H 2 n+1 (x)=∑ [1−2(x−x i )l 'i ( xi ) ][l i (x )]2 y i+( x−x i ¿[l i (x) ]2 y ' i
i=0

'
Where we have calculated l i (x) ,li ( xi ) in step 3 and step 4 respectively.

Step 6:Substitute the above values in the Hermite’s formula to estimate the
value of function at point x.

Step 7: Check the accuracy of your estimate by comparing it to the actual


Value.
III)Newton’s General interpolation formula

By definition, we have

y− y 0
[x,x0] = x−x ‘
0

So that

y= y 0 + ( x−x 0) [ x , x 0] -----------(1)

Again
[ x , x 0 ]−[ x0 , x 1]
[x , x0 , x1 ¿ = x−x 1

Which gives

[ x , x 0] = ¿] + (( x−x 1 ¿ [ x , x 0 , x 1 ¿

Substituting this value of [x,x0] in Eq. (1)

y= y 0 +(x−x¿ ¿ 0)¿ ¿] + ¿ ¿ )( x−x 1 ¿ [ x , x 0 , x 1 ¿ -----(2)

But
[ x ¿¿ 0 , x1 , x2 ]
[ x , x 0 , x 1 , x 2 ¿= [ x , x 0 , x 1 ]− x−x 2
¿

And so

[ x , x 0 , x 1 ]=[x ¿ ¿ 0 , x 1 , x 2 ]¿ + ( x−x 2 ¿ [ x , x 0 , x 1 , x 2 ¿---------(3)

Eq. (2) now gives


y= y 0 +(x−x¿ ¿ 0)¿ ¿] + ¿ ¿ )( x−x 1 ¿ [ x ¿ ¿ 0 , x 1 , x 2 ]¿+
¿ ¿ )( x−x 1 ¿ ( x−x 2 ¿ [ x , x 0 , x 1 , x 2 ¿ ------------(4)

Proceding in this way, we obtain


y= y 0 +(x−x¿ ¿ 0)¿ ¿] + ¿ ¿)( x−x 1 ¿ [ x ¿ ¿ 0 , x 1 , x 2 ]¿+
¿ ¿)( x−x 1 ¿ ( x−x 2 ¿ [ x 0 , x 1 , x 2 , x 3 ¿ + …
(¿ ¿ )( x−x 1 ¿ ( x−x 2) … ( x−x n ¿ [ x , x 0 , x 1 ,… , x n ¿ --(5)

This formula is called Newton’s General interpolation formula with divided


differences, the last term being the remainder term after (n+1) terms.
Algorithm for Newton’s general interpolation method:
Step 1: Determine the values of the function f(x) at a set of known points
x0 , x1 , … , xn .

Step 2: Calculate divided differences of order 1,2,…,n .

Step 3: Use Newton general interpolation formula to estimate the value of


x that you want to calculate. Newton’s general interpolation formula
States that:
y= y 0 +(x−x¿ ¿ 0)¿ ¿] + ¿ ¿)( x−x 1 ¿ [ x ¿ ¿ 0 , x 1 , x 2 ]¿+
¿ ¿)( x−x 1 ¿ ( x−x 2 ¿ [ x 0 , x 1 , x 2 , x 3 ¿ + …
(¿ ¿ )( x−x 1 ¿ ( x−x 2) … ( x−x n ¿ [ x , x 0 , x 1 ,… , x n ¿

Step 4: Substitute the calculated divided differences and value of x in above


Formula to get required functional value.

Step 5: Check the accuracy of your estimate by comparing it to the actual


Value
.
IV)Interpolation by Iteration

Newton’s General interpolation formula may be considered as one of a class of


methods which generate successively higher –order interpolation formulae.
We now describe another method of this class, due to A.C. Aitken, which has
advantage of being very easily programmed for a digital Computer.
Given the (n+1) points (x0,y0), (x1,y1),…, (xn,yn) and the values of x are not
necessarily equidistant., then to find value of y corresponding to any given
value of x we proceed iteratively as follows :
Obtain a first approximation by y by considering the first – two points only;
then obtain its second approximation by considering the first three points, so
on. We denote the different interpolation polynomials by ∆ (x),
With suitable subscript, so that at the first stage of approximation, we have

∆ 01( x)= y 0 + ( x−x 0) [ x , x 0] =


1
|
y0
x1− x0 y1 |
x 0−x
x 1−x

Similarly, we can form ∆ 02 ( x ) , ∆ 03 (x) ,…


Next, we form ∆ 012 (x ) by considering the first –three points:

∆ 012 (x ) =
1
|
∆01 (x) x1−x
x2 −x1 ∆02 (x) x 2−x |
Similarly, we obtain ∆ 013 (x ), ∆ 014 (x), etc. At the n th stage of approximation,
We obtain

∆ 012… n (x) =
1
|∆012 …n−1 (x) x n−1 −x
x n−x n−1 ∆012 …n−2 n (x) x n−x |
The computation may conveniently be arranged as in table below
Aitken’s Scheme
x y
x0 y0
∆ 01( x)
x1 y1 ∆ 012 (x )
∆ 02 ( x ) ∆ 0123 (x )
x2 y2 ∆ 013 (x ) ∆ 01234 (x )
∆ 03 ( x ) ∆ 0124 (x )
x3 y3 ∆ 014 ( x)
∆ 04 ( x )
x4 y4
Algorithm for Newton’s general interpolation method:
Step 1: Determine the values of the function f(x) at a set of known points
x0 , x1 , … , xn .

Step 2: Calculate the first approximation by considering first 2 points only.

Step 3: Calculate the second approximation by considering first 3 points only.

Step 4: Continue this process upto n th stage of approximation.

Step 5: Check the accuracy of your estimate by comparing it to the actual


Value

Example:
Certain corresponding values of x and log 10 (x ) are :
x y=log 10 x

300 2.4771

304 2.4829

305 2.4843

307 2.4871

Find log 10 (301)


A) Lagrange method

We have

( x−x 1 ) ( x−x 2) ( x− x3 )
l0 ( x ) =
( x 0 −x1 ) ( x 0−x 2 ) ( x 0−x 3 )
( 301−304 ) ( 301−305 ) ( 301−307 )
¿
( 300−304 ) (300−305 ) ( 300−307 )

−3 .−4.−6 18
¿ =
−4.−5.−7 35
( x− x0 ) ( x−x 2 ) ( x−x 3 )
l 1 ( x )=
( x 1−x 0 ) ( x 1−x 2 )( x 1−x 3 )

( 301−300 ) ( 301−305 )( 301−307 )


¿
( 304−300 ) (304−305 )( 304−307 )

1.−4.−6 24
¿ = =2
4.−1.−3 12

( x −x 0 )( x −x1 ) ( x−x 3 )
l 2 ( x )=
( x 2−x 0 ) ( x 2−x 1 )( x2− x3 )

( 301−300 )( 301−304 ) ( 301−307 )


¿
( 305−300 )( 305−304 ) ( 305−307 )

1.−3.−6 18 9
¿ = =
5.1.−2 −10 −5

( x−x 0 )( x−x 1) ( x−x 2 )


l3 ( x ) =
( x 3−x 0 ) ( x 3−x 1 ) ( x 3−x 2 )

( 301−300 ) (301−304 )( 301−305 )


¿
( 307−300 )( 307−304 )( 307−305 )

1.−3.−4 2
¿ =
7.3. 2 7

We have Lagrange’s formula of interpolation:

n ∏ (x )
Ln ( x ) =∑
n+1
'

( x−x i ) ∏ (x i)
i=0

n+1

Substituting calculated values. We get,

18 9 2
log 10 ( 301 )=¿
35
( 2.4771 ) +2 ( 2.4829 ) +
−5
(2.4843)+ 7
(2.4871)

¿ 2.478597143

Actual value of log 10 ( 301 ) is 2.478566496


Error= |actual value – calculated value|

=|2.478566496 - 2.478597143|

= 3.0647 ×10−5

B) Hermite’s interpolation method

x y=log 10 x y'

300 2.4771 1.4476×10-3

304 2.4829 1.4286×10-3

305 2.4843 1.4239×10-3

307 2.4871 1.4146×10-3

We have,
( x−x 1 ) ( x−x 2) ( x− x3 )
l0 ( x ) =
( x 0 −x1 ) ( x 0−x 2 ) ( x 0−x 3 )

( x−304 )( x−305 )( x−307 )


¿
( 300−304 ) (300−305 ) ( 300−307 )

−1 3
¿ ( x −916 x 2 +279683 x−28465040 )
140

( x− x0 ) ( x−x 2 ) ( x−x 3 )
l 1 ( x )=
( x 1−x 0 ) ( x 1−x 2 )( x 1−x 3 )

( x−300 ) ( x−305 ) ( x −307 )


¿
( 304−300 ) (304−305 )( 304−307 )

1 3
¿ ( x −912 x 2+277235 x−28090500 )
12

( x −x 0 )( x −x1 ) ( x−x 3 )
l 2 ( x )=
( x 2−x 0 ) ( x 2−x 1 )( x2− x3 )

( x−300 ) ( x−304 )( x−307 )


¿
( 305−300 )( 305−304 ) ( 305−307 )
−1 3
¿ ( x −911 x 2 +276628 x−27998400 )
10

( x−x 0 )( x−x 1) ( x−x 2 )


l3 ( x ) =
( x 3−x 0 ) ( x 3−x 1 ) ( x 3−x 2 )

( x−300 ) ( x−304 ) ( 301−305 )


¿
( 307−300 )( 307−304 )( 307−305 )

−1 3
¿ ( x −909 x 2 +275420 x−27816000 )
10

−1
'
l 0( x ) ¿ ( 3 x 2−1832 x +279683 )
140

'
∴ l 0 ( x 0 )=−0.5929

1
'
l 1 ( x )= ( 3 x 2−1824 x +277235 )
12

'
∴ l 1 ( x 1 )=−1.0833

−1
'
l 2 ( x )= ( 3 x 2−1822 x+276628 )
10
'
∴ l 2 ( x 2 )=0.7

−1
'
l 3 ( x )= ( 3 x 2−1818 x+ 275420 )
42

'
∴ l 3 ( x 3 )=0.9762
Here x= 301
Hence
We know that
n n
H 2 n+1 (x)=∑ [1−2(x−x i )l 'i ( xi ) ][l i (x )]2 y i+∑ ( x−x i ¿[l i (x) ]2 y ' i
i=0 i=0

ui (x ) =[1- 2( x−x i ¿l 'i ( x i )] [l i (x) ]2

v i( x) = ( x−x i ¿[l i (x) ]2


H 7= [ 1−2 ( x −300 ) (−0.5929 ) ] ( 0.2645 ) ( 2.4771 )

+ [ 1−2 ( x−304 ) (−1.0833 ) ] (4 )(2.4829)

+ [ 1−2 ( x−305 )( 0.7 ) ] (3.24)(2.4843)

+ [ 1−2 ( x−307 )( 0.9762 ) ] (0.08163)(2.4871)

−3
+ ( x−300 ) [ 0.2645 ] (1.4476 × 10 )

−3
+ ( x−304 ) [ 4 ] (1.4286 × 10 )

−3
+ ( x−305 ) [ 3.24 ] ( 1.4239× 10 )

−3
+ ( x−307 ) [ 0.08163 ] (1.4146 × 10 )

¿ 1.43212075+ (−54.6236 )+ 53.1242712+ 2.581302574+¿

−4 −4
3.828902 ×10 −0.0171432−0.018453744−6.92842788 ×10

¿ 2.478187627

Error= actual value – calculated value

=2.478566496 - 2.478187627

=-3.78869×10−4

C) Newton’s general interpolation formula:

The divided difference table is

x y=log 10 x
300 2.4771
0.00145
304 2.4829 - 0.00001
0.00140
305 2.4843 0
0.00140
307 2.4871

y −y 2.4829−2.4771
[ x 0 , x 1 ]= x 1−x 0 = 304−300
=0.00145
1 0

y −y 2.4843−2.4829
[ x 1 , x 2 ]= x 2−x 1 = 305−304
=0.00140
2 1

y −y 2.4871−2.4843
[ x 2 , x 3 ]= x 3−x 2 = 307−305
=0.00140
3 2

[ x 1 , x 2 ] −[ x 0 , x 1 ] 0.00140−0.00145
[ x 0 , x 1 , x 2 ]= = =−0.00001
x 2−x 0 305−300

[ x 2 , x 3 ] −[ x 1 , x 2 ] 0.00140−0.00140
[ x 1 , x 2 , x 3 ]= = =0
x 3−x 1 307−304

We have Newton’s general interpolation formula as

y= y 0 +(x−x¿ ¿ 0)¿ ¿] + ¿ ¿ )( x−x 1 ¿ [ x ¿ ¿ 0 , x 1 , x 2 ]¿+


¿ ¿ )( x−x 1 ¿ ( x−x 2 ¿ [ x 0 , x 1 , x 2 , x 3 ¿ + …
(¿ ¿ )( x−x 1 ¿ ( x−x 2) … ( x−x n ¿ [ x , x 0 , x 1 ,… , x n ¿

Putting values in the table in the formula:

log 10 301=2.4771+ ( 301−300 ) 0.00145+ ( 301−304 ) (−0.00001 )

¿ 2.4771+0.00145+ (−3 )(−0.00001 )

¿ 2.478553

Error=| actual value – calculated value|

=|2.478566496 - 2.478553|

=1.3496 ×10−5
D) Aitken’s method of interpolation by iteration

∆ 01 ( x )=
1 y0
x 1−x 0 y1 | x 0−x
x 1−x |
¿
1
|
2.4771 300−301
304−300 2.4829 304−301 |
¿ |
1 2.4771 −1
4 2.4829 3 |
1
¿ ( 7.4313+2.4829 ) =2.47855
4

Similarly,

∆ 02 ( x )=¿2.47854; ∆ 03 ( x )=2.47853

∆ 012 ( x )=2.47858; ∆ 013 ( x )=2.47857

∆ 0123 ( x )=2.47860

Putting all these values in table:

Aitken’s scheme is

x y=log 10 x
300 2.4771
2.47855
304 2.4843 2.47858
2.47854 2.47860
305 2.4843 2.47857
2.47853
307 2.4871

Hence
log 10 x=2.4786
Python program for Lagrange’s interpolation method:
Output:
Python program for Newton divided difference formula:
Output:
Conclusion:

In the preceding sections, we have derived some interpolation formulae of


great practical importance. A natural question is:

Which one of these formulae gives the most accurate result ?

i) For interpolation at the beginning or end of a table of values, Newton’s


forward and backward interpolation formulae have to be used respectively.

ii) For interpolation near the middle of a set of values ,the following are the
choices:

−1 1
Sterling’s formula if 4 ≤ p ≤ 4

And

1 3
Bessel’ s formula for 4 ≤ p ≤ 4

It can be shown that if the third differences are negligible, then Bessel’s
formula is about seven times more accurate than Sterling’s formula. If the third
differences are more than 60 in magnitude, then Everett’s formula should be
preferred.

The efficiency of interpolation methods depends on the specific characteristics


of the data and the problem being solved. Each method has its own
advantages and disadvantages, and there is no one-size-fits-all answer to this
question.

Lagrange’s interpolation method is a simple and straightforward method. That


involves fitting polynomial to the data points only. It is often used for
interpolating small sets of data points or when the data has a regular pattern.
However , it can be computationally expensive for large data sets, as it involves
Computing a separate polynomial for each data point.

Hermite’s interpolation method is a type of spline interpolation that involves


fitting a polynomial to the data and its derivatives at each data points. This can
result in a smoother curve than Lagrange’s interpolation, especially when the
data has abrupt changes or spikes. However it can be more computationally
expensive than Lagrange’s interpolation, as it involves fitting multiple
polynomials and computing derivatives.

Newton’s divided difference method is another common interpolation method


that involves fitting a polynomial to the dada using divided differences.it is
more often more efficient than Lagrange’s interpolation for larger data sets, as
it only requires computing divided differences once for each data points.
However, it can be less accurate than other methods,especially when the data
is highly irregular.

Interpolation by iteration is more complex method that involves iteratively


refining a solution using a sequence of approximations. It can be more
accurate than other methods, especially for highly irregular data sets, but it
can also be more computationally expensive.

In Summary, the most efficient interpolation method depends on the specific


characteristics of the data and the problem being solved. It is generally a good
idea to try multiple methods and compare their performance on your specific
data sets.
References
Bibliography
1. Introductory Methods of Numerical Analysis- by S.S.Sastry
2. Numerical Methods by R.K.Jain and S.R.K. Iyengar
3. Numerical Analysis notes of Alagappa University

Webliography
1. https://www.geeksforgeeks.org/python-programming-language/
2. https://www.codesansar.com/python-programming-examples
3. https://www.bottomscience.com/
4. ChatGpt

You might also like