Professional Documents
Culture Documents
1456308838E textofChapter2Module3 PDF
1456308838E textofChapter2Module3 PDF
by
Dr. Anita Pal
Assistant Professor
Department of Mathematics
National Institute of Technology Durgapur
Durgapur-713209
email: anita.buie@gmail.com
.
Chapter 2
Interpolation
Module No. 3
Let y = f (x) be given at 2n+1 equally spaced points x−n , x−(n−1) , . . . , x−1 , x0 , x1 , . . . , xn−1 , xn .
That is, yi = f (xi ), i = 0, ±1, ±2, . . . , ±n are known.
Based on these values we construct a polynomial φ(x) of degree at most 2n which
pass through the points (xi , yi ), i.e.
The coefficients ai ’s are unknown and their values are to be determined by substitut-
ing x = x0 , x1 , x−1 , x2 , x−2 , . . . , xn , x−n to (3.2).
Note that the appearance of the arguments to (3.2) follow the order x0 , x1 , x−1 , x2 ,
x−2 , . . . , xn , x−n and the same order is maintained to calculate the values of ai ’s.
By successive substitution of the values of x, we get the following equations.
y0 = a0
y1 = a0 + a1 (x1 − x0 ) i.e., y1 = y0 + a1 h,
y1 − y0 ∆y0
i.e., a1 = = .
x1 − x0 h
Again, y−1 = y0 + a1 (−h) + a2 (−h)(−2h)
∆y0
= y0 − h + a2 h2 · 2!
h
y−1 − 2y0 + y1 ∆2 y−1
i.e., a2 = = .
2! h2 2! h2
y2 = a0 + a1 (x2 − x0 ) + a2 (x2 − x0 )(x2 − x1 )
+a3 (x2 − x−1 )(x2 − x0 )(x2 − x1 )
y1 − y0 y−1 − 2y0 + y1
= y0 + (2h) + (2h)(h) + a3 (3h)(2h)(h)
h 2!h2
y2 − 3y1 + 3y0 − y−1 ∆3 y−1
or, a3 = = .
3!h3 3!h3
In this manner, the values of the remaining ai ’s can be determined. That is,
∆4 y−2 ∆5 y−2 ∆2n−1 y−(n−1) ∆2n y−n
a4 = , a5 = , . . . , a 2n−1 = , a2n = .
4!h4 5!h5 (2n − 1)!h2n−1 (2n)!h2n
Therefore, the Gauss’s forward difference interpolation formula is given by
∆y0 ∆2 y−1
φ(x) = y0 + (x − x0 ) + (x − x0 )(x − x1 )
h 2!h2
3
∆ y−1
+(x − x−1 )(x − x0 )(x − x1 ) + ···
3!h3
∆2n−1 y−(n−1)
+(x − x−(n+1) ) · · · (x − xn−1 )
(2n − 1)!h2n−1
∆2n y−n
+(x − x−(n+1) ) · · · (x − xn−1 )(x − xn ) . (3.3)
(2n)!h2n
In this formula, we assumed that the arguments are in equispaced, i.e. x± i = x0 ±
ih, i = 0, 1, 2, . . . , n. So, a new variable s is introduced, where x = x0 + sh.
2
......................................................................................
The formula (3.3) or (3.4) is known as Gauss’s forward central difference inter-
polation formula or the first interpolation formula of Gauss.
In this case, there are two points in the middle position. So, the arguments be taken
as x0 , x±1 , . . . , x±(n−1) and xn .
By using the previous process, the Gauss’s forward interpolation formula for even
3
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Central Difference Interpolation Formulae
∆2 y−1 ∆3 y−1
φ(x) = y0 + s∆y0 + s(s − 1) + (s + 1)s(s − 1)
2! 3!
∆4 y−2
+(s + 1)s(s − 1)(s − 2)
4!
∆5 y−2
+(s + 2)(s + 1)s(s − 1)(s − 2) + ···
5!
∆2n−1 y−(n−1)
+(s + n − 1) · · · s · · · (s − n − 1)
(2n − 1)!
2
∆ y−1 ∆3 y−1
= y0 + s∆y0 + s(s − 1) + s(s2 − 12 )
2! 3!
∆ 4y ∆5 y−2
−2
+s(s2 − 12 )(s − 2) + (s2 − 22 )(s2 − 12 )s + ···
4! 5!
2 ∆2n−1 y−(n−1)
+(s2 − n − 1 ) · · · (s2 − 12 )s . (3.5)
(2n − 1)!
From general expression of error term (discussed in Module number 1 of Chapter 2),
we have for 2n + 1 arguments
f 2n+1 (ξ)
E(x) = (x − x−n )(x − x−(n−1) ) · · · (x − x−1 )(x − x0 ) · · · (x − xn )
(2n + 1)!
= (s + n)(s + n − 1) · · · (s + 1)s(s − 1) · · · (s − n + 1)(s − n)
f 2n+1 (ξ)
× h2n+1
(2n + 1)!
f 2n+1 (ξ)
= s(s2 − 12 ) · · · (s2 − n2 ).h2n+1 (3.6)
(2n + 1)!
f 2n (ξ)
E(x) = (s + n − 1) · · · (s + 1)s(s − 1) · · · (s − n + 1)(s − n)h2n
(2n)!
2 f 2n (ξ)
= s(s2 − 12 ) · · · (s2 − n − 1 )(s − n).h2n , (3.7)
(2n)!
4
......................................................................................
Like previous case, there are two formulae for Gauss’s backward difference interpola-
tion one for odd number of arguments and other for even number number of arguments.
where ai ’s are unknown constants and their values are to be determined by using the
relations (3.8).
Also, xi = x0 +ih, x−j = x0 −jh for i, j = 0, 1, 2, . . . , n. Therefore, xi −x−j = (i+j)h
and (x−i − xj ) = −(i + j)h.
To find the values of ai ’ we substitute x = x0 , x−1 , x1 , x−2 , x2 , . . . , x−n , xn to (3.9) in
succession.
5
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Central Difference Interpolation Formulae
y0 = a 0
φ(x−1 ) = a0 + a1 (x−1 − x0 )
i.e., y−1 = y0 + a1 (−h),
y0 − y−1 ∆y−1
i.e., a1 = =
h h
∆y−1 ∆2 y−1
φ(x) = y0 + (x − x0 ) + (x − x−1 )(x − x0 )
1!h 2!h2
3
∆ y−2
+(x − x−1 )(x − x0 )(x − x1 )
3!h3
∆4 y−2
+(x − x−2 )(x − x−1 )(x − x0 )(x − x1 ) + ···
4!h4
∆2n−1 y−n
+(x − x−(n−1) ) · · · (x − x−1 )(x − x0 ) · · · (x − xn−1 )
(2n − 1)!h2n−1
∆2n y−n
+(x − x−n )(x − x−1 )(x − x0 )(x − x1 ) · · · (x − xn−1 ) . (3.10)
(2n)!h2n
6
......................................................................................
Like previous case, we introduced a unit less variable s, where x = x0 + sh. The
advantage to use such variable is that the formula becomes simple and easy to calculate.
Let us consider two identities
x − xi x − x0 − ih
= = s − i and
h h
x − x−i x − x0 + ih
= = s + i, i = 0, 1, 2, . . . , n.
h h
Then the above formula becomes
(s + 1)s 2 (s + 1)s(s − 1) 3
φ(x) = y0 + s∆y−1 + ∆ y−1 + ∆ y−2
2! 3!
(s + 2)(s + 1)s(s − 1) 4
+ ∆ y−2 + · · ·
4!
(s + n − 1) · · · (s + 1)s(s − 1) · · · (s − n + 1) 2n−1
+ ∆ y−n
(2n − 1)!
(s + n)(s + n − 1) · · · (s + 1)s(s − 1) · · · (s − n + 1) 2n
+ ∆ y−n . (3.11)
(2n)!
Here the number of middle values is two. So we take the arguments as x0 , x±1 , . . . , x±(n−1)
and x−n , where x±i = x0 ± ih, i = 0, 1, . . . , n − 1 and x−n = x0 − nh.
Proceeding as in previous case we obtained the Gauss’s backward interpolation for-
mula as
(s + 1)s 2 (s + 1)s(s − 1) 3
φ(x) = y0 + s∆y−1 + ∆ y−1 + ∆ y−2
2! 3!
(s + 2)(s + 1)s(s − 1) 4
+ ∆ y−2 + · · ·
4!
(s + n − 1) · · · (s + 1)s(s − 1) · · · (s − n + 1) 2n−1
+ ∆ y−n , (3.12)
(2n − 1)!
x − x0
where s = .
h
7
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Central Difference Interpolation Formulae
f 2n+1 (ξ)
E(x) = (x − x−n )(x − x−(n−1) ) · · · (x − x−1 )(x − x0 ) · · · (x − xn )
(2n + 1)!
= (s + n)(s + n − 1) · · · (s + 1)s(s − 1) · · · (s − n + 1)(s − n)
f 2n+1 (ξ)
× h2n+1 ,
(2n + 1)!
f 2n+1 (ξ)
= s(s2 − 12 )(s2 − 22 ) · · · (s2 − n2 ) × h2n+1 ,
(2n + 1)!
f 2n (ξ)
E(x) = (x − x−n )(x − x−(n−1) ) · · · (x − x−1 )(x − x0 ) · · · (x − xn−1 )
(2n)!
2n
f (ξ)
= (s + n)(s + n − 1) · · · (s + 1)s(s − 1) · · · (s − n + 1)h2n ,
(2n)!
2 f 2n (ξ)
= s(s2 − 12 )(s2 − 22 ) · · · (s2 − n − 1 )(s + n)h2n ,
(2n)!
In both the cases ξ lies between min{x−n , x−n , . . . , x0 , x1 , . . . , xn−1 , xn−1 } and
max{x−n , x−(n−1) , . . . , x0 , x1 , . . . , xn−1 }.
The average of Gauss’s forward and backward difference formulae for odd number
of equispaced arguments gives Stirling’s interpolation formula.
The Stirling’s formula is obtained from the equations (3.4) and (3.11) as
φ(x)forward + φ(x)backward
φ(x) =
2
s ∆y−1 + ∆y0 s2 2 s(s2 − 12 ) ∆3 y−2 + ∆3 y−1
= y0 + + ∆ y−1 +
1! 2 2! 3! 2
2 2 2
s (s − 1 ) 4 s(s − 1 )(s − 2 ) ∆ y−3 + ∆5 y−2
2 2 2 2 5
+ ∆ y−2 + + ···
4! 5! 2
2
s2 (s2 − 12 )(s2 − 22 ) · · · (s2 − n − 1 ) 2n
+ ∆ y−n . (3.13)
(2n)!
8
......................................................................................
This is another useful central difference interpolation formula obtained from Gauss’s
forward and backward interpolation formulae. It is also obtained by taking average of
Gauss’s forward and backward interpolation formulae after shifting one step of backward
formula. This formula is application for the even number of arguments.
Let us consider 2n equispaced arguments x−(n−1) , . . . , x−1 , x0 , x1 , . . . , xn−1 , xn , where
x±i = x0 ± ih, h is the spacing. Since the number of points is even, there are two points
in the middle position. For the above numbering, the number of arguments to the right
of x0 is n and to the left is n − 1.
For this representation the Gauss’s backward difference interpolation formula (3.12)
is
s(s + 1) 2 (s + 1)s(s − 1) 3
φ(x) = y0 + s∆y−1 + ∆ y−1 + ∆ y−2
2! 3!
(s + 2)(s + 1)s(s − 1) 4
+ ∆ y−2 + · · ·
4!
(s + n − 1) · · · (s + 1)s(s − 1) · · · (s − n + 1) 2n−1
+ ∆ y−n . (3.15)
(2n − 1)!
9
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Central Difference Interpolation Formulae
Now we consider x1 be the middle argument of the data. That is, the number of
points to the right of x1 is n − 1 and to the left is n. Therefore, for this assumption, we
have to shift the points one step to the right.
Then
x − x1 x − (x0 + h) x − x0
= = − 1 = s − 1.
h h h
Also, the indices of all the differences of (3.15) will be increased by 1. So we replace
s by s − 1 and increase the indices of (3.15) by 1, and the Gauss’s backward difference
interpolation formula becomes
s(s − 1) 2 s(s − 1)(s − 2) 3
φ1 (x) = y1 + (s − 1)∆y0 + ∆ y0 + ∆ y−1
2! 3!
(s + 1)s(s − 1)(s − 2) 4
+ ∆ y−1
4!
(s + 1)s(s − 1)(s − 2)(s − 3) 5
+ ∆ y−2 + · · ·
5!
(s + n − 2) · · · (s + 1)s(s − 1)(s − 2) · · · (s − n) 2n−1
+ ∆ y−n+1 . (3.16)
(2n − 1)!
The average of (3.16) and Gauss’s forward interpolation formula (3.5) gives,
φ1 (x) + φ(x)forward
φ(x) =
2
y0 + y1 1 s(s − 1) ∆2 y0 + ∆2 y−1
= + s− ∆y0 +
2 2 2! 2
(s − 21 )s(s − 1) 3 s(s − 1)(s + 1)(s − 2) ∆4 y−2 + ∆4 y−1
+ ∆ y−1 +
3! 4! 2
1
(s − 2 )s(s − 1)(s + 1)(s − 2) 5
+ ∆ y−2 + · · ·
5!
(s − 12 )s(s − 1)(s + 1) · · · (s + n − 2)(s − n − 1) 2n−1
+ ∆ y−(n−1) , (3.17)
(2n − 1)!
where x = x0 + sh.
1 x − x0 1
As in previous cases, we introduce the new variable u defined by u = s − = − .
2 h 2
By this substitution the above formula becomes
y0 + y1 u2 − 14 ∆2 y−1 + ∆2 y0 u(u2 − 14 ) 3
φ(x) = + u∆y0 + · + ∆ y−1
2 2! 2 3!
2
(u2 − 41 )(u2 − 49 ) · · · (u2 − (2n−3)
4 ) 2n−1
+ ∆ y−(n−1) . (3.18)
(2n − 1)!
10
......................................................................................
Example 3.1 Use Bessel central difference interpolation formula to find the values of
y at x = 1.55 from the following table
x : 1.0 1.5 2.0 2.5 3.0
y : 10.2400 12.3452 15.2312 17.5412 19.3499
Solution. The central difference table is given below:
i xi yi ∆yi ∆ 2 yi ∆3 yi
−2 1.0 10.2400
2.1052
−1 1.5 12.3452 0.7808
2.8860 –1.3568
0 2.0 15.2312 –0.5760
2.3100 0.0747
1 2.5 17.5412 –0.5013
1.8087
2 3.0 19.3499
Here x = 1.55. Let x0 = 2.0. Therefore, s = (1.55 − 2.0)/0.5 = −0.9.
By Bessel’s formula
y0 + y1 1 s(s − 1) ∆2 y0 + ∆2 y−1
y(1.55) = + s− ∆y0 +
2 2 2! 2
1 1 3
+ s− s(s − 1)∆ y−1
3! 2
15.2312 + 17.5412
= + (−0.9 − 0.5) × 2.3100
2
−0.9(−0.9 − 1) −0.5760 − 0.5013
+
2! 2
1
+ (−0.9 − 0.5)(−0.9)(−0.9 − 1) × 0.0747
6
= 13.5829.
11
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Central Difference Interpolation Formulae
Example 3.2 Use Stirling central difference interpolation formula to find the values
of y at x = 2.30 from the table of above example.
Note 3.3 In Newton’s forward and backward interpolation formulae the first or the
last interpolating point is taken as initial point. But, in central difference interpolation
formulae, a middle point is taken as the initial point x0 .
12