Theory of Approximation: Interpolation

Slides:



Advertisements
Similar presentations
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
Advertisements

Data mining and statistical learning - lecture 6
Chapter 18 Interpolation The Islamic University of Gaza
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
1 Curve-Fitting Spline Interpolation. 2 Curve Fitting Regression Linear Regression Polynomial Regression Multiple Linear Regression Non-linear Regression.
Computational Methods in Physics PHYS 3437
EARS1160 – Numerical Methods notes by G. Houseman
ES 240: Scientific and Engineering Computation. InterpolationPolynomial  Definition –a function f(x) that can be written as a finite series of power functions.
Numerical Analysis –Interpolation
KFUPM SE301: Numerical Methods Topic 5: Interpolation Lectures 20-22:
Curve-Fitting Interpolation
Engineering Computation Curve Fitting: Interpolation 1
Curve-Fitting Polynomial Interpolation
Interpolation Used to estimate values between data points difference from regression - goes through data points no error in data points.
Curve Fitting and Interpolation: Lecture (II)
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 22 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW III.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 181 Interpolation Chapter 18 Estimation of intermediate.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 23 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 24 Regression Analysis-Chapter 17.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Interpolation Chapter 18.
Chapter 6 Numerical Interpolation
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 21 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 Least.
CpE- 310B Engineering Computation and Simulation Dr. Manal Al-Bzoor
Interpolation. Interpolation is important concept in numerical analysis. Quite often functions may not be available explicitly but only the values of.
Curve Fitting and Interpolation: Lecture (I)
Regression analysis Control of built engineering objects, comparing to the plan Surveying observations – position of points Linear regression Regression.
Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1.
Chapter 8 Curve Fitting.
Interpolation produces a function that matches the given data exactly. The function then can be utilized to approximate the data values at intermediate.
Lecture 22 Numerical Analysis. Chapter 5 Interpolation.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #15 Spline Interpolation.
KFUPM SE301: Numerical Methods Topic 5: Interpolation Lectures 20-22:
EE3561_Unit 5(c)AL-DHAIFALLAH14361 EE 3561 : Computational Methods Unit 5 : Interpolation Dr. Mujahed AlDhaifallah (Term 351) Read Chapter 18, Sections.
MA2213 Lecture 2 Interpolation.
Programme F6: Polynomial equations Worked examples and exercises are in the text STROUD PROGRAMME F6 POLYNOMIAL EQUATIONS.
5. Interpolation 5.1 Definition of interpolation. 5.2 Formulas for Interpolation. 5.3 Formulas for Interpolation for unequal interval. 5.4 Applications.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
Interpolation - Introduction
1 Approximating functions, polynomial interpolation (Lagrange and Newton’s divided differences) formulas, error approximations.
Curve-Fitting Spline Interpolation
Numerical Analysis Lecture 25.
Interpolation Estimation of intermediate values between precise data points. The most common method is: Although there is one and only one nth-order.
Chapter 18.
PROGRAMME F6 POLYNOMIAL EQUATIONS.
Reading Between the Lines
Interpolation.
Chapter 18.
Numerical Analysis Lecture 45.
Chapter 7 Numerical Differentiation and Integration
Today’s class Multiple Variable Linear Regression
MATH 2140 Numerical Methods
Spline Interpolation Class XVII.
Interpolasi Pertemuan - 7 Mata Kuliah : Analisis Numerik
Numerical Analysis Lecture 23.
Numerical Analysis Lecture 26.
MATH 174: Numerical Analysis
Numerical Computation and Optimization
Discrete Least Squares Approximation
Least Square Regression
9. Data Fitting Fitting Experimental Spectrum
SKTN 2393 Numerical Methods for Nuclear Engineers
Curve Fitting Filling in the gaps.
Numerical Analysis Lecture 24.
Interpolation with unequal intervals
Ax = b Methods for Solution of the System of Equations:
Approximation of Functions
Approximation of Functions
Presentation transcript:

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

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

Interpolation Polynomials Newton’s Divided Difference Lagrange Polynomials Gram’s polynomials (introduced earlier) Spline Interpolation: piecewise continuous, smoothing

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

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 ⋯ 𝑥 𝑛

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

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

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

Newton’s Divided Difference 𝑓 𝑥 0 , 𝑥 1 ,… 𝑥 𝑘−1 ,𝑥 = 𝑓 𝑥 0 , 𝑥 1 ,… 𝑥 𝑘−2 ,𝑥 −𝑓 𝑥 0 , 𝑥 1 ,… 𝑥 𝑘−2 , 𝑥 𝑘−1 𝑥− 𝑥 𝑘−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

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

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

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 , 𝑥 𝑘 𝑥 𝑖 − 𝑥 𝑘

Newton’s Divided Difference 𝑓 𝑥 𝑖 , 𝑥 𝑖+1 , … 𝑥 𝑘 = 𝑓 𝑥 𝑖 , 𝑥 𝑖+1 , … 𝑥 𝑘−1 −𝑓 𝑥 𝑖+1 ,… 𝑥 𝑘−1 , 𝑥 𝑘 𝑥 𝑖 − 𝑥 𝑘 = 𝑓 𝑥 𝑖+1 ,… 𝑥 𝑘−1 , 𝑥 𝑘 −𝑓 𝑥 𝑖 , 𝑥 𝑖+1 , … 𝑥 𝑘−1 𝑥 𝑘 −𝑥 𝑖 Or by reversing the order of x variables, 𝑓 𝑥 𝑘 , 𝑥 𝑘−1 , … 𝑥 𝑖 = 𝑓 𝑥 𝑘−1 ,… 𝑥 𝑖+1 , 𝑥 𝑖 −𝑓 𝑥 𝑘 , 𝑥 𝑘−1 , … 𝑥 𝑖+1 𝑥 𝑖 − 𝑥 𝑘 = 𝑓 𝑥 𝑘 , 𝑥 𝑘−1 , … 𝑥 𝑖+1 −𝑓 𝑥 𝑘−1 ,… 𝑥 𝑖+1 , 𝑥 𝑖 𝑥 𝑘 −𝑥 𝑖

Newton’s Divided Difference Examples: 𝑓 𝑥 𝑘 , 𝑥 𝑘−1 , … 𝑥 𝑖 = 𝑓 𝑥 𝑘 , 𝑥 𝑘−1 , … 𝑥 𝑖+1 −𝑓 𝑥 𝑘−1 ,… 𝑥 𝑖+1 , 𝑥 𝑖 𝑥 𝑘 −𝑥 𝑖 𝑘=1, 𝑖=0:𝑓 𝑥 1 , 𝑥 0 = 𝑓 𝑥 1 −𝑓 𝑥 0 𝑥 1 −𝑥 0 𝑘=2, 𝑖=1:𝑓 𝑥 2 , 𝑥 1 = 𝑓 𝑥 2 −𝑓 𝑥 1 𝑥 2 −𝑥 1 𝑘=2, 𝑖=0:𝑓 𝑥 2 , 𝑥 1 , 𝑥 0 = 𝑓 𝑥 2 , 𝑥 1 −𝑓 𝑥 1 , 𝑥 0 𝑥 2 −𝑥 0 𝑘=3, 𝑖=1:𝑓 𝑥 3 , 𝑥 2 , 𝑥 1 = 𝑓 𝑥 3 , 𝑥 2 −𝑓 𝑥 2 , 𝑥 1 𝑥 3 −𝑥 1 𝑘=3, 𝑖=0:𝑓 𝑥 3 , 𝑥 2 , 𝑥 1 , 𝑥 0 = 𝑓 𝑥 3 , 𝑥 2 , 𝑥 1 −𝑓 𝑥 2 , 𝑥 1 , 𝑥 0 𝑥 3 −𝑥 0

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)

Newton’s Divided Difference: Example 1 , -48 2 9 2 2 , -46 29 17 4, 12 80 5 , 92 𝑝 𝑥 =−48+ 2 𝑥−1 + 9 𝑥−1 𝑥−2 + 2 𝑥−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)

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 ⋯ 𝑥− 𝑥 𝑛

Newton’s Divided Difference 𝑓 𝑥 0 , 𝑥 1 ,… 𝑥 𝑘−1 ,𝑥 = 𝑓 𝑥 0 , 𝑥 1 ,… 𝑥 𝑘−2 ,𝑥 −𝑓 𝑥 0 , 𝑥 1 ,… 𝑥 𝑘−2 , 𝑥 𝑘−1 𝑥− 𝑥 𝑘−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

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 𝑓𝑜𝑟 𝑗=𝑖

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 𝑗≠𝑖 𝑛 𝑥− 𝑥 𝑗 𝑥 𝑖 − 𝑥 𝑗

Lagrange Polynomials: Linear

Lagrange Polynomials: Quadratic

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 𝑗≠𝑖 𝑛 𝑥− 𝑥 𝑗 𝑥 𝑖 − 𝑥 𝑗

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−5 +12 𝑥−1 𝑥−2 𝑥−5 4−1 4−2 4−5 +92 𝑥−1 𝑥−2 𝑥−4 5−1 5−2 5−4 =4 𝑥−2 𝑥−4 𝑥−5 − 23 3 𝑥−1 𝑥−4 𝑥−5 −2 𝑥−1 𝑥−2 𝑥−5 + 23 3 𝑥−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

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