ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 21 CURVE FITTING Chapter 18 Function Interpolation and Approximation
Curve Fitting Often we are faced with the problem… what value of y corresponds to x=0.935?
Curve Fitting Question 1 : Is it possible to find a simple and convenient formula that reproduces the points exactly? e.g. Straight Line ? …or smooth line ? …or some other representation? Interpolation
Curve Fitting Question 2 : Is it possible to find a simple and convenient formula that represents data approximately ? e.g. Best Fit ? Approximation
Function Interpolation Linear Interpolation Simplest Form is to connect data points with a straight line (1 st Order Polynomial) x
Function Interpolation STEPS xixi x i+1 Locate Interval x i < x < x i+1 Determine Values f(x i ), f(x i+1 ) f(x i ) f(x i+1 )
Function Interpolation STEPS f(x i ) f(x i+1 ) xixi x i+1 x f 1 (x)
Linear Interpolation Slope of Line 1 st DIVIDED DIFFERENCE f [x i+1,x i ] First order interpolating polynomial
Example what value of y corresponds to x=0.935? Interval: x i = , x i+1 = Values: f(x i )= , f(x i+1 )=
Function Interpolation Quadratic Interpolation Better Accuracy if 2 nd Order Polynomial x
Function Interpolation
How to Determine Coefficients b 0 0
Function Interpolation How to Determine Coefficients b 0
Function Interpolation How to Determine Coefficients b
Function Interpolation
2 nd DIVIDED DIFFERENCE
2 nd Order Interpolating Polynomial
General Form of Newton’s Interpolating Polynomials
EXAMPLE