Download presentation

Presentation is loading. Please wait.

1
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 23 CURVE FITTING Chapter 18 Function Interpolation and Approximation

2
Lagrange Interpolating Polynomials Reformulation of Newton’s Polynomials Avoid Calculation of Divided Differences xf(x) xoxo f(x o ) x1x1 f(x 1 ) x2x2 f(x 2 ) …… xnxn f(x n )

3
Lagrange Interpolating Polynomial Cardinal Functions: Product of n-1 linear factors Skip x i Property:

4
Example Write cardinal functions and give the Lagrange interpolating polynomial for

5
Other Methods Direct Evaluation n+1 coefficients n+1 Data Points Interpolating Polynomial should represent them exactly

6
Other Methods Direct Evaluation

7
Other Methods Solve Using any of the methods we have learned

8
Other Methods Not the most efficient method Ill-conditioned matrix (nearly singular) If n is large highly inaccurate coefficients Limit to lower order polynomials

9
Inverse Interpolation Xr=? Yr=Given

10
Xr=? Switch x and y and then interpolate? Not a Good Idea! Yr=Given

11
Inverse Interpolation Fit and n th order polynomial to x, f(x) data Solve Equation Xr=? Yr=Given

12
Errors in Polynomial Interpolation It is expected that as number of nodes increases, error decreases, HOWEVER…. At all interpolation nodes x i Error=0 At all intermediate points Error: f(x)-f n-1 (x) f(x)

13
Errors in Polynomial Interpolation Beware of Oscillations…. For Example: Consider f(x)=(1+x 2 ) -1 evaluated at 9 points in [-5,5] And corresponding p 8 (x) Lagrange Interpolating Polynomial P 8 (x) f(x)

14
Splines

15
Piecewise smooth polynomials

17
E.G Quadratic Splines Function Values at adjacent polynomials are equal at interior nodes

18
E.G Quadratic Splines First and Last Functions pass through end points

19
E.G Quadratic Splines First Derivatives at Interior nodes are equal

20
E.G Quadratic Splines Assume Second Derivative @ First Point=0

21
E.G Quadratic Splines Assume Second Derivative @ First Point=0 Solve 3nx3n system of Equations

22
Spline Interpolation Polynomial Interpolation Spline Interpolation Polynomial Interpolation

Similar presentations

© 2019 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google