Theory of Approximation Interpolation Abhas Singh Department of
Theory of Approximation: Interpolation Abhas Singh Department of Civil Engineering IIT Kanpur Acknowledgements: Profs. Saumyen Guha and Shivam Tripathi (CE)
Interpolation Polynomials ü Newton’s Divided Difference ü Lagrange Polynomials ü Direct Fit (Standard Format) ü Gram’s polynomials (introduced earlier) ü Spline Interpolation: piecewise continuous, smoothing
Unit Polynomials for Lagrange Formulation •
Lagrange Polynomials •
Lagrange Polynomials: Linear
Lagrange Polynomials: Quadratic
Lagrange Polynomials: Quadratic
y* = 0. 5234; 1. 07 % error
Newton’s Divided Difference •
Newton’s Divided Difference •
Newton’s Divided Difference •
Recall: Properties of Divided Differences •
Newton’s Divided Difference (recap) •
Newton’s Divided Difference (recap) •
Newton’s Divided Difference (recap) •
Newton’s Divided Difference: Error Estimate •
Newton’s Divided Difference (recap) •
Interpolation: Example 2 Fit an interpolation polynomial through the following four points: (1 , 10), (2 , 9), (3, 1), (4 , 0. 5) 1 , 10 -1 -3. 5 2, 9 -8 3. 75 3, 1 -0. 5 4 , 0. 5 2. 416667
Single Interpolation Polynomial ü If a single polynomial is fitted through a given set of points, the polynomial is always the same, irrespective of the basis used. ü Computation involved in obtaining the polynomial may vary depending on the basis. ü Since the polynomials are same, the error in approximation may be obtained using the remainder term of the Newton’s polynomial for all cases. ü So far, we have fitted one polynomial through all the n points. ü For a large number of points, this may lead to oscillations between the points, especially at the end intervals for the equally spaced data. ü Next we fit piecewise continuous polynomials or splines to the data!
Spline Interpolation •
Spline Interpolation: Linear xi+2, fi+2 xi, fi xi-1, fi-1 qi(x) qi-1(x) qi+1(x) xi+1, fi+1 qi(xi) = fi qi-1(xi) = qi(xi) ü A straight line in each interval: (n+1) points, n straight lines, 2 n unknowns ü Available conditions: (n+1) function values, (n-1) function continuity conditions ü Straight lines can be uniquely estimated!
Spline Interpolation: Linear •
Spline Interpolation: Quadratic xi+2, fi+2 xi, fi xi-1, fi-1 qi-1(x) qi+1(x) xi+1, fi+1 ü A quadratic polynomial in each interval: (n+1) points, n quadratic polynomials, 3 n unknowns ü Available conditions: (n + 1) function values, (n - 1) function continuity and (n - 1) 1 st derivative continuity conditions, total 3 n-1 conditions. ü 1 free condition to be chosen by the user!
Spline Interpolation: Quadratic •
Spline Interpolation: Cubic xi+2, fi+2 xi, fi xi-1, fi-1 qi-1(x) qi+1(x) xi+1, fi+1 ü A cubic polynomial in each interval: (n+1) points, n cubic polynomials, 4 n unknowns ü Available conditions: (n + 1) function values, (n - 1) function continuity, (n - 1) 1 st derivative continuity conditions and (n - 1) 2 nd derivative continuity conditions, total 4 n - 2 conditions. ü 2 free conditions to be chosen by the user!
- Slides: 50