![]()
![]()
for
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. In this module the truncation error
will be investigated, but round off error from computer arithmetic
using computer numbers will be studied in another module.
Theorem (Three point rule for
). The
central difference formula for the first derivative, based
on three points is
,
and the remainder term is
.
Together they make the equation
, and
the truncation error bound is
where
. This
gives rise to the Big "O" notation for
the error term for
:
.
Proof Numerical Differentiation Numerical Differentiation
Theorem (Three point rule for
). The
central difference formula for the second derivative, based on three
points is
,
and the remainder term is
.
Together they make the equation
, and
the truncation error bound is
where
. This
gives rise to the Big "O" notation for
the error term for
:
.
Proof Numerical Differentiation Numerical Differentiation
Animations (Numerical Differentiation Numerical Differentiation). Internet hyperlinks to animations.
Computer Programs Numerical Differentiation Numerical Differentiation
Project I.
Investigate the numerical differentiation
formula
and
truncation 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.
Example
1. Consider the
function
. Find
the formula for the third derivative
,
it will be used in our explorations for the remainder term and the
truncation error bound. Graph
. Find
the bound
. Look
at it's graph and estimate the value
,
be sure to take the absolute value if necessary.
Solution
1.
Example 2
(a). Compute numerical approximations for the
derivative
, using
step sizes
, include
the details.
2 (b). Compute
numerical approximations for the derivatives
, using
step sizes
.
2 (c). Plot the
numerical approximation
over the interval
. Compare
it with the graph of
over
the interval
.
Solution
2 (a).
Solution
2 (b).
Solution
2 (c).
Example
3. Plot the absolute
error
over
the interval
, and
estimate the maximum absolute error over the interval.
3 (a). Compute the
error bound
and
observe that
over
.
3 (b). Since 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
.
Solution
3.
Example
4. 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.
Solution
4.
Project II.
Investigate the numerical differentiation
formulae
and
truncation 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.
Example
5. Consider the
function
. Find
the formula for the fourth derivative
,
it will be used in our explorations for the remainder term and the
truncation error bound. Graph
. Find
the bound
. Look
at it's graph and estimate the value
, be
sure to take the absolute value if necessary.
Solution
5.
Example 6
(a). Compute numerical approximations for the
derivatives
, using
step sizes
.
6 (b). Plot the
numerical approximation
over the interval
. Compare
it with the graph of
over
the interval
.
Solution
6 (a).
Solution
6 (b).
Example
7. Plot the absolute
error
over
the interval
, and
estimate the maximum absolute error over the
interval.
7 (a). Compute the
error bound
and
observe that
over
.
7 (b). Since 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
.
Solution
7.
Example
8. 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.
Solution
8.
Various Scenarios and Animations for Numerical Differentiation.
Example
9. Given
,
find numerical approximations to the derivative
,
using two points and the forward difference formula.
Solution
9.
Example
10. Given
,
find numerical approximations to the derivative
,
using two points and the backward difference formula.
Solution
10.
Example
11. Given
,
find numerical approximations to the derivative
,
using two points and the central difference formula.
Solution
11.
Example
12. Given
,
find numerical approximations to the derivative
,
using three points and the forward difference formula.
Solution
12.
Example
13. Given
,
find numerical approximations to the derivative
,
using three points and the backward difference formula.
Solution
13.
Example
14. Given
,
find numerical approximations to the derivative
,
using three points and the central difference formula.
Solution
14.
Example
15. Given
,
find numerical approximations to the second
derivative
,
using three points and the forward difference formula.
Solution
15.
Example
16. Given
,
find numerical approximations to the second
derivative
,
using three points and the backward difference formula.
Solution
16.
Example
17. Given
,
find numerical approximations to the second
derivative
,
using three points and the central difference formula.
Solution
17.
Animations (Numerical Differentiation Numerical Differentiation). Internet hyperlinks to animations.
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.
Download this Mathematica Notebook Numerical Differentiation
Return to Numerical Methods - Numerical Analysis
(c) John H. Mathews 2004