Numerical Differentiation Chapter 23
Download
Report
Transcript Numerical Differentiation Chapter 23
Chapter 23
1
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Numerical Differentiation
Chapter 23
• Notion of numerical differentiation has been
introduced in Chapter 4. In this chapter more
accurate formulas that retain more terms will
be developed.
2
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
High Accuracy Differentiation
Formulas
• High-accuracy divided-difference formulas can be
generated by including additional terms from the
Taylor series expansion.
f ( xi ) 2
h
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)
h
O
(
h
)
2
h
2h
f ( xi 2 ) 4 f ( xi 1 ) 3 f ( xi )
f ( xi)
O(h 2 )
2h
f ( xi 1 ) f ( xi ) f ( xi )h
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
3
• Inclusion of the 2nd derivative term has
improved the accuracy to O(h2).
• Similar improved versions can be developed
for the backward and centered formulas as
well as for the approximations of the higher
derivatives.
4
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
• A third approach, based on Richardson
extrapolation, uses two derivative estimates t
compute a third, more accurate approximation.
5
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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). The application of this formula yield a
new derivative estimate of O(h4).
6
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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
x is the value at which you want to estimate the
derivative.
7
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Derivatives and Integrals for Data with
Errors
Figure 23.5
8
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.