Lecture5 Newton Divided DifferenceBUE
-
Upload
tarek-hassan -
Category
Documents
-
view
214 -
download
0
Transcript of Lecture5 Newton Divided DifferenceBUE
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 1/22
Week Date Topic Classification of Topic
1 9 Feb. 2010 Introduction toNumerical Methods
and Type of Errors
Measuring errors, Binary representation,Propagation of errors and Taylor series
2 14 Feb. 2010 Nonlinear Equations Bisection Method
3 21 Feb. 2010 Newton-Raphson Method
4 28 Feb. 2010 Interpolation Lagrange Interpolation
5 7 March 2010 Newton's Divided Difference Method
6 14 March 2010 Differentiation Newton's Forward and BackwardDivided Difference
7 21 March 2010 Regression Least squares
8 28 March 2010 Systems of Linear
Equations
Gaussian Jordan
9 11 April 2010 Gaussian Seidel
10 18 April 2010 Integration Composite Trapezoidal and SimpsonRules
11 25 April 2010 Ordinary Differential
Equations
Euler's Method
12 2 May2010 Runge-Kutta 2nd and4th order Method
Schedule
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 2/22
Interpolation
Newton’s Divided Difference
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 3/22
What is Interpolation ?
Given (x0,y0), (x1,y1), …… (xn,yn), find thevalue of ‘y’ at a value of ‘x’ that is not given.
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 4/22
Interpolants
Polynomials are the most commonchoice of interpolants because they
are easy to:
Evaluate
Differentiate, andIntegrate.
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 5/22
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 6/22
Newton’s Divided Difference
Method: Given pass aLinear interpolation
linear interpolant through the data
where
),,( 00 y x ),,( 11 y x
)()( 0101 x xbb x f
)( 00 x f b
01
011
)()(
x x
x f x f b
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 7/22
ExampleThe upward velocity of a rocket is given as a function of
time in Table 1. Find the velocity at t=16 seconds usingthe Newton Divided Difference method for linearinterpolation.
t v(t)
s m/s
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
Table 1: Velocity as afunction of time
Figure 2: Velocity vs. time data
for the rocket example
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 8/22
Linear Interpolation
10 12 14 16 18 20 22 24350
400
450
500
550517.35
362.78
y s
f ran g e( )
f x desired
x s1
10x s0
10 x s range x desired
1520
78.36235.517
,150 t 78.362)( 0 t v
,201 t 35.517)( 1 t v
)( 00 t vb 78.362
01
011
)()(
t t
t vt vb
)tt( b b)t(v 0101
914.30
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 9/22
Linear Interpolation (contd)
10 12 14 16 18 20 22 24350
400
450
500
550517.35
362.78
y s
f range( )
f x desired
x s1
10x s0
10 x s range x desired
)tt( b b)t(v 0101
),15(914.3078.362 t 2015 t
At 16t
)1516(914.3078.362)16( v
69.393 m/s
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 10/22
Quadratic Interpolation
Given ),,( 00 y x ),,( 11 y x and ),,( 22 y x fit a quadratic interpolant through the data.
))(()()( 1020102 x x x xb x xbb x f
)( 00 x f b
01
01
1
)()(
x x
x f x f b
02
01
01
12
12
2
)()()()(
x x
x x
x f x f
x x
x f x f
b
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 11/22
ExampleThe upward velocity of a rocket is given as a function of time in Table 1. Find the velocity at t=16 seconds usingthe Newton Divided Difference method for quadraticinterpolation.
t v(t)
s m/s
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
Table 1: Velocity as afunction of time
Figure 2: Velocity vs. time data
for the rocket example
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 12/22
Quadratic Interpolation (contd)
10 12 14 16 18 20200
250
300
350
400
450
500
550517.35
227.04
y s
f range( )
f x desired
2010 x s range x desired
,100 t 04.227)( 0 t v
,151 t 78.362)( 1 t v
,202 t 35.517)( 2 t v
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 13/22
Quadratic Interpolation (contd)
)( 00 t vb
04.227
01
01
1
)()(
t t
t vt vb
1015
04.22778.362
148.27
02
01
01
12
12
2
)()()()(
t t
t t
t vt v
t t
t vt v
b
1020
1015
04.22778.362
1520
78.36235.517
10
148.27914.30
37660.0
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 14/22
Quadratic Interpolation (contd)
)tt)(tt( b)tt( b b)t(v 1020102
),15)(10(37660.0)10(148.2704.227 t t t 2010 t
At ,16t
)16(v2 )1516)(1016(37660.0)1016(148.2704.227
19.392 m/s
The absolute relative approximate error a obtained between the results from the first
order and second order polynomial is
a 100x19.392
69.39319.392
= 0.38502 %
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 15/22
General Form
))(()()( 1020102 x x x xb x xbb x f
where
Rewriting
))(](,,[)](,[][)( 1001200102 x x x x x x x f x x x x f x f x f
)(][ 000 x f x f b
01
01
011
)()(],[
x x
x f x f x x f b
02
01
01
12
12
02
01120122
)()()()(
],[],[],,[
x x
x x
x f x f
x x
x f x f
x x
x x f x x f x x x f b
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 16/22
General Form
Given )1( n data points, nnnn y x y x y x y x ,,,,......,,,, 111100 as
))...()((....)()( 110010 nnn x x x x x xb x xbb x f
where
][ 00 x f b
],[ 011 x x f b
],,[ 0122 x x x f b
],....,,[ 0211 x x x f b nnn
],....,,[ 01 x x x f b nnn
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 17/22
General formThe third order polynomial, given ),,( 00 y x ),,( 11 y x ),,( 22 y x and ),,( 33 y x is
)xx)(xx)(xx](x,x,x,x[f
)xx)(xx](x,x,x[f )xx](x,x[f ]x[f )x(f
2100123
1001200103
0b
0 x )( 0 x f 1
b
],[ 01 x x f 2b
1 x )( 1 x f ],,[ 012 x x x f 3b
],[ 12 x x f ],,,[ 0123 x x x x f
2 x )( 2 x f ],,[ 123 x x x f
],[ 23 x x f
3
x )(3
x f
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 18/22
Example
The upward velocity of a rocket is given as a function of time in Table 1. Find the velocity at t=16 seconds usingthe Newton Divided Difference method for cubicinterpolation.
t v(t)
s m/s
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
Table 1: Velocity as afunction of time
Figure 2: Velocity vs. time data
for the rocket example
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 19/22
Example
The velocity profile is chosen as
)tt)(tt)(tt( b)tt)(tt( b)tt( b b)t(v 21031020103
we need to choose four data points that are closest to 16
t ,100 t 04.227)( 0 t v
,151 t 78.362)( 1 t v
,202 t 35.517)( 2 t v
,5.223 t 97.602)( 3 t v
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 20/22
Example
b0 = 227.04; b1 = 27.148; b2 = 0.37660; b3 = 5.4347*10-3
0b
100 t 04.227 1b
148.27 2b
,151 t 78.362 37660.0 3b
914.30 3104347.5 x
,202 t 35.517 44453.0
248.34
,5.223 t 97.602
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 21/22
Example
Hence))()(())(()()(
2103102010 t t t t t t bt t t t bt t bbt v
)20)(15)(10(10*4347.5
)15)(10(37660.0)10(148.2704.227
3
t t t
t t t
At ,16
t
)2016)(1516)(1016(10*4347.5
)1516)(1016(37660.0)1016(148.2704.227)16(
3
v
06.392 m/s
The absolute relative approximate error a obtained is
a 100x06.392
19.39206.392
= 0.033427 %
8/14/2019 Lecture5 Newton Divided DifferenceBUE
http://slidepdf.com/reader/full/lecture5-newton-divided-differencebue 22/22
Comparison Table
Order of
Polynomial
1 2 3
v(t=16)
m/s
393.69 392.19 392.06
Absolute Relative
Approximate Error
---------- 0.38502 % 0.033427 %