KIRINYAGA UNIVERSITY
DEPARTMENT OF PURE AND APPLIED SCIENCES
COURSE CODE : SPM2321
COURSE TITLE: NUMERICL ANALYSIS I
LECTURER: ANTHONY KINYANJUI
MODULE 06: NEWTON’S FORWARD AND BACKWARD DIFFERENCE
INTERPOLATION POLYNOMIALA
OBJECTIVE:
AT THE END OF LECTURE, A STUDENT WILL BE ABLE TO
CALCULATE THE POLYNOMIAL EQUATIONS USING FORWARD
AND BACKWARD DIFFERENCE INTERPOLATIONS
1
NEWTON FORWARD DIFFERENCE INTERPOLATION POLYNOMIAL
(NFDIP)
Let the values 𝑥0 , 𝑥1 , 𝑥2 , … 𝑥𝑛 be equidistanced 𝑥𝑖 = 𝑥0 + 𝑖ℎ , 𝑖 = 0,1,2, … 𝑛
The NFDI formula (Also known as Newton-Gregory) is stated as
𝑃 (𝑃 − 1) 2 𝑃(𝑃 − 1)(𝑃 − 2) 3
𝑦𝑝 = 𝑦0 + 𝑃∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0
2! 3!
𝑃(𝑃 − 1)(𝑃 − 2)(𝑃 − 3) 4
+ ∆ 𝑦0 + ⋯
4!
𝑃(𝑃 − 1) … [𝑃 − (𝑛 − 1)] 𝑛
+ ∆ 𝑦0
𝑛!
𝑥−𝑥0
Where 𝑦𝑝 = 𝑦(𝑥0 +Ph) and 𝑃 =
ℎ
Where x is the value being interpolated for and h is the step size along x.𝑥0 is any
value above the value being interpolated for on the difference table. The further
away the 𝑥0 is from the value being interpolated the more accurate the result is.
The following data indicates the speeds of a ship. It gives I,V and knots the speed.
Find I when V=9
𝑉 8 10 12 14 16
𝐼 1000 1900 3250 5400 8950
2
Solution
𝑉 𝐼 ∆𝑓𝑖 ∆2𝑓𝑖 ∆3𝑓𝑖 ∆4𝑓𝑖
8 1000
900
10 1900 450
1350 350
12 3250 800 250
2150 600
14 5400 1400
3550
16 8950
𝑥 − 𝑥0 9 − 8
𝑃= = = 0.5
ℎ 2
𝑃 (𝑃 − 1) 2 𝑃(𝑃 − 1)(𝑃 − 2) 3
𝑦𝑝 = 𝑦0 + 𝑃∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0
2! 3!
𝑃(𝑃 − 1)(𝑃 − 2)(𝑃 − 3) 4
+ ∆ 𝑦0
4!
1 1 1 1 1 1
I(9) = 1000 + (900) + ( − 1) (450) + ( − 1) ( − 2) (350)
2 4 2 12 2 2
1 1 1 1
+ ( − 1) ( − 2) ( − 3) (250)
48 2 2 2
3
= 1406
We use NFDI to interpolate for the values nearer to the beginning of the table
values.
We use NBDI to interpolate for values towards the end of the table of values
𝑃 (𝑃 + 1) 2 𝑃(𝑃 + 1)(𝑃 + 2) 3
𝑦𝑝 = 𝑦0 + 𝑃∇𝑦0 + ∇ 𝑦0 + ∇ 𝑦0
2! 3!
𝑃(𝑃 + 1)(𝑃 + 2)(𝑃 + 3) 4
+ ∇∇ 𝑦0 + ⋯
4!
𝑃(𝑃 + 1) … [𝑃 + (𝑛 + 1)] 𝑛
+ ∇ 𝑦0
𝑛!
𝑥𝑛 is the value below the value being interpolated for on the difference table.
Using the same table above find I when V=15
Solution
𝑉 𝐼 ∇𝑓𝑖 ∇2𝑓𝑖 ∇3𝑓𝑖 ∇4𝑓𝑖
8 1000
900
10 1900 450
1350 350
12 3250 800 250
2150 600
14 5400 1400
3550
16 8950
4
𝑥 − 𝑥0 15 − 16
𝑃= = = −0.5
ℎ 2
1 1 1
I(15) = 8950 − (3550) − (− + 1) (1400)
2 4 2
1 1 1
− (− + 1) (− + 2) (600)
12 2 2
1 1 1 1
− (− + 1) (− + 2) (− + 3) (250)
48 2 2 2
= 6953
Find the Newton Forward Difference Interpolating Polynomial for the data below
taking
𝑥0 = 0.1
𝑥 0.1 0.2 0.3 0.4 0.5
𝑦 = 𝑓(𝑥) 1.40 1.56 1.76 2.00 2.25
Solution
𝑉 𝐼 ∆𝑓𝑖 ∆2𝑓𝑖 ∆3𝑓𝑖 ∆4𝑓𝑖
0.1 1.40
0.16
0.2 1.56 0.04
0.20 0
0.3 1.76 0.04 −0.03
5
0.4 2.00 0.24 0.01 −0.03
0.5 2.25 0.25
𝑥 − 𝑥0 𝑥 − 1
𝑃= = = 10𝑥 − 1
ℎ 0.1
𝑃 (𝑃 − 1) 2 𝑃(𝑃 − 1)(𝑃 − 2) 3
𝑦𝑝 = 𝑦0 + 𝑃∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0
2! 3!
𝑃(𝑃 − 1)(𝑃 − 2)(𝑃 − 3) 4
+ ∆ 𝑦0 + ⋯
4!
𝑃(𝑃 − 1) … [𝑃 − (𝑛 − 1)] 𝑛
+ ∆ 𝑦0
𝑛!
1
y = 1.40 + (10x − 1)(0.16) + (10x − 1)(10x − 2)0.04
2
1
+ (10x − 1)(10x − 2)(10x − 3)0
6
1
+ (10x − 1)(10x − 2)(10x − 3)(10 − 4)(−0.03)
24
= 12.5𝑥 4 + 12.5𝑥 3 − 2.375𝑥 2 + 1.625𝑥 + 1.25
The data below shows pressure of stream at given temperature
𝑇𝑒𝑚0𝑐 140 150 160 170 180
𝑃𝑟𝑒𝑠𝑠𝑢𝑟𝑒 𝑘𝑔𝑓 3.685 4.854 6.302. 8.067 10.225
/𝑐𝑚2
6
Using Newton Backward Difference Interpolating polynomial, find the pressure of
the stream at 1750 𝑐
Solution
𝑇𝑒𝑚𝑝 𝑃𝑟𝑒𝑠𝑠𝑢𝑟𝑒 ∇𝑓𝑖 ∇2𝑓𝑖 ∇3𝑓𝑖 ∇4𝑓𝑖
140 3.685
1.169
150 4.854 0.279
1.448 0.047
160 6.302 0.3260 0.002
1.774 0.049
170 8.076 0.375
2.149
180 10.225
𝑥 − 𝑥0 180 − 170
𝑃= = = −0.5
ℎ 10
𝑃(𝑃 + 1) 2 𝑃(𝑃 + 1)(𝑃 + 2) 3
𝑦(175) = 10. +𝑃∇𝑦0 + ∇ 𝑦0 + ∇ 𝑦0
2! 3!
𝑃(𝑃 + 1)(𝑃 + 2)(𝑃 + 3) 4
+ ∇ 𝑦0 + ⋯
4!
𝑃 (𝑃 + 1) … [𝑃 + (𝑛 + 1)] 𝑛
+ ∇ 𝑦0
𝑛!
7
1 1 1
y(175) = 10.225 − (2.149) − (− + 1) (0.375)
2 4 2
1 1 1
− (− + 1) (− + 2) (0.049)
12 2 2
1 1 1 1
− (− + 1) (− + 2) (− + 3) (0.002)
48 2 2 2
= 9.1005
Tutorial problems
1. The population of a certain town obtained from a census was shown in the
table below
𝑦𝑒𝑎𝑟(𝑥) 1951 1961 1971 1981 1991
𝑝𝑜𝑝 𝑖𝑛 𝑡ℎ𝑜𝑢𝑠𝑎𝑛𝑑 (𝑦) 19.96 36.65 58.81 77.21 94.61
Find the population in the 1955.
2. The population of a certain town obtained from a census was shown in the
table below
𝑦𝑒𝑎𝑟(𝑥) 1951 1961 1971 1981 1991
𝑝𝑜𝑝 𝑖𝑛 𝑡ℎ𝑜𝑢𝑠𝑎𝑛𝑑 (𝑦) 19.96 36.65 58.81 77.21 94.61
Find the rate of growth of the population in the 1961.
3. The amount A of a substance remaining in a reacting system after an interval
of time t in a certain chemical experiment is tabulated below
𝑡(min) 2 5 8 11 1991
𝐴(𝑔𝑚) 94.8 87.9 81.3 77.21 75.1
8
Obtain the value of A when
(i) 𝑡=4
(ii) t=9