3.1 interpolation and lagrange polynomialzxu2/acms40390f12/lec-3.1.pdfΒ Β· interpolation β’ problem...
TRANSCRIPT
Interpolation β’ Problem to be solved: Given a set of π + 1sample values of an
unknown function π, we wish to determine a polynomial of degree π so that
π π₯π = π π₯π = π¦π , π = 0, 1,β¦ , π
Weierstrass Approximation theorem Suppose π β πΆ[π, π]. Then βπ > 0, β a polynomial π π₯ : π π₯ β π π₯ < π, βπ₯ β π, π .
Remark: 1. The bound is uniform, i.e. valid for all π₯ in π, π 2. The way to find π π₯ is unknown.
2
π π(π)
0 0
1 0.84
2 0.91
3 0.14
4 -0.76
β¦ β¦
β’ Question: Can Taylor polynomial be used here? β’ Taylor expansion is accurate in the neighborhood of one point.
We need to the (interpolating) polynomial to pass many points.
β’ Example. Taylor approximation of ππ₯ for π₯ β [0,3]
3
β’ Problem: Construct a functions passing through two points (π₯0, π π₯0 ) and (π₯1, π π₯1 ).
First, define πΏ0 π₯ =π₯βπ₯1
π₯0βπ₯1, πΏ1 π₯ =
π₯βπ₯0
π₯1βπ₯0
Note: πΏ0 π₯0 = 1; πΏ0 π₯1 = 0
πΏ1 π₯0 = 0; πΏ0 π₯1 = 1
Then define the interpolating polynomial π π₯ = πΏ0 π₯ π π₯0 + πΏ1 π₯ π(π₯1)
Note:π π₯0 = π π₯0 , and π π₯1 = π π₯1
Claim: π π₯ is the unique linear polynomial passing through (π₯0, π π₯0 ) and (π₯1, π π₯1 ). 4
Linear Lagrange Interpolating Polynomial Passing through π Points
π-degree Polynomial Passing through π + π Points
β’ Constructing a polynomial passing through the points (π₯0, π π₯0 ), π₯1, π π₯1 , π₯2, π π₯2 , β¦ , (π₯π, π π₯π ).
Define Lagrange basis functions
πΏπ,π π₯ = π₯βπ₯π
π₯πβπ₯π
ππ=0,πβ π =
π₯βπ₯0
π₯πβπ₯0β¦π₯βπ₯πβ1
π₯πβπ₯πβ1βπ₯βπ₯π+1
π₯πβπ₯π+1β¦π₯βπ₯π
π₯πβπ₯π for π = 0,1β¦π.
Remark: πΏπ,π π₯π = 1; πΏπ,π π₯π = 0, βπ β π.
5
β’ Theorem. If π₯0, β¦ , π₯π are π + 1distinct numbers and π is a function whose values are given at these numbers, then a unique polynomial π(π₯) of degree at most π exists with π π₯π = π π₯π , for each π = 0, 1, β¦ π.
π π₯ = π π₯0 πΏπ,0 π₯ +β―+ π π₯π πΏπ,π π₯ .
Where πΏπ,π π₯ = π₯βπ₯π
π₯πβπ₯π
ππ=0,πβ π .
7
Error Bound for the Lagrange Interpolating Polynomial
Theorem. Suppose π₯0, β¦ , π₯π are distinct numbers in the interval [π, π] and π β πΆπ+1 π, π . Then for each π₯ in [π, π], a number π(π₯) (generally unknown) between π₯0, β¦ , π₯π, and hence in (π, π), exists with π π₯ =
π π₯ +π π+ π π₯
π+1 !π₯ β π₯0 π₯ β π₯1 β¦ π₯ β π₯π .
Where π π₯ is the Lagrange interpolating polynomial.
8
β’ Remark:
1. Applying the error term may be difficult. π₯ β π₯0 π₯ β π₯1 β¦ π₯ β π₯π is oscillatory. π π₯ is generally
unknown.
2. The error formula is important as they are used for numerical differentiation and integration.
Plot of π₯ β 0 π₯ β 1 π₯ β 2 π₯ β 3 π₯ β 4
9
Example. Suppose a table is to be prepared for π π₯ = ππ₯, π₯ β [0,1]. Assume the number of decimal places to be given per entry is π β₯ 8 and that the difference between adjacent π₯-values, the step size is β. What step size β will ensure that linear interpolation gives an absolute error of at most 10β6 for all π₯ in 0,1 .
10