Professional Documents
Culture Documents
Chapter One Interpolation and Polynomial Approximation
Chapter One Interpolation and Polynomial Approximation
Chapter One Interpolation and Polynomial Approximation
Chapter One
Interpolation and Polynomial Approximation
It means insertion or filling up intermediate terms of the series.
Suppose we are given the following values of y = f(x) for a set of values
of x:
𝑥: 𝑥0 𝑥1 𝑥2 … . 𝑥𝑛
𝑦: 𝑦0 𝑦1 𝑦2 … . 𝑦𝑛
Thus the process of finding the value of y corresponding to any value of
𝑥 = 𝑥𝑖 between 𝑥0 and 𝑥𝑛 is called interpolation. Hence interpolation is
the technique of estimating the value of a function for any intermediate
value of the independent variable, while the process of computing the
value of the function outside the given range is called extrapolation.
polynomial
Let f(x) be a continuous function defined on some interval [a, b], and be
prescribed at n + 1 distinct tabular points 𝑥0 , 𝑥1 , … , 𝑥𝑛 such that 𝑎 = 𝑥0 <
𝑥1 < 𝑥2 < ⋯ < 𝑥𝑛 = 𝑏. The distinct tabular points𝑥0 , 𝑥1 , … , 𝑥𝑛 may be
non-equispaced or equispaced, that is 𝑥𝑘+1 − 𝑥𝑘 = ℎ, 𝑘 = 0,1, … , 𝑛 − 1.
The problem of polynomial approximation is to find a polynomial 𝑃𝑛 (𝑥),
of degree ≤ n, which fits the given data exactly, that is,
𝑃𝑛 (𝑥𝑖 ) = 𝑓(𝑥𝑖 ), 𝑖 = 0,1,2, … 𝑛, where 𝑃𝑛 (𝑥) = 𝑎0 + 𝑎1 𝑥 + 𝑎0 𝑥 2 + ⋯ +
𝑎𝑛 𝑥 𝑛 , 𝑛 ≠ 0 then,
If n=1 the interpolation is called linear interpolation.
If n=2 the interpolation is called Quadratic interpolation.
If n=3 the interpolation is called cubic interpolation.
Note: the degree of the polynomial must be less one then the number of
points.
1
Numerical Analysis II Assistant lecture
Physics Dept. Shrooq M. Azzo
Third stage 2021-2022
Example: from the table find 𝑓(0), 𝑓(6) using square interpolation at the
point (−1,2,3), (2,3,4)
𝑋 -1 2 3 4
𝑌 = 𝐹(𝑥) 3 1 2 4
2
Numerical Analysis II Assistant lecture
Physics Dept. Shrooq M. Azzo
Third stage 2021-2022
Example: from the table find f(2),f(5) and f(7) using Lagrange formula
𝑋 0 1 3
𝐹(𝑥) -1 2 7
3
Numerical Analysis II Assistant lecture
Physics Dept. Shrooq M. Azzo
Third stage 2021-2022
Finite difference
Suppose that the function 𝑦 = 𝑓(𝑥) is tabulated for the equally spaced
values 𝑥 = 𝑥0 , 𝑥0 + ℎ, 𝑥0 + 2ℎ, … , 𝑥0 + 𝑛ℎ,giving
𝑦 = 𝑦0 , 𝑦1 , 𝑦2 , … , 𝑦𝑛 . To determine the values of f(x) or f ′(x) for some
intermediate values of x, the following three types of differences are useful:
1. Forward differences: The differences 𝑦1 − 𝑦0 , 𝑦2 − 𝑦1 , 𝑦3 −
𝑦2 , … , 𝑦𝑛 − 𝑦𝑛−1 , when denoted by ∆𝑦0 , ∆𝑦1 , ∆𝑦2 , … , ∆𝑦𝑛−1
respectively, are called the first forward differences where ∆ is the
forward difference operator.
Thus the first forward differences are
∆𝑦𝑖 = 𝑦𝑖+1 − 𝑦𝑖
Similarly, the second forward differences are defined by
∆2 𝑦𝑖 = ∆𝑦𝑖+1 − ∆𝑦𝑖
= (𝑦𝑖+2 − 𝑦𝑖+1 ) − (𝑦𝑖+1 − 𝑦𝑖 )
= 𝑦𝑖+2 − 2𝑦𝑖+1 + 𝑦𝑖
Similarly,
∆3 𝑦𝑖 = 𝑦𝑖+3 − 3𝑦𝑖+2 + 3𝑦𝑖+1 − 𝑦𝑖
In general,∆𝑘 𝑦𝑖 = ∆𝑘−1 𝑦𝑖+1 − ∆𝑘−1 𝑦𝑖 defines the 𝐾 𝑡ℎ forward
differences.
4
Numerical Analysis II Assistant lecture
Physics Dept. Shrooq M. Azzo
Third stage 2021-2022
5
Numerical Analysis II Assistant lecture
Physics Dept. Shrooq M. Azzo
Third stage 2021-2022
6
Numerical Analysis II Assistant lecture
Physics Dept. Shrooq M. Azzo
Third stage 2021-2022
𝛿 𝑦7⁄2 δ3 𝑦7⁄2
𝑥4 𝑦4 δ2 𝑦4
𝛿 𝑦9⁄2
𝑥5 𝑦5
7
Numerical Analysis II Assistant lecture
Physics Dept. Shrooq M. Azzo
Third stage 2021-2022
3. 𝐸𝛻 = ∇𝐸 = 𝐸 − 1 = ∆
4. 𝐸 −1 = 1 − ∇
5. ∆2 = 𝐸 2 − 2𝐸 + 1 = (𝐸 − 1)2
6. 𝐸 = 𝑒ℎ𝐷 ,D is differential operation
1 1
−
7. 𝛿 = 𝐸 − 𝐸 2 2
𝑈
8. 𝛿 = 2𝑠𝑖𝑛ℎ , U=hD
2
1 𝛿2
9. 𝐸 = 1 + 𝛿 2 ± 𝛿 √1 + = 𝑒𝑢
2 4
1 𝛿2
10. ∆= 𝛿 2 ± 𝛿 √1 +
2 4
= 𝑒𝑢 − 1
1 𝛿2
11.∇= − 𝛿2 ± 𝛿√1 + = 1 − 𝑒𝑢
2 4
1 1
12.𝛿 = ∆(1 + ∆)−2 = ∇(1 − ∇)−2
1
−
13.∇= 𝛿 𝐸 2
8
Numerical Analysis II Assistant lecture
Physics Dept. Shrooq M. Azzo
Third stage 2021-2022
Difference of a polynomial
If 𝑥0 , 𝑥1 , 𝑥2 , … , 𝑥𝑛 are given set of observations with common
difference h and let 𝑦0 , 𝑦1 , 𝑦2 , … , 𝑦𝑛 are their corresponding values,
where𝑦 = 𝑓(𝑥) be the given function, Suppose that we want to
interpolate 𝑓(𝑥) near the point 𝑥0 , Set 𝑥 = 𝑥𝑚 = 𝑥0 + 𝑚ℎ , 𝑓(𝑥𝑚 ) = 𝑓𝑚 .
Then
𝑓𝑚 = 𝑓(𝑥𝑚 ) = 𝑓(𝑥0 + 𝑚ℎ)
= 𝐸 𝑚 𝑓(𝑥0 ) = 𝐸 𝑚 𝑓0
∵ 𝐸 = 1 + ∆⇒ 𝐸 𝑚 = (1 + ∆)𝑚
∴ 𝑓𝑚 = 𝑓(𝑥𝑚 ) = (1 + ∆)𝑚 𝑓0
𝑚 𝑚 𝑚
𝑓𝑚 = [1 + ( ) ∆ + ( ) ∆2 + ⋯ + ( ) ∆𝑛 ] 𝑓0
1 2 𝑛
𝑚(𝑚−1) 𝑚(𝑚−1)(𝑚−2)…(𝑚−𝑛+1)
= 𝑓0 + 𝑚∆𝑓0 + ∆2 𝑓0 + ⋯ + ∆𝑛 𝑓0
2! 𝑛!
𝑚(𝑚 + 1) 2
𝑓𝑚 = 𝑓0 + 𝑚∇𝑓0 + ∇ 𝑓0 + ⋯
2!
𝑚(𝑚 + 1)(𝑚 + 2) … (𝑚 + 𝑛 − 1) 𝑛
+ ∇ 𝑓0
𝑛!
This is an alternate form of the Newton’s backward difference
interpolation formula.
We shall study now the central difference formulae most suited for
interpolation near the middle of a tabulated set, the we have three formula
to find it
9
Numerical Analysis II Assistant lecture
Physics Dept. Shrooq M. Azzo
Third stage 2021-2022
1) Evert's formula
𝑚+1 2 𝑚+2 4 𝑚 + 𝑘 2𝑘
𝑓𝑚 ≅ 𝑚𝑓1 + ( ) 𝛿 𝑓1 + ( ) 𝛿 𝑓1 + ⋯ + ( ) 𝛿 𝑓1 + ⋯
3 5 2𝑘 + 1
𝑞+1 2 𝑞+2 2
+ 𝑞𝑓0 + ( ) 𝛿 𝑓0 + ( ) 𝛿 𝑓0 + ⋯
3 5
𝑞+𝑘
+( ) 𝛿 2𝑘 𝑓0
2𝑘 + 1
𝑥𝑚 −𝑥0
Where, 𝑚 ,𝑞 = 1 − 𝑚
ℎ
2) Bessel's formula
1 𝑚 1 1 𝑚
𝑓𝑚 = 𝜇𝑓1 + (𝑚 − ) 𝛿𝑓1 + ( ) 𝜇𝛿 2 𝑓1 + (𝑚 − ) ( ) + ⋯
2 2 2 2 2 3 2 2
𝑚+𝑘−1
+( ) 𝜇𝛿 2𝑘 𝑓1
2𝑘 2
1 1 𝑚 + 𝑘 − 1 2𝑘+1
+ (𝑚 − ) ( )𝛿 𝑓1
2𝑘 + 1 2 2𝑘 2
1
Where,𝜇𝛿𝑓𝑘 = [𝛿𝑓𝑘+1 + 𝛿𝑓𝑘−1 ]
2 2 2
3) Stirling's formula
𝑚2 2 𝑚(𝑚2 − 1) 3 𝑚2 (𝑚2 − 1) 4
𝑓𝑚 = 𝑓0 + 𝑚𝜇𝑓0 + 𝛿 𝑓0 + 𝜇𝛿 𝑓0 + 𝛿 𝑓0
2 3! 4!
+⋯
Example:- find 𝑓(4.5), 𝑓(9), 𝑓(6.4) from the table
x 4 6 8 10
F(x) 1 3 8 20
Sol.:- because 𝑥𝑚 = 4.5 we take 𝑥0 = 4
𝑥𝑚 −𝑥0 4.5−4 1
𝑚= = =
ℎ 2 4
10
Numerical Analysis II Assistant lecture
Physics Dept. Shrooq M. Azzo
Third stage 2021-2022
𝑥𝑖 𝑓𝑖 ∆𝑓𝑖 ∆2 𝑓𝑖 ∆3 𝑓𝑖
4 1
2
6 3 3
5 4
8 8 7
12
10 20
𝑚(𝑚 − 1) 𝑚(𝑚 − 1)(𝑚 − 2)
𝑓(4.5) ≅ 𝑓0 + 𝑚∆𝑓0 + ∆2 𝑓0 + ∆3 𝑓0
2! 3!
1 1 1 1 1
1 ( −1) ( −1)( −2)
= 1 + 4 ∗ 2 + 4 42 ∗3+ 4 4 4
∗ 4 = 1.4375
6
𝑞 = 1 − 𝑚 = 0.8
𝑓(𝑥𝑚 ) = 𝑓(6.4)
𝑚+1 2 𝑚+2 4
≅ 𝑚𝑓1 + ( ) 𝛿 𝑓1 + ( ) 𝛿 𝑓1 + ⋯ + 𝑞𝑓0
3 5
𝑞+1 2 𝑚+2 4
+( ) 𝛿 𝑓0 + ( ) 𝛿 𝑓0
3 5
𝑚+1 2 𝑞+1 2
= 𝑚𝑓1 + ( ) 𝛿 𝑓1 + 𝑞𝑓0 + ( ) 𝛿 𝑓0
3 3
0.2 + 1 0.8 + 1
= 0.2 ∗ 8 + ( ) ∗ 7 + 0.8 ∗ 3 + ( )∗3
3 3
1.2(1.2−1)(1.2−2)(1.2−3)! 1.8(1.8−1)(1.8−2)(1.8−3)!
= 1.6 + ∗ 7 + 2.4 + ∗3
3!(1.2−3)! 3!(1.8−3)!
11
Numerical Analysis II Assistant lecture
Physics Dept. Shrooq M. Azzo
Third stage 2021-2022
= 3.632
12