Graphics Programs Reference
In-Depth Information
Numerical Differentiation
5
Given the function f ( x ), compute d n f
dx n at given x
/
5.1
Introduction
Numerical differentiationdeals with the following problem: we are given the function
y
x k . The term “given”
meansthat weeither have an algorithm for computing the function,orpossess a
set of discrete datapoints ( x i ,
=
f ( x ) and wish to obtain oneofits derivatives at the point x
=
y i ), i
=
1
,
2
,...,
n . In either case, wehave access to a
,
finite number of ( x
y ) data pairsfromwhich to compute the derivative. If you suspect
by now that numerical differentiationis related to interpolation, youare right—one
meansoffinding the derivative istoapproximate the function locallybyapolynomial
and thendifferentiate it.Anequally effective tool is the Taylor series expansion of
f ( x ) about the point x k . The latter has the advantageofproviding us with information
about the error involvedinthe approximation.
Numerical differentiationis not a particularlyaccurate process. It suffersfrom
a conflict betweenroundoff errors(duetolimitedmachine precision) and errors
inherent in interpolation. For this reason, aderivativeofa function can neverbe
computedwith the same precisionas the functionitself.
5.2
Finite Difference Approximations
The derivation of the finite difference approximationsfor the derivatives of f ( x ) are
based on forward and backward Taylor series expansionsof f ( x ) about x ,such as
h 2
2!
h 3
3!
h 4
4!
hf ( x )
f ( x )
f ( x )
f (4) ( x )
f ( x
+
h )
=
f ( x )
+
+
+
+
+···
(a)
182
 
Search WWH ::




Custom Search