Interpolation
Interpolation
Sol:Let, 𝑥1 = 3, 𝑦1 = 5, 𝑥2 = 5, 𝑦2 = 6 & 𝑥 = 4
We know,
𝑦2 − 𝑦1
𝑦 = 𝑦1 + 𝑥 − 𝑥1 ×
𝑥2 − 𝑥1
6−5
or, 𝑦 = 5 + 4 − 3 ×
5−3
or, y = 5.5
∴ 𝑇ℎ𝑒 ℎ𝑒𝑖𝑔ℎ𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑏𝑜𝑦 𝑖𝑛 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 4 𝑖𝑠 5.5 𝑓𝑡.
Math 3
Q: Calculate the temperature at time 1 minute and 5 minute
through linear interpolation from the given chart.
Time ( min) 0 2 3 4 6 7
Temperature(℃) 24.1 24.9 25.7 26.3 28 28.6
• These two methods are used in case of equal interval sets of data.
• Newton’s Forward Interpolation is used in the beginning of data
table.
• Newton’s Backward Interpolation is used at the tail of data table.
Newton’s Forward Interpolation
• Let x0, x1, x2,x3,……..,xn-1,xn be a set of equidistant values of variable x.
𝑥 − 𝑥0 4 − 3
∴𝑢= = = 0.5
ℎ 2
Newton’s forward Interpolation formula is:
𝑢 𝑢(𝑢−1) 2 𝑢(𝑢−1)(𝑢−2) 3 𝑢(𝑢−1)(𝑢−2)⋯(𝑢−𝑛+1) 𝑛
y = 𝑦0 + Δ𝑦0 + Δ 𝑦0 + Δ 𝑦0 + ⋯+ Δ 𝑦0
1! 2! 3! 𝑛!
Difference Table:
x y=f(x) ∆y ∆𝟐 y ∆𝟑 y
3 180
150-180
= -30
5 150
-30-(-30)
=0
0-0
120-150
=0
7 120 = -30
-30-(-30)
=0
90-120
=-30
9 90
Difference Table:
x y=f(x) ∆y ∆𝟐 y ∆𝟑 y
𝑦0 = 180
3 180 Δ𝑦0 = -30
150-180 Δ2 𝑦0 = 0
= -30
5 150 Δ3 𝑦0 = 0
-30-(-30)
=0
0-0
120-150
=0
7 120 = -30
-30-(-30)
=0
90-120
=-30
9 90
𝑢 𝑢(𝑢−1) 2 𝑢(𝑢−1)(𝑢−2) 3 𝑢(𝑢−1)(𝑢−2)⋯(𝑢−𝑛+1) 𝑛
y = 𝑦0 + Δ𝑦0 + Δ 𝑦0 + Δ 𝑦0 + ⋯ + Δ 𝑦0
1! 2! 3! 𝑛!
0.5 0.5×(0.5−1) 0.5× 0.5−1 × 0.5−2
y= 180 + × −30 + × 0 + × 0
1! 2! 3!
y = 180 – 15 = 165
Problem 2
From the table interpolate the value of f(x) when x=2.5, given
x 2 3 4 5 6
Ans :
Problem 3
• Estimate the population in 1893 from the following data:
Year 1891 1901 1911 1921
Population 46 66 81 93
𝑥 − 𝑥0 1893 − 1891
∴𝑢= = = 0.2
ℎ 10
Difference Table:
x y=f(x) ∆y ∆𝟐 y ∆𝟑 y Newton’s forward Interpolation formula is:
𝑢 𝑢(𝑢−1) 2 𝑢(𝑢−1)(𝑢−2) 3
y = 𝑦0 + Δ𝑦0 + Δ 𝑦0 + Δ 𝑦0 + ⋯+
1! 2! 3!
1891 46
𝑢(𝑢−1)(𝑢−2)⋯(𝑢−𝑛+1) 𝑛
Δ 𝑦0
𝑛!
20
Or,
1901 66 -5
0.2 0.2×(0.2−1)
15 2 y = 46 + × 20 + × −5
1! 2!
𝑦0 = 46
Δ𝑦0 = 20
Δ2 𝑦0 = -5
Δ3 𝑦0 = 2
Problem 4
𝑥 − 𝑥0 0.25 − 0.0
ℎ = 0.1 & 𝑢 = = = 2.5
ℎ 0.1
𝒙 𝒚 ∆𝒚 ∆𝟐 𝒚 ∆𝟑 𝒚 ∆𝟒 𝒚
0.0 0.0000
0.0998
-0.0009 𝑦0 = 0
0.1 0.0998 -0.0012 Δ𝑦0 = 0.0998
0.0989 Δ2 𝑦0 = -0.0009
0.2 0.1987 -0.0021 0.0004 Δ3 𝑦0 = -0.0012
-0.0008 Δ4 𝑦0 = 0.0004
0.0968
0.3 0.2955 -0.0029
0.0939
0.4 0.3894
Some problems
1. Estimate 𝑓 2.5 for given data point:
x 1 2 3 4 5
f(x) 3 15 49 111 217
Age 24 28 32 36 40
𝑢 𝑢×(𝑢+1) 𝑢×(𝑢+1)×(𝑢+2)
𝑦= 𝑦𝑛 + × ∇𝑦𝑛−1 + × ∇2 𝑦𝑛−2 + × ∇3 𝑦𝑛−3 + ⋯
1! 2! 3!
Example
Q: Find the value of 𝑓(1.35) using Newton’s backward interpolation
from the following data points:
𝑥 1 1.1 1.2 1.3 1.4
𝑓(𝑥) 2.7183 3.0042 3.3201 3.6693 4.0552
Soln:
𝑥−𝑥𝑛 1.35−1.4
𝑢= = = −0.5 ; where ℎ = 𝑥𝑛 − 𝑥𝑛−1 = 1.4 − 1.3 = 0.1
ℎ 0.1
1 2.7183
0.2859
0.03
1.1 3.0042 0.0033
0.3159 0.0001
1.2 3.3201 0.0333
0.0034
0.3492
1.3 3.6693 0.0367
0.3859
1.4 4.0552
Newton’s backward interpolation formula:
𝑢 𝑢×(𝑢+1) 𝑢×(𝑢+1)×(𝑢+2)
𝑦 = 𝑦𝑛 + × ∇ 𝑦𝑛−1 + × ∇2 𝑦𝑛−2 + × ∇3 𝑦𝑛−3 +⋯
1! 2! 3!
𝑢 𝑢×(𝑢+1) 𝑢×(𝑢+1)×(𝑢+2)
𝑦= 𝑦4 + × ∇𝑦3 + × ∇2 𝑦2 + × ∇3 𝑦1
1! 2! 3!
𝑢 × (𝑢 + 1) × (𝑢 + 2) × (𝑢 + 3)
+ × ∇4 𝑦0
4!
𝑦 = 3.857446094
1) Estimate f(1.25) using Newton's Backward Interpolation from
data points:
x 1.0 1.1 1.2 1.3
f(x) 2.7183 3.0042 3.3201 3.6693