Presentation is loading. Please wait.

Presentation is loading. Please wait.

MAT 4725 Numerical Analysis Section 3.1 Interpolation and the Lagrange Polynomial

Similar presentations


Presentation on theme: "MAT 4725 Numerical Analysis Section 3.1 Interpolation and the Lagrange Polynomial"— Presentation transcript:

1 MAT 4725 Numerical Analysis Section 3.1 Interpolation and the Lagrange Polynomial http://myhome.spu.edu/lauw

2 MCM Monday Non-class members are invited Please share! Office names and $100

3 HW 7b (d)

4 HW 7b (e)

5 Material Temperature

6

7 3.1 Goal Find a polynomial P(x) that passes through all the data points (x i,y i ), i=0,1,2,…,n Use P(x) to estimate the function values

8 A Simple Situation Suppose there are only 2 data points: (x 0,f(x 0 )), (x 1,f(x 1 )) Let us find a degree one poly. P(x) that passes through them.

9 A Simple Situation Suppose there are only 2 data points: (x 0,f(x 0 )), (x 1,f(x 1 )) Let us find a degree one poly. P(x) that passes through them Q: Why degree one?

10 A Simple Situation Suppose there are only 2 data points: (x 0,f(x 0 )), (x 1,f(x 1 )) Let us find a degree one poly. P(x) that passes through them Q: We know easier way to find a straight line through two points. Why the trouble?

11 In General… Suppose there are (n+1) data points: (x i,f(x i )) i=0,1,2,…,n Let us find a degree n poly. P(x) that passes through them

12 n-th Lagrange Interpolating Poly.

13 Example 1 Find the 2 nd Lagrange Polynomial P(x)

14 Example 1

15

16 Q: For what range will P(x) give good estimations?

17 Error Formula We will skip the error analysis (similar to Taylor poly.) We will see this again in section 4.1

18 Classwork 1, 2 Write a program to compute the 2nd Lagrange Polynomial INPUT: (x i,f(x i )) i=0,1,2 OUTPUT: P(x)

19 Remark #1 (x i,f(x i )) are passed into the program as two arrays: xx=[x 0,x 1,x 2 ], yy=[y 0,y 1,y 2 ] >xx:=array(0..2,[2, 2.5, 4]); yy:=array(0..2,[0.5, 0.4, 0.25]);

20 Hints Hints are provided in the handout.

21 Homework Download Homework from the web. Read the first 4 pages of 3.5 for Wednesday


Download ppt "MAT 4725 Numerical Analysis Section 3.1 Interpolation and the Lagrange Polynomial"

Similar presentations


Ads by Google