 Curve Fitting and Interpolation: Lecture (II)

Presentation on theme: "Curve Fitting and Interpolation: Lecture (II)"— Presentation transcript:

Curve Fitting and Interpolation: Lecture (II)
Chapter 5 Curve Fitting and Interpolation: Lecture (II) Dr. Jie Zou PHY 3320

Outline Interpolation: (2) Newton’s Divided-Difference Interpolating Polynomials Linear Interpolation (1st-order polynomial) Quadratic Interpolation (2nd-order polynomial) Nth-order polynomial interpolation (Lecture (III)) Dr. Jie Zou PHY 3320

Newton’s linear interpolation
Case: Two data points are available - {x0, f(x0)} and {x1, f(x1)}. Note: f(x)=the actual function Task: Determine the formula for the linear interpolating function f1(x). Note: f1(x) = the (approximating) interpolation polynomial; “1” indicates the order of the polynomial. Dr. Jie Zou PHY 3320

Linear interpolation formula: Derivation
Consider the similar triangles ADE and ABC: DE/AE=BC/AC, or Solving for f1(x) gives the Linear interpolation formula: Note: a1 represents the finite-divided-difference approximation of the first derivative, df(x)/d(x) or f’(x). Dr. Jie Zou PHY 3320

Example 5.6 Develop a linear interpolation formula for the function e0.5x using the values at x0 = 0 and x1 = 2, and use it to estimate the value of e0.5x at x = 1. Also, find the percent error in the interpolation. Dr. Jie Zou PHY 3320

Case: Three data points are available - {x0, f(x0)}, {x1, f(x1)}, and {x2, f(x2)}. Note: f(x)=the actual function Task: Determine the formula for the quadratic interpolating function, f2(x). Note: f2(x) = the (approximating) interpolation polynomial; “2” indicates the order of the polynomial. Dr. Jie Zou PHY 3320

Quadratic interpolation formula: Derivation
Assume the quadratic interpolation formula of the form: f2(x) = a0 + a1(x–x0) + a2(x–x0)(x-x1) Determine the coefficients a0, a1, and a2 using the data points: Since f2(x0)= f(x0) = a0, a0 = f (x0) Since f2(x1) = f(x1)= a0 + a1(x1 - x0), Since f2(x2) = f(x2) = a0 + a1(x2 - x0) + a2(x2 - x0)(x2 - x1), Finite-divided-difference approx. of f’’(x).

Example 5.7 Develop a quadratic interpolation formula for the function e0.5x using the values at x0, x1 = 2, and x2 = 4 and use it to estimate the value of e0.5x at x = 1. Also, check the percent error in the interpolation. Compare with the linear interpolation in Example 5.6. Dr. Jie Zou PHY 3320

Comparison Quadratic (2nd-order) interpolation Linear (1st-order) interpolation Note: The error usually decreases with an increase in the order of the polynomial, n. Dr. Jie Zou PHY 3320

Download ppt "Curve Fitting and Interpolation: Lecture (II)"

Similar presentations