Numerical differentiation
Errors & accuracy
Rounding and truncation errors
Numerical Differentiation
Dhavide Aruliah
UOIT
MATH 2070U
c
±
D. Aruliah (UOIT)
Numerical Differentiation
MATH 2070U
1 / 27
Numerical differentiation
Errors & accuracy
Rounding and truncation errors
Numerical Differentiation
1
Numerical differentiation formulas
2
Errors and accuracy of numerical differentiation formulas
3
Rounding and truncation errors in numerical differentiation
c
±
D. Aruliah (UOIT)
Numerical Differentiation
MATH 2070U
2 / 27
Numerical differentiation
Errors & accuracy
Rounding and truncation errors
Numerical differentiation
From calculus, the
derivative
of
f
at
x
=
x
is
f
0
(
x
) =
lim
h
→
0
f
(
x
+
h
)

f
(
x
)
h
Whole array of techniques (product rule, chain rule, etc.) compute
exact
derivatives
Given
numerical
function
f
,
numerical differentiation
is ﬁnding
formulas for computing approximate derivatives
Two major motivations for numerical differentiation formulas
I
Nonlinear equations: Newton’s method
(approximation to
f
0
through numerical differentiation)
I
Finitedifference approximations to solutions of differential
equations (ordinary and partial)
c
±
D. Aruliah (UOIT)
Numerical Differentiation
MATH 2070U
4 / 27
Numerical differentiation
Errors & accuracy
Rounding and truncation errors
Taylor’s theorem
Theorem (Taylor)
Let f have m
+
1
continuous derivatives on
[
a
,
b
]
⊂
R
for some m
≥
0
. Let
x
,
x
∈
[
a
,
b
]
and deﬁne h
:
=
x

x. Then,
f
(
x
) =
f
(
x
+
h
) =
T
m
(
x
) +
R
m
+
1
(
x
)
where
T
m
(
x
)
:
=
m
∑
k
=
0
f
(
k
)
(
x
)
k
!
h
k
=
Taylor polynomial
=
f
(
x
) +
f
0
(
x
)
h
+
f
00
(
x
)
2
h
2
+
···
+
f
(
m
)
(
x
)
m
!
h
m
,
R
m
+
1
(
x
)
:
=
f
(
m
+
1
)
(
ξ
)
(
m
+
1
)
!
h
m
+
1
=
remainder
or
truncation error
,
and
ξ
lies between
x and x
=
x
+
h.
c
±
D. Aruliah (UOIT)
Numerical Differentiation
MATH 2070U
5 / 27
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentNumerical differentiation
Errors & accuracy
Rounding and truncation errors
Forwarddifference approximation for
f
0
(
x
)
Use a Taylor polynomial of
f
centred at
x
=
x
to derive a
forwarddifference approximation to
f
0
(
x
)
.
f
(
x
+
h
) =
f
(
x
)
+
f
0
(
x
)
h
+
f
00
(
ξ
)
2
h
2
f
(
x
) =
f
(
x
)
⇒
f
(
x
+
h
)

f
(
x
) =
f
0
(
x
)
h
+
f
00
(
ξ
)
2
h
2
Thus, we arrive at the
forwarddifference formula
f
0
(
x
) =
f
(
x
+
h
)

f
(
x
)
h

f
00
(
ξ
)
2
h
1
ξ
∈
(
x
,
x
+
h
)
c
±
D. Aruliah (UOIT)
Numerical Differentiation
MATH 2070U
6 / 27
Numerical differentiation
Errors & accuracy
Rounding and truncation errors
Backwarddifference approximation for
f
0
(
x
)
Use a Taylor polynomial of
f
centred at
x
=
x
to derive a
backwarddifference approximation to
f
0
(
x
)
.
f
(
x
) =
f
(
x
)
f
(
x

h
) =
f
(
x
)

f
0
(
x
)
h
+
f
00
(
ξ
)
2
h
2
⇒
f
(
x
)

f
(
x

h
) =
f
0
(
x
)
h

f
00
(
ξ
)
2
h
2
Thus, we arrive at the
backwarddifference formula
f
0
(
x
) =
f
(
x
)

f
(
x

h
)
h
+
f
00
(
ξ
)
2
h
1
ξ
∈
(
x

h
,
x
)
c
±
D. Aruliah (UOIT)
Numerical Differentiation
MATH 2070U
7 / 27
Numerical differentiation
Errors & accuracy
Rounding and truncation errors
Centreddifference approximation for
f
0
(
x
)
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '10
 aruliahdhavidhe
 Numerical Analysis, Numerical Differentiation, Numerical differentiation Numerical Differentiation Errors

Click to edit the document details