Chapter 3
Chapter 3
First consider the simple case, the equation of straight line (a Linear Polynomial) passing through two
points 𝑥0, 𝑦0 , 𝑥1, 𝑦1 .
𝒙−𝒙𝟏 𝒙−𝒙𝟎
Such a polynomial, can be written as: 𝑷 𝒙 = 𝒚 + 𝒚
𝒙𝟎 −𝒙𝟏 𝟎 𝒙𝟏 −𝒙𝟎 𝟏
𝑥−𝑥1 𝑥−𝑥0
= 𝑓(𝑥0 ) + 𝑓(𝑥1 )
𝑥0 −𝑥1 𝑥1 −𝑥0
= 𝑳𝟎 𝒙 𝒇(𝒙𝟎 ) + 𝑳𝟏 𝒙 𝒇(𝒙𝟏 )
This is the Lagrange polynomial of degree one passing through two points 𝑥0, 𝑦0 , 𝑥1, 𝑦1 .
𝒙−𝒙𝟏 𝒙−𝒙𝟎
Here 𝑳𝟎 𝒙 = and 𝑳𝟏 𝒙 =
𝒙𝟎 −𝒙𝟏 𝒙𝟏 −𝒙𝟎
Determine the linear Lagrange interpolation polynomial that passes through the points
(2,4) and (5,1)
3.1 Interpolation and the Lagrange Polynomial
6
3.1 Linear Lagrange Interpolating Polynomial
7
3.1 Error Bound for the Lagrange Interpolating
8
Polynomial
Theorem:
3.1 Interpolation and the Lagrange Polynomial
9
Example: (part 1) Use the numbers 𝑥0 = 2, 𝑥1 = 2.75, and 𝑥2 = 4 to find the second
1
Lagrange interpolating polynomial for 𝑓 𝑥 = .
𝑥
3.1 Interpolation and the Lagrange Polynomial
10
Example: (part 2) Determine the error form for this polynomial and find the upper bound
of the error when this polynomial is used to approximate for 𝑥 ∈ 2, 4 .
3.1 Interpolation and the Lagrange Polynomial
11
Let 𝑃3 (𝑥) be the interpolating Lagrange polynomial for the data (0, 0), (0.5, y), (1, 3) and
(2, 2). The coefficient of 𝑥 3 in 𝑃3 𝑥 is 6. Find the value of y.
3.3 Divided Differences
12
First consider the simple case, a Linear Polynomial, passing through two points 𝑥0, 𝑦0 , 𝑥1, 𝑦1 .
𝑃1 𝑥 = 𝑏0 + 𝑏1(𝑥 − 𝑥0)
Where
b0 f ( x0 )
f ( x1 ) f ( x0 )
b1
x1 x0
3.3 Quadratic polynomial
14
Second degree Polynomial, passing through three points 𝑥0, 𝑦0 , 𝑥1, 𝑦1 and 𝑥2, 𝑦2 .
b0 f ( x0 )
f ( x1 ) f ( x0 )
b1
x1 x0
f ( x 2 ) f ( x1 ) f ( x1 ) f ( x0 )
x 2 x1 x1 x0
b2
x 2 x0
3.3 Quadratic polynomial (cont…)
General form
15
Second degree Polynomial, passing through three points 𝑥0, 𝑦0 , 𝑥1, 𝑦1 and 𝑥2, 𝑦2 .
where b0 f ( x0 ) f [ x0 ]
f ( x1 ) f ( x0 )
b1 f [ x1 , x0 ]
x1 x0
f ( x2 ) f ( x1 ) f ( x1 ) f ( x0 )
x2 x1 x1 x0 f [ x2 , x1 ] f [ x1 x0 ]
b2 f [ x2 , x1 , x0 ]
x2 x0 x2 x0
Rewriting
P2 ( x) f [ x0 ] f [ x1 , x0 ]( x x0 ) f [ x2 , x1 , x0 ]( x x0 )( x x1 )
3.3 Quadratic polynomial (cont…)
General form
16
The 𝑛th degree polynomial that passes through the points {𝑥0, 𝑥1, … , 𝑥𝑛}:
𝑋𝑖 𝑓(𝑥𝑖 )
𝑋0 = 1 0.7651977
𝑋1 = 1.3 0.6200860
𝑋2 = 1.6 0.4554022
𝑋3 = 1.9 0.2818186
𝑋4 = 2.2 0.1103623
19
3.3 Newton forward-difference formula
20
For the centered-difference formulas, we choose x0 near the point being approximated.
and label the nodes directly below 𝑥0 as 𝑥1, 𝑥2, …and those directly above as 𝑥−1, 𝑥−2 , ….
Stirling’s formula:
if n = 2m+1 is odd. If n = 2m is even, we use the same formula but delete the last line.
3.3 Newton centered-difference formula
23
24
3.4 Hermite Interpolation
25
3.4 Hermite Interpolation
26
3.4 Hermite Polynomials Using
27
Divided Differences
Construct the divided difference table that uses z0, z1, . . ., z2n+1.
But z2i = z2i+1 = xi , f [z2i, z2i+1] is undefined.
In place of the undefined first divided differences:
29
30