Professional Documents
Culture Documents
BMA3207 Numerical Analysis Lecture 6
BMA3207 Numerical Analysis Lecture 6
Gikonyo Kiguta
p(p − 1)(p − 2) . . . (p − n + 1) n
+ ∆ y0
n!
where
(x − xo )
p=
h
which is Newton’s forward difference interpolation formula and is useful for interpolation near the
beginning of a set of tabular values.
6 Chapter 1. Interpolation for Equal Intervals
The table below shows the difference table used on Gregory–Newton Forward Difference Formula
For interpolations near the end of the table values, we use the Gregory–Newton Backward Difference
Formula. It is given by:
p(p + 1) 2 p(p + 1) . . . (p + n − 1) n
yn (x) = yn + p∇yn + ∇ yn + · · · + ∇ yn
2! n!
where
(x − xn )
p=
h
The following table contains the tabular points for Newton backward difference formula
1.1 Gregory-Newton Interpolations 7
x f (x) ∇ ∇2 ∇3
.. ..
. .
..
xn−3 yn−3 .
..
∇ yn−2 .
..
xn−2 yn−2 ∇2 yn−1 .
∇ yn−1 ∇3 yn
xn−1 yn−1 ∇2 yn
∇ yn
xn yn
Q.1. Find a cubic polynomial in x which takes on the values -3,3,11,27,57 and 107 when
x = 0, 1, 2, 3, 4 and 5 respectively.
Ans
Here, the observations are given at equal intervals of unit Width. To determine the required we first
construct the difference table
Difierence table
since the 4th and higher order difierences are zero, the required Newton’s interpolation formula
p(p−1) 2
f (x0 + ph) = f (x0 ) + p∆ f (x0 ) + 2 ∆ f (x0 ) + p(p−1)(p−2)
6 ∆3 f (x0 )
Here
p = x−x x−0
h = 1 =x
0
∆ f (x0 ) = 6
∆2 f (x0 ) = 2
∆3 f (x0 ) = 6
8 Chapter 1. Interpolation for Equal Intervals
f (x) = −3 + 6x + x(x−1)
2 (2) +
x(x−1)(x−2)
6 (6)
f (x) = x3 − 2x2 + 7x − 3
Q.2.
For the following table of Velues, estimate f (7.5)
x 1 2 3 4 5 6 7 8
y = f (x) 1 8 27 64 125 216 343 512
Ans
The value to be interpolated is at the end of the table. Hence, it is appropriate to use Newton’s
backward interpolation formula. Let us first construct the backward difference table for the given
data
x−xn 7.5−8.0
In this problem, p = h = 1 = −0.5
=421.875
1.1 Gregory-Newton Interpolations 9
Q.3.
The sales for the last five years is given in the table below. Estimate the sales for the year 1979
Year 1974 1976 1978 1980 1982
Sales (in lakhs) 40 43 48 52 57
Ans
Newtons backward difference table is given by:
x y ∇y ∇2 y ∇3 y ∇4 y
1974 40
3
1976 43 2
5 -3
1978 48 -1 5
4 2
1980 52 1
5
1982 57
In this example,
1979 − 1982
p= = −1.5
2
and
∇yn = 5, ∇2 yn = 1
∇3 yn = 2, ∇4 yn = 5
y1979 = 50.1172
Q.2.
Values of x (in degrees) and sin x are given in the foll table:
x sin x ∆ ∆2 ∆3 ∆4 ∆5
15 0.2588190
0.0832011
20 0.3420201 -0.0026029
0.0805982 -0.0006136
25 0.4226183 -0.0032165 0.0000248
0.0773817 -0.0005888 0.0000041
30 0.5 -0.0038053 0.0000289
0.0735764 -0.0005599
35 0.5735764 -0.0043652
0.0692112
40 0.6427876
To find sin 38◦ , we use Newton’s backward difference formula with xn = 40 and x = 38. This
gives
x − xn 38 − 40 2
p= = = − = −0.4
h 5 5
1.1 Gregory-Newton Interpolations 11
Hence, we obtain
−0.4(−0.4 + 1)
y(38) =0.6427876 − 0.4(0.0692112) + (−0.0043652)
2
(−0.4)(−0.4 + 1)(−0.4 + 2)
+ (−0.0005599)
6
(−0.4)(−0.4 + 1)(−0.4 + 2)(−0.4 + 3)
+ (0.0000289)
24
(−0.4)(−0.4 + 1)(−0.4 + 2)(−0.4 + 3)(−0.4 + 4)
+ (0.0000041)
120
=0.6427876 − 0.02768448 + 0.00052382 + 0.00003583 − 0.00000120
=0.6156614