Module for Numerical Differentiation, Part I
Check out the new Numerical Analysis Projects page.
Background. Numerical
differentiation formulas formulas can be derived by first
constructing the Lagrange interpolating
polynomial
through three points, differentiating the Lagrange polynomial, and
finally evaluating
at
the desired point. The truncation error will be
investigated, but round off error from computer arithmetic using
computer numbers will be studied in another lab.
Three point rule for
. The
centered formula for the first derivative, based on three
points is
,
and the error bound is
where
.
Proof
of the Three point rule for f
'
Big "O" error term for
.
.
Three point rule for
. The
centered formula for the second derivative, based on three points
is
,
and the error bound is
where
.
Proof
of the Three point rule for f
''
Big "O" error term for
.
.
Animations (Numerical
Differentiation Numerical
Differentiation). Internet
hyperlinks to animations.
Project
I. Investigate the numerical differentiation
formula
and
error bound
where
. The
truncation error is investigated. The round off error from
computer arithmetic using computer numbers will be studied in another
module.
Enter the three point formula for numerical differentiation.
Aside. From a
mathematical standpoint, we expect that the limit of the difference
quotient is the derivative. Such is the case, check it out.
Enter the function, use
.
Example
1. Find the formula for the third
derivative
.
Use
.
Example
2. Graph
. Find
the bound
. Look
at a graph and estimate the value
,
be sure to take the absolute value if necessary.
Example 3
(a). Compute numerical approximations for the
derivative
, using
step sizes
.
3 (b). Compute
numerical approximations for the derivatives
, using
step sizes
.
3 (c). Plot the
numerical approximation
over the interval
. Compare
it with the graph of
over
the interval
.
Example
4. Plot the absolute
error
over
the interval
, and
estimate the maximum absolute error over the interval.
4 (a). Compute the
error bound
and
observe that
over
.
4 (b). Since we the
function f[x] and its derivative is well known, and we have
the graph for
, we
can observe that the maximum error on the given interval occurs at
x=0. Thus we can do better that "theory", we see that
over
.
Example
5. Investigate the behavior
of
. If
the step size is reduced by a factor of
then
the error bound is reduced by
. This
is the
behavior.
Project
II. Investigate the numerical differentiation
formulae
and
error bound
where
. The
truncation error is investigated. The round off error from
computer arithmetic using computer numbers will be studied in another
module.
Enter the formula for numerical differentiation.
Aside. It looks
like the formula is a second divided difference, i.e. the difference
quotient of two difference quotients. Such is the
case.
Aside. From a
mathematical standpoint, we expect that the limit of the second
divided difference is the second derivative. Such is the case.
Enter the function, use
.
Example
6. Find the formula for the fourth
derivative of f(x).
Use
.
Example
7. Graph
. Find
the bound
. Look
at a graph and estimate the value
, be
sure to take the absolute value if necessary.
Example 8
(a). Compute numerical approximations for the
derivatives
, using
step sizes
.
8 (b). Plot the
numerical approximation
over the interval
. Compare
it with the graph of
over
the interval
.
Example
9. Plot the absolute
error
over
the interval
, and
estimate the maximum absolute error over the
interval.
9 (a). Compute the
error bound
and
observe that
over
.
9 (b). Since we the
function f[x] and its derivative is well known, and we have
the graph for
, we
can observe that the maximum error on the given interval occurs at
x=0. Thus we can do better that "theory", we see that
over
.
Example
10. Investigate the behavior
of
. If
the step size is reduced by a factor of
then
the error bound is reduced by
. This
is the
behavior.
Old Lab Project (Numerical
Differentiation Numerical
Differentiation). Internet
hyperlinks to an old lab project.
Research Experience for Undergraduates
Numerical
Differentiation Numerical
Differentiation Internet hyperlinks to web
sites and a bibliography of articles.
Downloads (Numerical Differentiation Numerical Differentiation).
Download this Mathematica notebook.
(c) John H. Mathews 2003