Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
NUMERICAL
INTEGRATION &
DIFFERENTIATION :
NUMERICAL
DIFFERENTIATION
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 5
HIGH ACCURACY
DIFFERENTIATION
FORMULAS
f ( x ) f ( x ) f ( x )h
h
i 1
2
f ( xi 1 ) f ( xi ) f ( xi )
f ( xi )
h O(h 2 )
h
2
f ( xi 2 ) 2 f ( xi 1 ) f ( xi )
f ( xi )
O ( h)
2
h
f ( xi 1 ) f ( xi ) f ( xi 2 ) 2 f ( xi 1 ) f ( xi )
2
f ( xi )
O
(
h
)
2
h
2h
f ( xi 2 ) 4 f ( xi 1 ) 3 f ( xi )
f ( xi )
O(h 2 )
2h
First Derivative
Forward finite divided difference
f ( xi 2 ) 4 f ( xi 1 ) 3 f ( xi )
f ' ( xi )
2h
Error : O(h 2 )
Error : O(h 2 )
Chapter 5
Error : O(h 4 )
3
Example 1
Estimated the derivative of
Chapter 5
RICHARDSON
EXTRAPOLATION
There are two ways to improve
derivative estimates when
employing finite divided differences:
Decrease the step size, or
Use a higher-order formula that employs
more points.
Chapter 5
1
I I (h2 )
[ I (h2 ) I (h1 )]
2
(h1 / h2 ) 1
h2 h1 / 2
4
1
I I (h2 ) I (h1 )
3
3
4
1
D D(h2 ) D(h1 )
3
3
For centered difference approximations
with O(h2).
f ( xi 1 ) f ( xi 1 )
D(h) f ' ( xi )
2h
by Lale Yurttas, Texas
A&M University
Chapter 5
Example 2
Estimated the first derivative of
Chapter 5
DERIVATIVES OF
UNEQUALLY SPACED DATA
Data from experiments or field studies are often
collected at unequal intervals. One way to
handle such data is to fit a second-order
Lagrange interpolating polynomial.
f ( x) f ( xi 1 )
f ( xi 1 )
2 x xi xi 1
2 x xi 1 xi 1
f ( xi )
xi 1 xi xi 1 xi 1
xi xi 1 xi xi 1
2 x xi 1 xi
xi 1 xi 1 xi 1 xi
Chapter 5
Example 3
The heat flux at the soil-air interface
can be computed with Fouriers law,
dT
q ( z 0) kC
dz
z 0
Chapter 23