Uploaded by Israel AIDOO

backward divided difference

advertisement
Backward Divided Difference
Topic: Differentiation
Major: General Engineering
Authors: Autar Kaw, Sri Harsha Garapati
5/21/2008
http://numericalmethods.eng.usf.edu
1
Definition
lim f ( x ) − f ( x − Δx )
f ′( x ) =
Δx → 0
Δx
.
Slope at xi
y
f(x)
xi
2
x
http://numericalmethods.eng.usf.edu
Backward Divided Difference
f (x ) − f (x − Δx )
f ′( x ) ≅
Δx
f (x)
x − Δx
3
x
f (x i ) − f (x i − Δ x )
f ′( x i ) ≅
Δx
x
http://numericalmethods.eng.usf.edu
Example
Example:
The velocity of a rocket is given by
ν (t ) = 2000
⎡
⎤
14 × 10 4
ln ⎢
⎥ − 9 . 8 t , 0 ≤ t ≤ 30
4
×
−
t
14
10
2100
⎣
⎦
where ν given in m/s and t is given in seconds. Use backward difference approximation
Of the first derivative of
ν(t )
Δt = 2s.
Solution:
a (ti ) ≅
to calculate the acceleration at t
= 16s. Use a step size of
ν (ti ) −ν (ti −1 )
Δt
ti = 16
4
http://numericalmethods.eng.usf.edu
Example (contd.)
Δt = 2
ti −1 = ti − Δt = 16 − 2 = 14
a (16 ) =
ν (16 ) −ν (14 )
2
⎡
⎤
14 ×10 4
ν (16) = 2000 ln ⎢
⎥ − 9.8(16) = 392.07m / s
4
(
)
14
×
10
−
2100
16
⎣
⎦
⎡
⎤
14 ×10 4
= 334.24m / s
ν (14) = 2000 ln ⎢
⎥ − 9.8(14)
4
⎣14 ×10 − 2100(14) ⎦
5
http://numericalmethods.eng.usf.edu
Example (contd.)
Hence
a(16) =
ν (16) −ν (14)
2
The exact value of
= 392.07 − 334.24 = 28.915m / s 2
a(16) can be calculated by differentiating
⎡
⎤
14 × 10 4
ν (t ) = 2000 ln ⎢
⎥ − 9.8t
4
⎣14 × 10 − 2100t ⎦
as
d
[ν (t )] = − 4040 − 29.4t
dt
− 200 + 3t
a(16) = 29.674m / s 2
a(t ) =
6
http://numericalmethods.eng.usf.edu
Example (contd.)
The absolute relative true error is
εt =
TrueValue − ApproximateValue
×100
TrueValue
29.674 − 28.915
×100
29.674
= 2.557%
=
7
http://numericalmethods.eng.usf.edu
Effect Of Step Size
f ( x ) = 9e
Value of
h
0.05
0.025
0.0125
0.00625
0.003125
0.001563
0.000781
0.000391
0.000195
9.77E-05
4.88E-05
8
4x
f ' (0.2) Using backward Divided difference method.
f ' (0.2)
72.61598
76.24376
78.14946
79.12627
79.62081
79.86962
79.99442
80.05691
80.08818
80.10383
80.11165
Ea
3.627777
1.905697
0.976817
0.494533
0.248814
0.124796
0.062496
0.031272
0.015642
0.007823
εa %
4.758129
2.438529
1.234504
0.62111
0.311525
0.156006
0.078064
0.039047
0.019527
0.009765
Significant
digits
1
1
1
1
2
2
2
3
3
3
Et
εt %
7.50349
3.87571
1.97002
0.99320
0.49867
0.24985
0.12506
0.06256
0.03129
0.01565
0.00782
9.365377
4.837418
2.458849
1.239648
0.622404
0.31185
0.156087
0.078084
0.039052
0.019529
0.009765
http://numericalmethods.eng.usf.edu
Effect of Step Size in Backward
Divided Difference Method
f'(0.2)
95
Initial step size=0.05
85
75
1
3
5
7
9
11
Num ber of tim es the step size is halved, n
9
http://numericalmethods.eng.usf.edu
Effect of Step Size on
Approximate Error
Initial step size=0.05
4
Ea
3
2
1
0
1
3
5
7
9
11
Num ber of steps involved, n
10
http://numericalmethods.eng.usf.edu
Effect of Step Size on Absolute
Relative Approximate Error
Initial step size=0.05
5
|Ea|,%
4
3
2
1
0
0
1
2
3
4
5
6
7
8
9
10
11
12
Num ber of steps involved, n
11
http://numericalmethods.eng.usf.edu
Effect of Step Size on Least
Number of Significant Digits
Correct
Least number of significant
digits correct
Initial step size=0.05
3.5
3
2.5
2
1.5
1
0.5
0
1
2
3
4
5
6
7
8
9
10
11
Num ber of steps involved, n
12
http://numericalmethods.eng.usf.edu
Et
Effect of Step Size on True Error
8
7
6
5
4
3
2
1
0
Initial step size=0.05
0
2
4
6
8
10
12
Num ber of steps involved, n
13
http://numericalmethods.eng.usf.edu
Effect of Step Size on Absolute
Relative True Error
Initial step size=0.05
10
9
8
|Et| %
7
6
5
4
3
2
1
0
1
2
3
4
5
6
7
8
9
10
11
Num ber of steps involved, n
14
http://numericalmethods.eng.usf.edu
Download