Presentation is loading. Please wait.

Presentation is loading. Please wait.

Theory of Approximation: Interpolation

Similar presentations


Presentation on theme: "Theory of Approximation: Interpolation"โ€” Presentation transcript:

1 Theory of Approximation: Interpolation
Abhas Singh Department of Civil Engineering IIT Kanpur Acknowledgements: Profs. Saumyen Guha and Shivam Tripathi (CE)

2 Discrete Data (n + 1) observations or data pairs [(x0, y0), (x1, y1), (x2, y2) โ€ฆ (xn, yn)] (m + 1) basis functions: ๐œ‘ 0 , ๐œ‘ 1 , ๐œ‘ 2 ,โ‹ฏ ๐œ‘ ๐‘š Approximating polynomial: ๐‘ ๐‘ฅ = ๐‘—=0 ๐‘š ๐‘ ๐‘— ๐œ‘ ๐‘— ๐‘ฅ ๐‘ 0 ๐œ‘ 0 ๐‘ฅ 0 + ๐‘ 1 ๐œ‘ 1 ๐‘ฅ 0 + ๐‘ 2 ๐œ‘ 2 ๐‘ฅ 0 +โ‹ฏ+ ๐‘ ๐‘š ๐œ‘ ๐‘š ๐‘ฅ 0 = ๐‘ฆ 0 ๐‘ 0 ๐œ‘ 0 ๐‘ฅ 1 + ๐‘ 1 ๐œ‘ 1 ๐‘ฅ 1 + ๐‘ 2 ๐œ‘ 2 ๐‘ฅ 1 +โ‹ฏ+ ๐‘ ๐‘š ๐œ‘ ๐‘š ๐‘ฅ 1 = ๐‘ฆ 1 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ๐‘ 0 ๐œ‘ 0 ๐‘ฅ ๐‘› + ๐‘ 1 ๐œ‘ 1 ๐‘ฅ ๐‘› + ๐‘ 2 ๐œ‘ 2 ๐‘ฅ ๐‘› +โ‹ฏ+ ๐‘ ๐‘š ๐œ‘ ๐‘š ๐‘ฅ ๐‘› = ๐‘ฆ ๐‘› n equations, m unknowns: m < n: over-determined system, least square regression m = n: unique solution, interpolation m > n: under-determined system

3 Interpolation Polynomials
Newtonโ€™s Divided Difference Lagrange Polynomials Gramโ€™s polynomials (introduced earlier) Spline Interpolation: piecewise continuous, smoothing

4 Newtonโ€™s Divided Difference
For a net of points ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ,โ‹ฏ ๐‘ฅ ๐‘› , formulate a triangular set of basis polynomials ๐œ‘ 0 ๐‘ฅ =1 ๐œ‘ 1 ๐‘ฅ = ๐‘ฅโˆ’ ๐‘ฅ 0 ๐œ‘ 2 ๐‘ฅ = ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 ๐œ‘ 3 ๐‘ฅ = ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 ๐‘ฅโˆ’ ๐‘ฅ 2 โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ ๐œ‘ ๐‘– ๐‘ฅ = ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘–โˆ’1 โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ ๐œ‘ ๐‘› ๐‘ฅ = ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 โ‹ฏ โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘›โˆ’1

5 Newtonโ€™s Divided Difference
Consider a net of points ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ,โ‹ฏ ๐‘ฅ ๐‘› and the corresponding function values as ๐‘“ 0 , ๐‘“ 1 , ๐‘“ 2 ,โ‹ฏ ๐‘“ ๐‘› Newtonโ€™s polynomial is: ๐‘ ๐‘ฅ = ๐‘ 0 + ๐‘ 1 ๐‘ฅโˆ’ ๐‘ฅ 0 + ๐‘ 2 ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 + ๐‘ 3 ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 ๐‘ฅโˆ’ ๐‘ฅ 2 โ‹ฏ โ‹ฏ + ๐‘ ๐‘› ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘›โˆ’1 True function: ๐‘“ ๐‘ฅ =๐‘ ๐‘ฅ + ๐‘“ ๐‘›+1 ๐œ‰ ๐‘›+1 ! ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘› for some ๐œ‰โˆˆ int ๐‘ฅ, ๐‘ฅ 0 , ๐‘ฅ 1 โ‹ฏ ๐‘ฅ ๐‘›

6 Newtonโ€™s Divided Difference
Newtonโ€™s polynomial with the remainder term: ๐‘“ ๐‘ฅ = ๐‘ 0 + ๐‘ 1 ๐‘ฅโˆ’ ๐‘ฅ 0 + ๐‘ 2 ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 + ๐‘ 3 ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 ๐‘ฅโˆ’ ๐‘ฅ 2 โ‹ฏ โ‹ฏ + ๐‘ ๐‘› ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘›โˆ’1 +๐‘Ž ๐‘ฅ ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘› ๐‘“ ๐‘ฅ 0 = ๐‘“ 0 = ๐‘ 0 ; Taking f0 on the LHS and dividing by ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘“ ๐‘ฅ 0 ,๐‘ฅ = ๐‘“ ๐‘ฅ โˆ’๐‘“ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 0 = ๐‘ 1 + ๐‘ 2 ๐‘ฅโˆ’ ๐‘ฅ 1 + ๐‘ 3 ๐‘ฅโˆ’ ๐‘ฅ 1 ๐‘ฅโˆ’ ๐‘ฅ 2 โ‹ฏ โ‹ฏ + ๐‘ ๐‘› ๐‘ฅโˆ’ ๐‘ฅ 1 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘›โˆ’1 +๐‘Ž ๐‘ฅ ๐‘ฅโˆ’ ๐‘ฅ 1 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘› ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 = ๐‘“ 1 โˆ’ ๐‘“ 0 ๐‘ฅ 1 โˆ’ ๐‘ฅ 0 = ๐‘ 1

7 Newtonโ€™s Divided Difference
๐‘“ ๐‘ฅ 0 ,๐‘ฅ = ๐‘“ ๐‘ฅ โˆ’๐‘“ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 0 = ๐‘ 1 + ๐‘ 2 ๐‘ฅโˆ’ ๐‘ฅ 1 + ๐‘ 3 ๐‘ฅโˆ’ ๐‘ฅ 1 ๐‘ฅโˆ’ ๐‘ฅ 2 โ‹ฏ โ‹ฏ + ๐‘ ๐‘› ๐‘ฅโˆ’ ๐‘ฅ 1 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘›โˆ’1 +๐‘Ž ๐‘ฅ ๐‘ฅโˆ’ ๐‘ฅ 1 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘› Taking ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 on the LHS and dividing by ๐‘ฅโˆ’ ๐‘ฅ 1 : ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,๐‘ฅ = ๐‘“ ๐‘ฅ 0 ,๐‘ฅ โˆ’๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ๐‘ฅโˆ’ ๐‘ฅ 1 = ๐‘ 2 + ๐‘ 3 ๐‘ฅโˆ’ ๐‘ฅ 2 +โ‹ฏ + ๐‘ ๐‘› ๐‘ฅโˆ’ ๐‘ฅ 2 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘›โˆ’1 +๐‘Ž ๐‘ฅ ๐‘ฅโˆ’ ๐‘ฅ 2 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘› ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 = ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 2 โˆ’๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ๐‘ฅ 2 โˆ’ ๐‘ฅ 1 = ๐‘ 2

8 Newtonโ€™s Divided Difference
๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,๐‘ฅ = ๐‘“ ๐‘ฅ 0 ,๐‘ฅ โˆ’๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ๐‘ฅโˆ’ ๐‘ฅ 1 = ๐‘ 2 + ๐‘ 3 ๐‘ฅโˆ’ ๐‘ฅ 2 +โ‹ฏ + ๐‘ ๐‘› ๐‘ฅโˆ’ ๐‘ฅ 2 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘›โˆ’1 +๐‘Ž ๐‘ฅ ๐‘ฅโˆ’ ๐‘ฅ 2 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘› Taking ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 on the LHS and dividing by ๐‘ฅโˆ’ ๐‘ฅ 2 : ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ,๐‘ฅ = ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,๐‘ฅ โˆ’๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ๐‘ฅโˆ’ ๐‘ฅ 2 = ๐‘ 3 + ๐‘ 4 ๐‘ฅโˆ’ ๐‘ฅ 3 +โ‹ฏ + ๐‘ ๐‘› ๐‘ฅโˆ’ ๐‘ฅ 3 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘›โˆ’1 +๐‘Ž ๐‘ฅ ๐‘ฅโˆ’ ๐‘ฅ 3 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘› ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 , ๐‘ฅ 3 = ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 3 โˆ’๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ๐‘ฅ 3 โˆ’ ๐‘ฅ 2 = ๐‘ 3

9 Newtonโ€™s Divided Difference
๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’1 ,๐‘ฅ = ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’2 ,๐‘ฅ โˆ’๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’2 , ๐‘ฅ ๐‘˜โˆ’1 ๐‘ฅโˆ’ ๐‘ฅ ๐‘˜โˆ’1 = ๐‘ ๐‘˜ ๐‘ ๐‘˜+1 ๐‘ฅโˆ’ ๐‘ฅ ๐‘˜ +โ€ฆ+ ๐‘ ๐‘› ๐‘ฅโˆ’ ๐‘ฅ ๐‘˜ โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘›โˆ’ ๐‘Ž ๐‘ฅ ๐‘ฅโˆ’ ๐‘ฅ ๐‘˜ โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘› ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ,โ‹ฏ ๐‘ฅ ๐‘˜ = ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’2 , ๐‘ฅ ๐‘˜ โˆ’๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’2 , ๐‘ฅ ๐‘˜โˆ’1 ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’1 = ๐‘ ๐‘˜ ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ,โ‹ฏ ๐‘ฅ ๐‘› = ๐‘ ๐‘› ; ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ,โ‹ฏ ๐‘ฅ ๐‘› ,๐‘ฅ =๐‘Ž ๐‘ฅ Newtonโ€™s polynomial without the remainder term: ๐‘ ๐‘ฅ = ๐‘“ 0 + ๐‘—=1 ๐‘› ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , โ‹ฏ ๐‘ฅ ๐‘— ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘—โˆ’1

10 Recall: Properties of Divided Differences
1st Divided Difference: ๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’1 = ๐‘“ ๐‘˜ โˆ’ ๐‘“ ๐‘˜โˆ’1 ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’1 = ๐‘“ ๐‘˜โˆ’1 โˆ’ ๐‘“ ๐‘˜ ๐‘ฅ ๐‘˜โˆ’1 โˆ’ ๐‘ฅ ๐‘˜ =๐‘“ ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜ 2nd Divided Difference: ๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜โˆ’2 = ๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’1 โˆ’๐‘“ ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜โˆ’2 ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’2 = ๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’1 โˆ’๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’2 ๐‘ฅ ๐‘˜โˆ’1 โˆ’ ๐‘ฅ ๐‘˜โˆ’2 = ๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’2 โˆ’๐‘“ ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜โˆ’2 ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’1 ๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜โˆ’2 =๐‘“ ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’2 =๐‘“ ๐‘ฅ ๐‘˜โˆ’2 , ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜ =๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’2 , ๐‘ฅ ๐‘˜โˆ’1

11 Properties of Divided Differences
2nd Divided Difference: ๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜โˆ’2 = ๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’1 โˆ’๐‘“ ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜โˆ’2 ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’2 ๐‘Ž= ๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’1 โˆ’๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’2 ๐‘ฅ ๐‘˜โˆ’1 โˆ’ ๐‘ฅ ๐‘˜โˆ’2 = ๐‘“ ๐‘˜ โˆ’ ๐‘“ ๐‘˜โˆ’1 ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’1 โˆ’ ๐‘“ ๐‘˜ โˆ’ ๐‘“ ๐‘˜โˆ’2 ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’2 ๐‘ฅ ๐‘˜โˆ’1 โˆ’ ๐‘ฅ ๐‘˜โˆ’2 = ๐‘ฅ ๐‘˜ ๐‘“ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜ ๐‘“ ๐‘˜โˆ’1 โˆ’ ๐‘ฅ ๐‘˜โˆ’2 ๐‘“ ๐‘˜ + ๐‘ฅ ๐‘˜โˆ’2 ๐‘“ ๐‘˜โˆ’1 โˆ’ ๐‘ฅ ๐‘˜ ๐‘“ ๐‘˜ + ๐‘ฅ ๐‘˜ ๐‘“ ๐‘˜โˆ’2 + ๐‘ฅ ๐‘˜โˆ’1 ๐‘“ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’1 ๐‘“ ๐‘˜โˆ’2 ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’1 ๐‘ฅ ๐‘˜โˆ’1 โˆ’ ๐‘ฅ ๐‘˜โˆ’2 ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’2 = ๐‘ฅ ๐‘˜โˆ’1 โˆ’ ๐‘ฅ ๐‘˜โˆ’2 ๐‘“ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’1 โˆ’ ๐‘ฅ ๐‘˜โˆ’2 ๐‘“ ๐‘˜โˆ’1 โˆ’ ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’1 ๐‘“ ๐‘˜โˆ’1 + ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’1 ๐‘“ ๐‘˜โˆ’2 ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’1 ๐‘ฅ ๐‘˜โˆ’1 โˆ’ ๐‘ฅ ๐‘˜โˆ’2 ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’2 = ๐‘“ ๐‘˜ โˆ’ ๐‘“ ๐‘˜โˆ’1 ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’1 โˆ’ ๐‘“ ๐‘˜โˆ’1 โˆ’ ๐‘“ ๐‘˜โˆ’2 ๐‘ฅ ๐‘˜โˆ’1 โˆ’ ๐‘ฅ ๐‘˜โˆ’2 ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’2 = ๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’1 โˆ’๐‘“ ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜โˆ’2 ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’2 =๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜โˆ’2 + ๐‘ฅ ๐‘˜โˆ’1 ๐‘“ ๐‘˜โˆ’1 โˆ’ ๐‘ฅ ๐‘˜โˆ’1 ๐‘“ ๐‘˜โˆ’1

12 Newtonโ€™s Divided Difference
Recursion Formula for Divided Difference: (Recall: discussion during Mullerโ€™s method) The order of the points within the divided difference is immaterial. To see it generally, consider this: ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,โ€ฆ ๐‘ฅ ๐‘˜ ,๐‘ฅ = ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’1 ,๐‘ฅ โˆ’๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜ ๐‘ฅโˆ’ ๐‘ฅ ๐‘˜ For generalization: replace the index zero with (i + 1) evaluate the divided difference at x = xi ๐‘“ ๐‘ฅ ๐‘–+1 , ๐‘ฅ ๐‘–+2 ,โ€ฆ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘– = ๐‘“ ๐‘ฅ ๐‘–+1 , ๐‘ฅ ๐‘–+2 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘– โˆ’๐‘“ ๐‘ฅ ๐‘–+1 , ๐‘ฅ ๐‘–+2 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜ ๐‘ฅ ๐‘– โˆ’ ๐‘ฅ ๐‘˜ ๐‘“ ๐‘ฅ ๐‘– , ๐‘ฅ ๐‘–+1 , โ€ฆ ๐‘ฅ ๐‘˜ = ๐‘“ ๐‘ฅ ๐‘– , ๐‘ฅ ๐‘–+1 , โ€ฆ ๐‘ฅ ๐‘˜โˆ’1 โˆ’๐‘“ ๐‘ฅ ๐‘–+1 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜ ๐‘ฅ ๐‘– โˆ’ ๐‘ฅ ๐‘˜

13 Newtonโ€™s Divided Difference
๐‘“ ๐‘ฅ ๐‘– , ๐‘ฅ ๐‘–+1 , โ€ฆ ๐‘ฅ ๐‘˜ = ๐‘“ ๐‘ฅ ๐‘– , ๐‘ฅ ๐‘–+1 , โ€ฆ ๐‘ฅ ๐‘˜โˆ’1 โˆ’๐‘“ ๐‘ฅ ๐‘–+1 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜ ๐‘ฅ ๐‘– โˆ’ ๐‘ฅ ๐‘˜ = ๐‘“ ๐‘ฅ ๐‘–+1 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’1 , ๐‘ฅ ๐‘˜ โˆ’๐‘“ ๐‘ฅ ๐‘– , ๐‘ฅ ๐‘–+1 , โ€ฆ ๐‘ฅ ๐‘˜โˆ’ ๐‘ฅ ๐‘˜ โˆ’๐‘ฅ ๐‘– Or by reversing the order of x variables, ๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’1 , โ€ฆ ๐‘ฅ ๐‘– = ๐‘“ ๐‘ฅ ๐‘˜โˆ’1 ,โ€ฆ ๐‘ฅ ๐‘–+1 , ๐‘ฅ ๐‘– โˆ’๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’1 , โ€ฆ ๐‘ฅ ๐‘– ๐‘ฅ ๐‘– โˆ’ ๐‘ฅ ๐‘˜ = ๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’1 , โ€ฆ ๐‘ฅ ๐‘–+1 โˆ’๐‘“ ๐‘ฅ ๐‘˜โˆ’1 ,โ€ฆ ๐‘ฅ ๐‘–+1 , ๐‘ฅ ๐‘– ๐‘ฅ ๐‘˜ โˆ’๐‘ฅ ๐‘–

14 Newtonโ€™s Divided Difference
Examples: ๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’1 , โ€ฆ ๐‘ฅ ๐‘– = ๐‘“ ๐‘ฅ ๐‘˜ , ๐‘ฅ ๐‘˜โˆ’1 , โ€ฆ ๐‘ฅ ๐‘–+1 โˆ’๐‘“ ๐‘ฅ ๐‘˜โˆ’1 ,โ€ฆ ๐‘ฅ ๐‘–+1 , ๐‘ฅ ๐‘– ๐‘ฅ ๐‘˜ โˆ’๐‘ฅ ๐‘– ๐‘˜=1, ๐‘–=0:๐‘“ ๐‘ฅ 1 , ๐‘ฅ 0 = ๐‘“ ๐‘ฅ 1 โˆ’๐‘“ ๐‘ฅ ๐‘ฅ 1 โˆ’๐‘ฅ 0 ๐‘˜=2, ๐‘–=1:๐‘“ ๐‘ฅ 2 , ๐‘ฅ 1 = ๐‘“ ๐‘ฅ 2 โˆ’๐‘“ ๐‘ฅ ๐‘ฅ 2 โˆ’๐‘ฅ 1 ๐‘˜=2, ๐‘–=0:๐‘“ ๐‘ฅ 2 , ๐‘ฅ 1 , ๐‘ฅ 0 = ๐‘“ ๐‘ฅ 2 , ๐‘ฅ 1 โˆ’๐‘“ ๐‘ฅ 1 , ๐‘ฅ ๐‘ฅ 2 โˆ’๐‘ฅ 0 ๐‘˜=3, ๐‘–=1:๐‘“ ๐‘ฅ 3 , ๐‘ฅ 2 , ๐‘ฅ 1 = ๐‘“ ๐‘ฅ 3 , ๐‘ฅ 2 โˆ’๐‘“ ๐‘ฅ 2 , ๐‘ฅ ๐‘ฅ 3 โˆ’๐‘ฅ 1 ๐‘˜=3, ๐‘–=0:๐‘“ ๐‘ฅ 3 , ๐‘ฅ 2 , ๐‘ฅ 1 , ๐‘ฅ 0 = ๐‘“ ๐‘ฅ 3 , ๐‘ฅ 2 , ๐‘ฅ 1 โˆ’๐‘“ ๐‘ฅ 2 , ๐‘ฅ 1 , ๐‘ฅ ๐‘ฅ 3 โˆ’๐‘ฅ 0

15 Newtonโ€™s Divided Difference:Example
x0 , f(x0) f[x1, x0] f[x2, x1, x0] f[x3, x2, x1, x0] x1 , f(x1) f[x2, x1] f[x3, x2, x1] x2 , f(x2) f[x3, x2] x3 , f(x3) p(x) = f(x0) + f[x1, x0](x - x0) + f[x2, x1, x0](x - x0)(x โ€“ x1) + f[x3, x2, x1, x0](x - x0)(x โ€“ x1)(x โ€“ x2)

16 Newtonโ€™s Divided Difference: Example
1 , -48 2 9 2 2 , -46 29 17 4, 12 80 5 , 92 ๐‘ ๐‘ฅ =โˆ’ ๐‘ฅโˆ’ ๐‘ฅโˆ’1 ๐‘ฅโˆ’ ๐‘ฅโˆ’1 ๐‘ฅโˆ’2 ๐‘ฅโˆ’4 =2 ๐‘ฅ 3 โˆ’5 ๐‘ฅ 2 +3๐‘ฅโˆ’48 p(x) = f(x0) + f[x1, x0](x - x0) + f[x2, x1, x0](x - x0)(x โ€“ x1) + f[x3, x2, x1, x0](x - x0)(x โ€“ x1)(x โ€“ x2)

17 Newtonโ€™s Divided Difference: Error Estimate
Recall the Newtonโ€™s polynomial with the remainder: ๐‘“ ๐‘ฅ =๐‘ ๐‘ฅ + ๐‘“ ๐‘›+1 ๐œ‰ ๐‘›+1 ! ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘› for some ๐œ‰โˆˆ int ๐‘ฅ, ๐‘ฅ 0 , ๐‘ฅ 1 โ‹ฏ ๐‘ฅ ๐‘› ๐‘“ ๐‘ฅ =๐‘ ๐‘ฅ +๐‘Ž ๐‘ฅ ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘› We derived: ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ,โ‹ฏ ๐‘ฅ ๐‘› ,๐‘ฅ =๐‘Ž ๐‘ฅ If an extra-data {xn+1, f(xn+1)} is available, it is possible to make an approximate estimate of the error as: ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ,โ‹ฏ ๐‘ฅ ๐‘› , ๐‘ฅ ๐‘›+1 =๐‘Ž ๐‘ฅ ๐‘›+1 โ‰ˆ๐‘Ž ๐‘ฅ and the error (E) as: ๐ธโ‰ˆ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ,โ‹ฏ ๐‘ฅ ๐‘› , ๐‘ฅ ๐‘›+1 ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘›

18 Newtonโ€™s Divided Difference
๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’1 ,๐‘ฅ = ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’2 ,๐‘ฅ โˆ’๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’2 , ๐‘ฅ ๐‘˜โˆ’1 ๐‘ฅโˆ’ ๐‘ฅ ๐‘˜โˆ’1 = ๐‘ ๐‘˜ ๐‘ ๐‘˜+1 ๐‘ฅโˆ’ ๐‘ฅ ๐‘˜ +โ€ฆ+ ๐‘ ๐‘› ๐‘ฅโˆ’ ๐‘ฅ ๐‘˜ โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘›โˆ’ ๐‘Ž ๐‘ฅ ๐‘ฅโˆ’ ๐‘ฅ ๐‘˜ โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘› ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ,โ‹ฏ ๐‘ฅ ๐‘˜ = ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’2 , ๐‘ฅ ๐‘˜ โˆ’๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 ,โ€ฆ ๐‘ฅ ๐‘˜โˆ’2 , ๐‘ฅ ๐‘˜โˆ’1 ๐‘ฅ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜โˆ’1 = ๐‘ ๐‘˜ ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ,โ‹ฏ ๐‘ฅ ๐‘› = ๐‘ ๐‘› ; ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ,โ‹ฏ ๐‘ฅ ๐‘› ,๐‘ฅ =๐‘Ž ๐‘ฅ Newtonโ€™s polynomial without the remainder term: ๐‘ ๐‘ฅ = ๐‘“ 0 + ๐‘—=1 ๐‘› ๐‘“ ๐‘ฅ 0 , ๐‘ฅ 1 , โ‹ฏ ๐‘ฅ ๐‘— ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 โ‹ฏ ๐‘ฅโˆ’ ๐‘ฅ ๐‘—โˆ’1

19 Lagrange Polynomials Unit linear polynomials for two nodes: ๐‘ฅ 0 , ๐‘ฅ 1 ๐›ฟ 0 ๐‘ฅ = ๐‘ฅโˆ’ ๐‘ฅ 1 ๐‘ฅ 0 โˆ’ ๐‘ฅ 1 ; ๐›ฟ 1 ๐‘ฅ = ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅ 1 โˆ’ ๐‘ฅ 0 Unit quadratic for three nodes: ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ๐›ฟ 0 ๐‘ฅ = ๐‘ฅโˆ’ ๐‘ฅ 1 ๐‘ฅโˆ’ ๐‘ฅ 2 ๐‘ฅ 0 โˆ’ ๐‘ฅ 1 ๐‘ฅ 0 โˆ’ ๐‘ฅ 2 ; ๐›ฟ 1 ๐‘ฅ = ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 2 ๐‘ฅ 1 โˆ’ ๐‘ฅ 0 ๐‘ฅ 1 โˆ’ ๐‘ฅ 2 ๐›ฟ 2 ๐‘ฅ = ๐‘ฅโˆ’ ๐‘ฅ 0 ๐‘ฅโˆ’ ๐‘ฅ 1 ๐‘ฅ 2 โˆ’ ๐‘ฅ 0 ๐‘ฅ 2 โˆ’ ๐‘ฅ 1 Polynomials of order n for the mesh of nodes ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ,โ‹ฏ ๐‘ฅ ๐‘› ๐›ฟ ๐‘– ๐‘ฅ = ๐‘—=0 ๐‘—โ‰ ๐‘– ๐‘› ๐‘ฅโˆ’ ๐‘ฅ ๐‘— ๐‘ฅ ๐‘– โˆ’ ๐‘ฅ ๐‘— ๐›ฟ ๐‘– ๐‘ฅ ๐‘— = 0 ๐‘“๐‘œ๐‘Ÿ ๐‘—โ‰ ๐‘– 1 ๐‘“๐‘œ๐‘Ÿ ๐‘—=๐‘–

20 Lagrange Polynomials Polynomials to be fitted to a mesh of nodes ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ,โ‹ฏ ๐‘ฅ ๐‘› and the corresponding function values as ๐‘“ 0 , ๐‘“ 1 , ๐‘“ 2 ,โ‹ฏ ๐‘“ ๐‘› Lagrange polynomial is: ๐‘ ๐‘ฅ = ๐‘–=0 ๐‘› ๐‘“ ๐‘– ๐›ฟ ๐‘– ๐‘ฅ ๐›ฟ ๐‘– ๐‘ฅ = ๐‘—=0 ๐‘—โ‰ ๐‘– ๐‘› ๐‘ฅโˆ’ ๐‘ฅ ๐‘— ๐‘ฅ ๐‘– โˆ’ ๐‘ฅ ๐‘—

21 Lagrange Polynomials: Linear

22 Lagrange Polynomials: Quadratic

23 Lagrange Polynomials Polynomials to be fitted to a mesh of nodes ๐‘ฅ 0 , ๐‘ฅ 1 , ๐‘ฅ 2 ,โ‹ฏ ๐‘ฅ ๐‘› and the corresponding function values as ๐‘“ 0 , ๐‘“ 1 , ๐‘“ 2 ,โ‹ฏ ๐‘“ ๐‘› Lagrange polynomial is: ๐‘ ๐‘ฅ = ๐‘–=0 ๐‘› ๐‘“ ๐‘– ๐›ฟ ๐‘– ๐‘ฅ ๐›ฟ ๐‘– ๐‘ฅ = ๐‘—=0 ๐‘—โ‰ ๐‘– ๐‘› ๐‘ฅโˆ’ ๐‘ฅ ๐‘— ๐‘ฅ ๐‘– โˆ’ ๐‘ฅ ๐‘—

24 Lagrange Polynomial: Example
Write the cubic polynomial using Lagrange polynomials that passes through the following four points: (1 , -48), (2 , -46), (4, 12), (5 , 92)? ๐‘ ๐‘ฅ = โˆ’48 ๐‘ฅโˆ’2 ๐‘ฅโˆ’4 ๐‘ฅโˆ’5 1โˆ’2 1โˆ’4 1โˆ’5 + โˆ’46 ๐‘ฅโˆ’1 ๐‘ฅโˆ’4 ๐‘ฅโˆ’5 2โˆ’1 2โˆ’4 2โˆ’ ๐‘ฅโˆ’1 ๐‘ฅโˆ’2 ๐‘ฅโˆ’5 4โˆ’1 4โˆ’2 4โˆ’ ๐‘ฅโˆ’1 ๐‘ฅโˆ’2 ๐‘ฅโˆ’4 5โˆ’1 5โˆ’2 5โˆ’4 =4 ๐‘ฅโˆ’2 ๐‘ฅโˆ’4 ๐‘ฅโˆ’5 โˆ’ ๐‘ฅโˆ’1 ๐‘ฅโˆ’4 ๐‘ฅโˆ’5 โˆ’2 ๐‘ฅโˆ’1 ๐‘ฅโˆ’2 ๐‘ฅโˆ’ ๐‘ฅโˆ’1 ๐‘ฅโˆ’2 ๐‘ฅโˆ’4 =2 ๐‘ฅ 3 โˆ’5 ๐‘ฅ 2 +3๐‘ฅโˆ’48 Recall Newtonโ€™s polynomial through the same set of points: ๐‘ ๐‘ฅ =โˆ’48+2 ๐‘ฅโˆ’1 +9 ๐‘ฅโˆ’1 ๐‘ฅโˆ’2 +2 ๐‘ฅโˆ’1 ๐‘ฅโˆ’2 ๐‘ฅโˆ’4 =2 ๐‘ฅ 3 โˆ’5 ๐‘ฅ 2 +3๐‘ฅโˆ’48

25 Example Fit Fit an interpolation polynomial through the following four points: (1 , -48), (2 , -46), (4, 12), (5 , 92) ๐‘ ๐‘ฅ =2 ๐‘ฅ 3 โˆ’5 ๐‘ฅ 2 +3๐‘ฅโˆ’48


Download ppt "Theory of Approximation: Interpolation"

Similar presentations


Ads by Google