sjut/mat210/interpolation/newton's divided difference 2013-14s2
DESCRIPTION
Lecture slides based on Autar Kaw's Numerical Methods Section on Interpolation with Newton Divided Difference, http://nm.mathforcollege.comTRANSCRIPT
St. John's University of Tanzania
MAT210 NUMERICAL ANALYSIS2013/14 Semester II
INTERPOLATIONNewton Divided Difference
Kaw, Chapter 5.03
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
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]
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
MAT210 2013/14 Sem II 5 of 16
Example: Velocity
MAT210 2013/14 Sem II 6 of 16
Linear
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
MAT210 2013/14 Sem II 8 of 16
Quadratic
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
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
MAT210 2013/14 Sem II 11 of 16
Quadratic v(16) ● Use t=10,15,20 as before
Same as Direct
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
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
MAT210 2013/14 Sem II 14 of 16
General Form
The divided differences are calculated recursivelyThis is more efficient
MAT210 2013/14 Sem II 15 of 16
The Big Picture
The process is a sequence of simple equations
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