sjut/mat210/interpolation/newton's divided difference 2013-14s2

16

Click here to load reader

Upload: john-ham

Post on 23-Jun-2015

184 views

Category:

Education


0 download

DESCRIPTION

Lecture slides based on Autar Kaw's Numerical Methods Section on Interpolation with Newton Divided Difference, http://nm.mathforcollege.com

TRANSCRIPT

Page 1: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

St. John's University of Tanzania

MAT210 NUMERICAL ANALYSIS2013/14 Semester II

INTERPOLATIONNewton Divided Difference

Kaw, Chapter 5.03

Page 2: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

MAT210 2013/14 Sem II 2 of 16

● Interpolation of functions● Approximating a complex or unknown function

with a simpler function– simpler function usually a polynomial

● Direct method● Solving n+1 simultaneous equations for an nth

order polynomial fit● Newton Divided Difference

● A combination of Taylor Series approximation and numerical differentiation

Introduction

Page 3: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

MAT210 2013/14 Sem II 3 of 16

Linear NDD from Taylor Series

f (x)= f (x0)+(x−x0) f ' (x0)+O ((Δ x)2)

f (x)≈ f (x0)+(x−x0)[ f (x1)− f (x0)

x1−x0]

⇒ f 1(x)=b0+b1(x−x0)

where b0= f (x0) ,b1=[ f (x1)− f (x0)

x1−x0]

Page 4: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

MAT210 2013/14 Sem II 4 of 16

Another perspective● For Linear Direct Method

● Equation has the slope-intercept form● For Newton Divided Difference

● Equation has the point-slope form● Methods are different, but equations are

simply different forms of the same line

f 1(x )=b0+b1(x−x0)=a0+a1 x

b0−b1 x0=a0, b1=a1

Page 5: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

MAT210 2013/14 Sem II 5 of 16

Example: Velocity

Page 6: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

MAT210 2013/14 Sem II 6 of 16

Linear

Page 7: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

MAT210 2013/14 Sem II 7 of 16

Find v(16)

● Two closest points t=15 and t=20

Same as Direct

Same as Direct

Page 8: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

MAT210 2013/14 Sem II 8 of 16

Quadratic

Page 9: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

MAT210 2013/14 Sem II 9 of 16

NDD Quadratic● Just include another point and add another

term to the linear NDD

● b0 and b1 unchanged

f 2(x )=b0+b1(x−x0)+b2(x−x0)(x−x1)

b2=

f (x2)− f (x1)

x2−x1

−f (x1)− f (x0)

x1−x0

x2−x0

Page 10: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

MAT210 2013/14 Sem II 10 of 16

Now apply Forward Difference Approximations for f '(x

1) and f '(x

0)

Whence b2?

● b2 is simply the coefficient of the O((Δx)²) term of the Taylor Series!

b2≈12

f ' ' (x0)≈f ' (x1)− f ' (x0)

2Δ xHow?b2=

f (x2)− f (x1)

x2−x1

−f (x1)− f (x0)

x1−x0

x2−x0

Page 11: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

MAT210 2013/14 Sem II 11 of 16

Quadratic v(16) ● Use t=10,15,20 as before

Same as Direct

Page 12: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

MAT210 2013/14 Sem II 12 of 16

The Error is the Error● The equations are the same, just found in

different ways and kept in different forms

|ϵa|=| vquadratic−v linear

vquadratic|

Same as Direct

Page 13: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

MAT210 2013/14 Sem II 13 of 16

So What?● If Newton's Divided Difference produces

that same result as Direct, then why use it?● Isn't a matrix inversion easier?● Not really

● For Direct, each level is a new calculation, a new inversion. Doing an inversion many times is not efficient

● For NDD, each level builds on the last

Page 14: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

MAT210 2013/14 Sem II 14 of 16

General Form

The divided differences are calculated recursivelyThis is more efficient

Page 15: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

MAT210 2013/14 Sem II 15 of 16

The Big Picture

The process is a sequence of simple equations

Page 16: SJUT/Mat210/Interpolation/Newton's Divided Difference  2013-14S2

MAT210 2013/14 Sem II 16 of 16

Going Deeper● This is an example of using multiple criteria

to evaluate a method● Accuracy and Efficiency … one is not enough

● The velocity is not all you have● Calculate the acceleration at t=16s in the linear,

quadratic and cubic cases. – Estimate the accuracy

● Calculate the distance traveled from 15s to 20s in each case– Estimate the accuracy