Truncation Errors - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

Truncation Errors

Description:

With the help of a computer: n=0 Rn=1.100000e-02. n=1 Rn=5.500000e-05. n=2 Rn=1.833333e-07 ... Estimation of Truncation Errors by Geometry Series ... – PowerPoint PPT presentation

Number of Views:113
Avg rating:3.0/5.0
Slides: 29
Provided by: laiwa
Category:

less

Transcript and Presenter's Notes

Title: Truncation Errors


1
  • Part 3
  • Truncation Errors

2
Key Concepts
  • Taylor's Series
  • Using Taylor's series to approximate functions
  • The Remainder of Taylor's Series
  • Using the Remainder to estimate truncation errors

3
Truncation Errors
  • Truncation Errors are those that result from
    using an approximation in place of an exact
    mathematical procedure.

Approximation of accelaration
Approximation
Truncation Errors
MacLaurin series of ex
Exact mathematical formulation
4
  • A more general form of approximation is in terms
    of Taylor Series.

5
Taylor's Theorem
  • Taylor's Theorem If the function f and its first
    n1 derivatives are continuous on an interval
    containing a and x, then the value of the
    function at x is given by

where the remainder Rn is defined as
(the integral form)
6
Derivative or Lagrange Form of the remainder
The remainder Rn can also be expressed as
(the Lagrange form)
for some ? between a and x
The Lagrange form of the remainder makes analysis
of truncation errors easier.
7
Taylor Series
  • Any smooth function can be approximated as a
    polynomial. Taylor series provides a mean to
    predict a function value at one point x in terms
    of the function and its derivatives at another
    point a.

Note This is the same expression except that a
and x are replaced by xi and xi1 respectively.
8
Taylor Series
  • If we let h xi1 - xi, we can rewrite the
    Taylor series and the remainder as

h is called the step size.
9
Taylor Series Approximation
If we take away the remainder, the Taylor series
becomes the Taylor series approximation.
The remainder Rn accounts for all the terms not
included in the approximation starting from term
n1. n can be as small as zero. The larger n is
(more terms used), the better the approximation
and thus the smaller the error.
10
Some Terminologies
Zero-order approximation use only the first term
First-order approximation use only the first two
terms
Second-order approximation use only the first
three terms
11
Taylor Series Approximation ExampleMore terms
used implies better approximation
f(x) 0.1x4 - 0.15x3 - 0.5x2 - 0.25x 1.2
12
Taylor Series Approximation ExampleSmaller step
size implies smaller error
Errors
Reduced step size
f(x) 0.1x4 - 0.15x3 - 0.5x2 - 0.25x 1.2
13
The Remainder of the Taylor Series Expansion
Relationship between h and Rn Smaller h implies
smaller Rn, but if we reduce/magify h by a factor
of k, how much smaller/larger Rn would be? That
is, if h' kh, what is Rn' in terms of Rn?
14
Example Relationship between h and R1
Use the first order Taylor series to approximate
the function f(x) x4 at xh where x1.
15
Pictorial View of h vs. R1
A slop of 2 shown in the log-log plot of the
remainder indicates that the truncation error is
propotional to h2
Theoritical result
Do they agree?
16
The Remainder of the Taylor Series Expansion
Summary To reduce truncation errors, we can
reduce h or/and increase n. If we reduce h, the
error will get smaller quicker (with less
n). This relationship has no implication on the
magnitude of the errors because the constant term
can be huge! It only give us an estimation on how
much the truncation error would reduce when we
reduce h or increase n.
17
Example
This is the Maclaurin series expansion for ex
If we want to approximate e0.01 with an error
less than 10-12, at least how many terms are
needed?
Note Maclaurin series expansion is a special
case of the Taylor series expansion with xi 0
and h x.
18
Note1.1100 is about 13781 gt e
To find the smallest n such that Rn lt 10-12, we
can find the smallest n that satisfies
With the help of a computer n0
Rn1.100000e-02 n1 Rn5.500000e-05 n2
Rn1.833333e-07 n3 Rn4.583333e-10 n4
Rn9.166667e-13
So we need at least 5 terms
19
Same problem with larger step size
Note1.72 is 2.89 gt e
With the help of a computer n0
Rn8.500000e-01 n1 Rn2.125000e-01 n2
Rn3.541667e-02 n3 Rn4.427083e-03 n4
Rn4.427083e-04
n5 Rn3.689236e-05 n6 Rn2.635169e-06 n7
Rn1.646980e-07 n8 Rn9.149891e-09 n9
Rn4.574946e-10 n10 Rn2.079521e-11 n11
Rn8.664670e-13
So we need at least 12 terms
20
Other methods for estimating truncation errors of
a series
  • By Geometry Series
  • By Integration
  • Alternating Convergent Series Theorem

Note Some Taylor series expansions may exhibit
certain characteristics which would allow us to
use different methods to approximate the
truncation errors.
21
Estimation of Truncation ErrorsBy Geometry Series
If tj1 ktj where 0 k lt 1 for all j n,
then
22
Estimation of Truncation Errors by Geometry Series
What is R6 for the following series expansion?
Solution
23
Estimation of Truncation ErrorsBy Integration
If we can find a function f(x) s.t. tj f(j)
?j n and f(x) is a decreasing function ?x n,
then
24
Estimation of Truncation Errors by Integration
Estimate Rn for the following series expansion.
Solution
We can pick f(x) x-3 because it would provide a
tight bound for tj. That is
So
25
Alternating Convergent Series Theorem (Leibnitz
Theorem)
  • If an infinite series satisfies the conditions
  • It is strictly alternating.
  • Each term is smaller in magnitude than that term
    before it.
  • The terms approach to 0 as a limit.
  • Then the series has a finite sum (i.e.,
    convergent) and moreover if we stop adding the
    terms after the nth term, the error thus produced
    is between 0 and the 1st non-zero neglected term
    not taken.

26
Alternating Convergent Series Theorem
Example
Eerror estimated using the althernating
convergent series theorem
Actual error
Another example
Actual error
27
More Examples
If the sine series is to be used to compute
sin(1) with an error less than 0.5x10-14, how
many terms are needed?
Solution
This series satisfies the conditions of the
Alternating Convergent Series Theorem.
Solving
for odd n, we get n 17 (Need 8 terms)
28
More Examples
How many terms should be taken in order to
compute p4/90 with an error of at most 0.5x10-8?
Solution (by integration)
Write a Comment
User Comments (0)
About PowerShow.com