Presentation is loading. Please wait.

Presentation is loading. Please wait.

Interpolation Used to estimate values between data points difference from regression - goes through data points no error in data points.

Similar presentations


Presentation on theme: "Interpolation Used to estimate values between data points difference from regression - goes through data points no error in data points."— Presentation transcript:

1 Interpolation Used to estimate values between data points difference from regression - goes through data points no error in data points

2 Most common method is polynomial interpolation Given n+1 data points, a unique n th order polynomial fits them. Polynomial interpolation determines a’s of this polynomial A number of methods

3 Newton divided difference interpolating polynomials Start with linear interpolation

4 x0x0 xx1x1 f(x 0 ) f 1 (x) f(x 1 ) From similar triangles

5 Can rearrange to get linear interpolation formula Example: Interpolate exp(2) using 1) exp(1) and exp(6) and 2) exp(1.5) and exp (2.5) 1) 2)

6 Quadratic interpolation - need three points Use parabola This is the same as with

7 To get b’s 1) set x=x 0 in quadratic 2) use b 0 and x=x 1 in quadratic

8 3) use b 0 and b 1 and x=x 2 b 0 is a constant (0th order) b 1 gives slope (finite difference) b 2 give curvature (difference of finite differences)

9 Example: interpolate exp(2) using exp(1), exp(3) and exp(4)

10 Example: interpolate exp(2) using exp(1), exp(1.5) and exp(2.5)

11 General form for Newton’s interpolating polynomials Bracketed functions are finite differences

12 First finite difference Second finite difference The difference of two finite differences

13 The nth finite difference An interative proceedure 1) make all first order finite differences; save f(x 0 ) for b 0 2) make second order from firsts; save f[x 1,x 0 ] for b 1 3) continue to nth order, saving needed ones

14 Example: estimate exp(2) using 6 points - 0,1, 3, 4, 5, 6 Do first differences, get b 1

15 Use firsts to get seconds and save b 2

16 Use seconds to get thirds and get b 3

17 Use thirds to get fourths and b 4 Use fourths to get the fifth finite difference and b 5

18 So

19 Blow up

20 Error for Newton’s polynomial - estimate from Thinking of interpolation like a Taylor series

21 Example: use exp(2.5)=12.18 Calculate

22 Matlab code Excel code


Download ppt "Interpolation Used to estimate values between data points difference from regression - goes through data points no error in data points."

Similar presentations


Ads by Google