Beruflich Dokumente
Kultur Dokumente
f x x f x
f x
x
Forward Difference Approximation of
the First Derivative:
Graphical Representation:
f(x)
x x+x
Example:
The velocity of a rocket is given by
14 104
t 2000 ln 9.8t ,0 t 30
14 10 2100t
4
18 16
a16
2
Solution:
(a) acceleration at t=16sec
14 10 4
18 2000 ln 9.818 453.02m/s
14 10 210018
4
14 104
16 2000 ln 9.816 392.07m/s
14 10 210016
4
Hence
18 16 453.02 392.07
a16 30.474m/s 2
2 2
Solution:
(b) exact value of the acceleration
a t t
d
dt
14 104 2100t d 14 104
2000 9.8
14 10 4
dt 14 10 2100t
4
14 104 2100t 4
1 2100 9.8
14 10
2000
14 10 4
14 104 2100t 2
4040 29.4t
200 3t
4040 29.416
a 16 29.674m/s 2
200 316
Solution:
(b) the absolute relative true error.
29.674 30.474
x100
29.674
2.6967%
f x x f x
f x
x
f x x f x f x f x x
f x
x x
Example:
The velocity of a rocket is given by
14 104
t 2000 ln 9.8t ,0 t 30
14 10 2100t
4
16 14
a16
2
Solution:
(a) acceleration at t=16sec
14 10 4
16 2000 ln 9.816 392.07m/s
14 10 210016
4
14 104
14 2000 ln 9.814 334.24m/s
14 10 210014
4
16 14 392.07 334.24
a16 28.915m/s 2
2 2
Solution:
(b) exact value of the acceleration
4040 29.416
a 16 29.674m/s 2
200 316
f xi
f xi 1 f xi f xi x x 2
2!
f xi 1 f xi f xi
f x i x
x 2!
f xi 1 f xi
f x i 0x
x
Derive the central difference
approximation from Taylor series:
f xi
x 2 f xi x 3
f xi 1 f xi f xi x
2! 3!
f xi
x 2 f xi x 3
f xi 1 f xi f xi x
2! 3!
x
x-x x x+x
Example:
The velocity of a rocket is given by
14 104
t 2000 ln 9.8t ,0 t 30
14 10 2100t
4
ti 1 ti 1
ati
2t
ti 1 ti t ti 1 ti t
ti 16 t 2 16 2
16 2
18 14
18 14 18 14
a16
22 4
Solution:
(a) acceleration at t=16sec
14 10 4
18 2000 ln 9.818 453.02m/s
14 10 210018
4
14 104
14 2000 ln 9.814 334.24m/s
14 10 210014
4
18 14 453.02 334.24
a16 29.694m/s 2
4 4
Solution:
(b) exact value of the acceleration
4040 29.416
a 16 29.674m/s 2
200 316
29.674 29.694
t 100 0.069157%
29.674
Comparison of FDD, BDD, CDD:
Type of
Difference a16 m / s 2 t %
Approximation
Forward 30.475 2.6967
Backward 28.915 2.5584
Central 29.695 0.069157
Finding the value of the derivative within a
prespecified tolerance:
So how would one know how accurately they
have found the value of the derivative.
A simple way would be to start with a step
size and keep on halving the step size and
keep on halving the step size until the
absolute relative approximate error is within
a pre-specified tolerance.
Example:
Using BDD
14 104
t 2000 ln 9.8t ,0 t 30
14 10 2100t
4
t v t a %
2 28.915
1 29.289 1.2792
0.5 29.480 0.64787
0.25 29.577 0.32604
0.125 29.625 0.16355
Finite Difference Approximation of
Higher Derivatives (using Taylors thm):
f xi
2x 2 f xi 2x 3
f x f x f x 2x
i2 i i
2! 3!
f xi f xi
f xi 1 f xi f xi x x
2
x 3
2! 3!
f xi 2 2 f xi 1 f xi f xi x 2 f xi x 3
f xi 2 2 f xi 1 f xi
f xi 0x
x 2
Example:
The velocity of a rocket is given by
14 104
t 2000 ln 9.8t ,0 t 30
14 10 2100t
4
ti 1 ti t ti 2 ti 2t
ti 16 t 2 16 2 16 22
18 20
20 2 18 16
j 16
22
Solution:
(a) second derivative at t=16sec
14 10 4
20 2000 ln 9.820 517.35m/s
14 10 210020
4
14 10 4
18 2000 ln 9.818 453.02m / s
14 10 210018
4
14 10 4
16 2000 ln 9.816 392.07m/s
14 10 210016
4
j t
d
at 18000 2
dt ( 200 3t )
j 16
18000
0 .77909m/s 3
[200 3(16)]2
2! 3! 4!
f xi 1 f xi 1 2 f xi f xi x f xi
2 x 4
12
f x i 1 2 f x i f x i 1
f xi 2
0 x
x 2
Example:
The velocity of a rocket is given by
14 104
t 2000 ln 9.8t ,0 t 30
14 10 2100t
4
18 2 16 14
j 16
2 2
Solution:
(a) second derivative at t=16sec
14 10 4
18 2000 ln 9.818 453.02m/s
14 10 210018
4
14 10 4
16 2000 ln 9.816 392.07m/s
14 10 210016
4
14 10 4
14 2000 ln 9.814 334.24m/s
14 10 210014
4
j 16
18000
0.77909m/s 3
[200 3(16)]2
f x x f x
f x
x
Example:
The velocity of a rocket is given as a
function of time
t v(t)
s m/s
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
v15 362.78 a0 a1 15 a2 15 a3 15
2 3
v20 517.35 a0 a1 20 a2 20 a3 20
2 3
Hence
vt a0 a1t a2t 2 a3t 3
4.3810 21.289t 0.13065t 2 0.0054606t 3 , 10 t 22.5
Solution:
The acceleration at t=16 is given by
t 4.3810 21.289t 0.13065t 2 0.0054606t 3 ,10 t 22.5
29.664m/s 2
Lagrange Polynomials:
Using interpolation, find the polynomial
n
fn ( x) Li ( x ) f ( xi )
i 0
f2 x
x x1 x x2 f x x x0 x x2 f x x x0 x x1 f x
x0 x1 x0 x2 0 x1 x0 x1 x2 1 x2 x0 x2 x1 2
f 2 x f x0 f x1 f x2
2 2 2
x0 x1 x0 x2 x1 x0 x1 x2 x2 x0 x2 x1
Example:
The velocity of a rocket is given as a
function of time t v(t)
s m/s
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
Find the acceleration of the rocket at
t=16sec using second order Lagrangian
polynomial interpolation for velocity .
Solution:
t t1 t t 2 t t 0 t t 2 t t 0 t t1
v(t ) v(t 0 ) v(t1 ) v(t 2 )
t 0 t1 t 0 t 2 t1 t 0 t1 t 2 t 2 t 0 t 2 t1
2t t1 t 2 2t t 0 t 2 2t t0 t1
at t t1 t t t t t2
t 0 t1 t 0 t 2 0 t1 t 0 t1 t 2 2 0 2 1
29.784m/s 2
The Calculus Seven, by Louies Leithold
Holistic Numerical Methods Institute by Autar
Kaw and Charlie Barker.
Numerical Methods for Engineers by Chapra
and Canale