Professional Documents
Culture Documents
By
Lec # 9
1
INTERPOLATION WITH UNEQUAL INTERVALS
OR
INTERPOLATION WITH NON-EQUALLY SPACED DATA
For various numerical and experimental reasons, it is often inconvenient or
impossible to obtain data at equally spaced intervals. The interpolation theory
discussed so for is based on equally spaced intervals. we shall now study the
approximation of functions by interpolating polynomials when data is not equally
spaced.
DIVIDED DIFFERENCE
Let 𝑓 𝑥0 , 𝑓 𝑥1 , 𝑓 𝑥2 , … , 𝑓 𝑥𝑛 be the entry values of the function 𝑦 = 𝑓(𝑥) at
the arguments 𝑥0 , 𝑥1 , 𝑥2 , … , 𝑥𝑛 which are not equally spaced (i-e intervals of
differencing is not constant).
Divided difference can now be defined as the difference between two successive
values of the entry divided by the difference b/w the corresponding values of the
arguments.
Therefore, the first divided difference of 𝑓(𝑥) for the arguments 𝑥0 and 𝑥1 is
𝑓 𝑥1 −𝑓 𝑥0
defined as and is denoted by 𝑓 𝑥0 , 𝑥1 or 𝑥0 , 𝑥1 .
𝑥1 −𝑥0
2
first order divided difference for the arguments:
𝑓 𝑥1 − 𝑓 𝑥0
𝑓 𝑥0 , 𝑥1 = 𝑥0 , 𝑥1 = = 𝑥1 , 𝑥0
𝑥1 − 𝑥0
Similarly,
𝑓 𝑥2 − 𝑓 𝑥1
𝑓 𝑥1 , 𝑥2 = 𝑥1 , 𝑥2 = = 𝑥2 , 𝑥1
𝑥2 − 𝑥1
𝑓 𝑥3 − 𝑓 𝑥2
𝑓 𝑥3 , 𝑥2 = 𝑥2 , 𝑥3 = = 𝑥3 , 𝑥2
𝑥3 − 𝑥2
Second order dividend difference for the arguments 𝑥0 to 𝑥3
𝑥2 , 𝑥1 − 𝑥1 , 𝑥0
𝑓 𝑥0 , 𝑥1 , 𝑥2 = 𝑥0 , 𝑥1 , 𝑥2 = = 𝑥2 , 𝑥1 , 𝑥0
𝑥2 − 𝑥0
𝑥3 , 𝑥2 − 𝑥2 , 𝑥1
𝑓 𝑥1 , 𝑥2 , 𝑥3 = 𝑥3 , 𝑥2 , 𝑥1 = = 𝑥1 , 𝑥2 , 𝑥3
𝑥3 − 𝑥1
The third order divided difference of 𝑓(𝑥) for four arguments 𝑥0 , 𝑥1 , 𝑥2 and 𝑥3 is
defined as
𝑥3 , 𝑥2 , 𝑥1 − 𝑥2 , 𝑥1 , 𝑥0
𝑓 𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 = 𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 = = 𝑥3 , 𝑥2 , 𝑥1 , 𝑥0
𝑥3 − 𝑥0
3
Similarly, we can define higher order divided differences.
Thus, to define a first divided difference we need the functional values
corresponding to two arguments, to define a second divided difference we need two
first divided differences of two arguments, one of which is common, and so on. The
divided difference table is as follows:
𝑥0 𝑓0 = 𝑦0 𝑓 𝑥 − 𝑓 𝑥
1 0
= 𝑥1 , 𝑥0
𝑥1 − 𝑥0 𝑥2 , 𝑥1 − 𝑥1 , 𝑥0
𝑥1 𝑓1 = 𝑦1 = 𝑥2 , 𝑥1 , 𝑥0
𝑓 𝑥2 − 𝑓 𝑥1 𝑥2 − 𝑥0
= 𝑥2 , 𝑥1 𝒙𝟑 , 𝒙𝟐 , 𝒙𝟏 − 𝒙𝟐 , 𝒙𝟏 , 𝒙𝟎
𝑥2 − 𝑥1 𝒙𝟑 − 𝒙𝟎
𝑥2 𝑓2 = 𝑦2 𝑥3 , 𝑥2 − 𝑥2 , 𝑥1
= 𝑥3 , 𝑥2 , 𝑥1 = 𝒙𝟑 , 𝒙𝟐 , 𝒙𝟏 , 𝒙𝟎
𝑓 𝑥3 − 𝑓 𝑥2 𝑥3 − 𝑥1
= 𝑥3 , 𝑥2
𝑥3 − 𝑥2
𝑥3 𝑓3 = 𝑦3
4
EXAMPLE #1: Construct a divided difference table for the following
data. 𝑥 4 5 7 10 11 13
4 48 100 − 48
= 52
5−4 97 − 52
= 15 21 − 15
5 100 294 − 100 7−4
= 97 =1
7−5 202 − 97 10 − 4
= 21 0
7 294 900 − 294 10 − 5 27 − 21
= 202 =1
10 − 7 310 − 202 11 − 5
= 27 0
10 900 1210 − 900 11 − 7 33 − 27
= 310 =1
11 − 10 409 − 310 13 − 7
11 1210 = 33
2028 − 1210 13 − 10
= 409
13 − 11
13 2028
5
Relation b/w Divided Differences and Forward Differences
Let the arguments 𝑥0 , 𝑥1 , 𝑥2 , … , 𝑥𝑛 be equally spaced
i-e 𝑥𝑖+1 = 𝑥𝑖 + ℎ (say) for 𝑖 = 0, 1, 2, ⋯ , 𝑛 − 1
𝑓 𝑥1 − 𝑓 𝑥0 𝑓 𝑥0 + ℎ − 𝑓 𝑥0
𝑥1 , 𝑥0 = 𝑓 𝑥1 , 𝑥0 = =
𝑥1 − 𝑥0 𝑥1 − 𝑥0
𝑥0
𝑥1 = 𝑥0 + ℎ
Δ𝑓 𝑥0
𝑓 𝑥1 , 𝑥0 = 𝑥2 = 𝑥1 + ℎ
ℎ 𝑥2 = 𝑥0 + 2ℎ
𝑥3 = 𝑥2 + ℎ
𝑥2 , 𝑥1 − 𝑥1 , 𝑥0
𝑥2 , 𝑥1 , 𝑥0 = = 𝑓(𝑥2 , 𝑥1 , 𝑥0 ) Eq. (1)
𝑥2 − 𝑥0
Now
𝑓 𝑥2 − 𝑓 𝑥1 𝑓 𝑥1 + ℎ − 𝑓 𝑥1 Δ𝑓 𝑥1
⇒ 𝑥2 , 𝑥1 = = =
𝑥2 − 𝑥1 ℎ ℎ
Δ 𝑓 𝑥1 − 𝑓 𝑥0 Δ 𝑓 𝑥0 + ℎ − 𝑓 𝑥0 Δ Δ𝑓 𝑥0 Δ2 𝑓 𝑥0
= = = =
2ℎ2 2ℎ2 2ℎ2 2ℎ2
Similarly
𝑥3 , 𝑥2 , 𝑥1 − 𝑥2 , 𝑥1 , 𝑥0
𝑥3 , 𝑥2 , 𝑥1 , 𝑥0 = 𝑓 𝑥3 , 𝑥2 , 𝑥1 , 𝑥0 = Eq. (2)
𝑥3 − 𝑥0
𝑥3 , 𝑥2 − 𝑥2 , 𝑥1
Now 𝑥3 , 𝑥2 , 𝑥1 =
𝑥3 − 𝑥1
and
𝑓 𝑥3 − 𝑓 𝑥2 𝑓 𝑥2 + ℎ − 𝑓 𝑥2 Δ𝑓 𝑥2
𝑥3 , 𝑥2 = = =
𝑥3 − 𝑥2 ℎ ℎ
𝑓 𝑥2 − 𝑓 𝑥1 𝑓 𝑥1 + ℎ − 𝑓 𝑥1 Δ𝑓 𝑥1
𝑥2 , 𝑥1 = = =
𝑥2 − 𝑥1 ℎ ℎ
7
Δ𝑓 𝑥2 Δ𝑓 𝑥1
− Δ 𝑓 𝑥2 − 𝑓 𝑥1 Δ 𝑓 𝑥1 + ℎ − 𝑓 𝑥1
𝑥3 , 𝑥2 , 𝑥1 = ℎ ℎ = =
2ℎ 2ℎ2 2ℎ2
Δ Δ𝑓 𝑥1 Δ2 𝑓 𝑥1 𝑥3 = 𝑥2 + ℎ
𝑥3 , 𝑥2 , 𝑥1 = =
2ℎ2 2ℎ2 𝑥3 = 𝑥1 +ℎ + ℎ
𝑥3 − 𝑥1 = 2ℎ
Now substituting values in Eq.(2)
Δ2 𝑓 𝑥1 Δ2 𝑓 𝑥0
2 − 2 Δ2 𝑓 𝑥 −𝑓 𝑥
= 2ℎ 2ℎ 1 0
𝑥3 , 𝑥2 , 𝑥1 , 𝑥0 = 𝑓 𝑥3 , 𝑥2 , 𝑥1 , 𝑥0 =
3ℎ 6ℎ3
Δ2 𝑓 𝑥0 + ℎ − 𝑓 𝑥0 Δ2 Δ𝑓 𝑥0
𝑥3 , 𝑥2 , 𝑥1 , 𝑥0 = 𝑓 𝑥3 , 𝑥2 , 𝑥1 , 𝑥0 = =
6ℎ3 6ℎ3
Δ3 𝑓 𝑥0
𝑓 𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 =
3! ℎ3
.....
1 𝑛 𝑓(𝑥 )
𝑓(𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 , … , 𝑥𝑛 ) = 𝛥 0
𝑛! ℎ𝑛
8
NEWTON'S DIVIDED DIFFERENCE FORMULA
Let 𝑓 𝑥0 , 𝑓 𝑥1 , 𝑓 𝑥2 … , 𝑓 𝑥𝑛 be the values of 𝑓(𝑥) corresponding to the non-
equally spaced arguments 𝑥0 , 𝑥1 , 𝑥2 , … , 𝑥𝑛 .
So,
𝑓(𝑥) = 𝑓 𝑥0 + 𝑥 − 𝑥0 𝑓 𝑥0 , 𝑥1 + 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑓 𝑥0 , 𝑥1 , 𝑥2
+ 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑥 − 𝑥2 𝑓 𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 + ⋯
+ 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑥 − 𝑥2 … 𝑥 − 𝑥𝑛−1 𝑓 𝑥0 , 𝑥1 , 𝑥2 , … , 𝑥𝑛
Or
𝑓(𝑥) = 𝑓 𝑥0 + 𝑥 − 𝑥0 𝑥1 , 𝑥0 + 𝑥 − 𝑥0 𝑥 − 𝑥1 [𝑥2 , 𝑥1 , 𝑥0 ]
+ 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑥 − 𝑥2 [𝑥3 , 𝑥2 , 𝑥1 , 𝑥0 ] + ⋯ Eq. (A)
+ 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑥 − 𝑥2 … 𝑥 − 𝑥𝑛−1 𝑓 𝑥0 , 𝑥1 , 𝑥2 , … , 𝑥𝑛
The Formula (𝐴) is the Newton's interpolation formula for unequal intervals, which
in general is also called Newton's divided difference interpolation formula for
unequal intervals.
𝑓 𝑥1 𝑓 𝑥0 𝑓 𝑥1 𝑓 𝑥0
= − =− +
𝑥1 − 𝑥0 𝑥1 − 𝑥0 𝑥0 − 𝑥1 𝑥0 − 𝑥1
𝑓 𝑥0 − 𝑓 𝑥1
𝑓 𝑥0 , 𝑥1 = = 𝑓 𝑥1 , 𝑥0
𝑥0 − 𝑥1
𝑓1 − 𝑓0 𝑓 𝑥1 − 𝑓 𝑥0
𝑥1 , 𝑥0 = 𝑓 𝑥1 , 𝑥0 = =
𝑥1 − 𝑥0 𝑥1 − 𝑥0
𝑥2 , 𝑥1 − 𝑥1 , 𝑥0
𝑥2 , 𝑥1 , 𝑥0 =
𝑥2 − 𝑥0
11
𝑓 𝑥2 − 𝑓 𝑥1 2.8189 − 2.8182
𝑥2 , 𝑥1 = = = 7 × 10−4
𝑥2 − 𝑥1 659 − 658
𝑥3 , 𝑥2 , 𝑥1 − 𝑥2 , 𝑥1 , 𝑥0
𝑥3 , 𝑥1 , 𝑥1 , 𝑥0 =
𝑥3 − 𝑥0
Now
𝑥3 , 𝑥2 − 𝑥2 , 𝑥1
𝑥3 , 𝑥2 , 𝑥1 =
𝑥3 − 𝑥1
And
𝑓 𝑥3 − 𝑓 𝑥2 2.8202 − 2.8189 1.3 × 10−3
𝑥3 , 𝑥2 = = = = 6.5 × 10−4
𝑥3 − 𝑥2 661 − 659 2
𝑓 𝑥2 − 𝑓 𝑥1 12 − 3
𝑥2 , 𝑥1 = = =9
𝑥2 − 𝑥1 2−1
𝑓 𝑥3 − 𝑓 𝑥2 147 − 12 135
𝑥3 , 𝑥2 = = = = 45
𝑥3 − 𝑥2 5−2 3
𝑥2 , 𝑥1 − 𝑥1 , 𝑥0 9−1 8
𝑓 𝑥2 , 𝑥1 , 𝑥0 = = = =4
𝑥2 − 𝑥0 2−0 2
𝑥3 , 𝑥2 − 𝑥2 , 𝑥1 45 − 9 36
𝑓 𝑥3 , 𝑥2 , 𝑥1 = 𝑥3 , 𝑥2 , 𝑥1 = = = =9
𝑥3 − 𝑥1 5−1 4
𝑥3 , 𝑥2 , 𝑥1 − 𝑥2 , 𝑥1 , 𝑥0 9−4 5
𝑓 𝑥3 , 𝑥2 , 𝑥1 , 𝑥0 = = = =1
𝑥3 − 𝑥0 5−0 5
15
𝑓(𝑥) = 𝑓 𝑥0 + 𝑥 − 𝑥0 𝑓 𝑥1 , 𝑥0 + 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑓 𝑥2 , 𝑥1 , 𝑥0
+ 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑥 − 𝑥2 𝑓 𝑥3 , 𝑥2 , 𝑥1 , 𝑥0
= 2 + 𝑥 + 4𝑥 𝑥 − 1 + 𝑥 𝑥 − 1 𝑥 − 2
= 2 + 𝑥 + 4𝑥 2 − 4𝑥 + 𝑥 𝑥 2 − 3𝑥 + 2
= 2 + 𝑥 + 4𝑥 2 − 4𝑥 + 𝑥 3 − 3𝑥 2 + 2𝑥
𝑓 𝑥 = 𝑥3 + 𝑥2 − 𝑥 + 2 ⟶ Required answer
EXAMPLE # 5: Find the polynomial which assumes the Values
1245, 33, 5, 9 and 1335 at 𝑥 = −4, −1, 0, 2 and 5 .
Ans ⟶ 3𝑥 4 − 5𝑥 3 + 6𝑥 2 − 14𝑥 + 5
16
EXERCISE
17
18
19
20