Jim Lambers
MAT 460/560
Fall Semester 200910
Lecture 23 Notes
These notes correspond to Section 4.1 in the text.
Numerical Di±erentiation
We now discuss the other fundamental problem from calculus that frequently arises in scienti±c
applications, the problem of computing the derivative of a given function
f
(
x
).
Finite Di±erence Approximations
Recall that the derivative of
f
(
x
) at a point
x
0
, denoted
f
0
(
x
0
), is de±ned by
f
0
(
x
0
) = lim
h
!
0
f
(
x
0
+
h
)
±
f
(
x
0
)
h
:
This de±nition suggests a method for approximating
f
0
(
x
0
). If we choose
h
to be a small positive
constant, then
f
0
(
x
0
)
²
f
(
x
0
+
h
)
±
f
(
x
0
)
h
:
This approximation is called the
forward di±erence formula
.
To estimate the accuracy of this approximation, we note that if
f
00
(
x
) exists on [
x
0
;x
0
+
h
],
then, by Taylor’s Theorem,
f
(
x
0
+
h
) =
f
(
x
0
)+
f
0
(
x
0
)
h
+
f
00
(
±
)
h
2
=
2
;
where
±
2
[
x
0
;x
0
+
h
]
:
Solving
for
f
0
(
x
0
), we obtain
f
0
(
x
0
) =
f
(
x
0
+
h
)
±
f
(
x
0
)
h
+
f
00
(
±
)
2
h;
so the error in the forward di²erence formula is
O
(
h
). We say that this formula is
²rstorder
accurate
.
The forwarddi²erence formula is called a
²nite di±erence approximation
to
f
0
(
x
0
), because it
approximates
f
0
(
x
) using values of
f
(
x
) at points that have a small, but ±nite, distance between
them, as opposed to the de±nition of the derivative, that takes a limit and therefore computes the
derivative using an \in±nitely small" value of
h
. The forwarddi²erence formula, however, is just
one example of a ±nite di²erence approximation. If we replace
h
by
±
h
in the forwarddi²erence
formula, where
h
is still positive, we obtain the
backwarddi±erence formula
f
0
(
x
0
)
²
f
(
x
0
)
±
f
(
x
0
±
h
)
h
:
Like the forwarddi²erence formula, the backward di²erence formula is ±rstorder accurate.
1
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentIf we average these two approximations, we obtain the
centereddi±erence formula
f
0
(
x
0
)
±
f
(
x
0
+
h
)
²
f
(
x
0
²
h
)
2
h
:
To determine the accuracy of this approximation, we assume that
f
000
(
x
) exists on the interval
[
x
0
²
h;x
0
+
h
], and then apply Taylor’s Theorem again to obtain
f
(
x
0
+
h
) =
f
(
x
0
) +
f
0
(
x
0
)
h
+
f
00
(
x
0
)
2
h
2
+
f
000
(
±
+
)
6
h
3
;
f
(
x
0
²
h
) =
f
(
x
0
)
²
f
0
(
x
0
)
h
+
f
00
(
x
0
)
2
h
2
²
f
000
(
±
±
)
6
h
3
;
where
±
+
2
[
x
0
;x
0
+
h
] and
±
±
2
[
x
0
²
h;x
0
]. Subtracting the second equation from the ±rst and
solving for
f
0
(
x
0
) yields
f
0
(
x
0
) =
f
(
x
0
+
h
)
²
f
(
x
0
²
h
)
2
h
²
f
000
(
±
+
) +
f
000
(
±
±
)
12
h
2
:
By the Intermediate Value Theorem,
f
000
(
x
) must assume every value between
f
000
(
±
±
) and
f
000
(
±
+
)
on the interval (
±
±
;±
+
), including the average of these two values. Therefore, we can simplify this
equation to
f
0
(
x
0
) =
f
(
x
0
+
h
)
²
f
(
x
0
²
h
)
2
h
²
f
000
(
±
)
6
h
2
;
where
±
2
[
x
0
²
h;x
0
+
h
]. We conclude that the centereddi²erence formula is
This is the end of the preview.
Sign up
to
access the rest of the document.
 Fall '11
 N/A
 Economics

Click to edit the document details