3.1 Interpolation and Lagrange Polynomialzxu2/acms40390F12/Lec-3.1.pdfย ยท Interpolation โข Problem...
Transcript of 3.1 Interpolation and Lagrange Polynomialzxu2/acms40390F12/Lec-3.1.pdfย ยท Interpolation โข Problem...
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