Taylor Remainder ppt

advertisement
Taylor’s Theorem:
Error Analysis for Series
Taylor series are used to estimate the value of functions (at
least theoretically - now days we can usually use the
calculator or computer to calculate directly.)
An estimate is only useful if we have an idea of how
accurate the estimate is.
When we use part of a Taylor series to estimate the value
of a function, the end of the series that we do not use is
called the remainder. If we know the size of the remainder,
then we know how close our estimate is.

For a geometric series, this is easy:
ex. 2:
1
 1,1 .
Use 1  x  x  x to approximate
2 over
1 x
2
4
6
Since the truncated part of the series is: x8  x10  x12   ,
x8
the truncation error is x  x  x   , which is
.
2
1 x
8
10
12
When you “truncate” a number, you drop
off the end.
Of course this is also trivial, because we have a formula
that allows us to calculate the sum of a geometric series
directly.

Taylor’s Theorem with Remainder
If f has derivatives of all orders in an open interval I
containing a, then for each positive integer n and for each x
in I:
f   a 
f n  a 
2
f  x   f  a   f   a  x  a  
 x  a   
 x  a n  Rn  x 
2!
n!
Lagrange Form of the Remainder
Rn  x  
 c  x  a n1


 n  1!
f
 n 1
Remainder after
partial sum Sn
where c is between
a and x.

Lagrange Form of the Remainder
Rn  x  
 c  x  a n1


 n  1!
f
 n 1
Remainder after
partial sum Sn
where c is between
a and x.
This is also called the remainder of order n or the error term.
Note that this looks just like the next term in the series, but
“a” has been replaced by the number “c” in f  n 1  c  .
This seems kind of vague, since we don’t know the value of c,
but we can sometimes find a maximum value for f  n 1  c  .

Lagrange Form of the Remainder
Rn  x  
 c  x  a n1


 n  1!
f
 n 1
If M is the maximum value of
between a and x, then:
Taylor’s Inequality
M
n 1
Rn  x  
xa
 n  1!
f
 n 1
 x
on the interval
Note
this
is not
This
is that
called
Taylor’s
the formula that is in
Inequality.
our book. It is from
another textbook.

ex. 5:
x2
Find the Lagrange Error Bound when x 
is used
2
to approximate ln 1  x  and x  0.1 .
f  x   ln 1  x 
f   x   1  x 1
f   x    1  x 2
f   x   2 1  x 3
x2
f  x   0  x   R2  x 
2
2
On the interval  .1,.1 , 1  x 3 decreases, so
its maximum value occurs at the left end-point.
M
2
1  .13
2

3  2.74348422497
.9 
f  0
f   0  2
f  x   f  0 
x
x  R2  x 
1
2!
Remainder after 2nd order term

ex. 5:
x2
Find the Lagrange Error Bound when x 
is used
2
to approximate ln 1  x  and x  0.1 .
Taylor’s Inequality
M
n 1
Rn  x  
xa
 n  1!
2
On the interval  .1,.1 , 1  x 3 decreases, so
its maximum value occurs at the left end-point.
2.7435 .1
Rn  x  
3!
3
Rn  x   0.000457
Lagrange Error Bound
M
2
1  .13
2

3  2.74348422497
.9 
x2
x
error
2
Error is
x
ln 1  x 
.1
.0953102
.1
.1053605 .105
.095
.000310
.000361
less than
error
bound.

Euler’s Formula
An amazing use for infinite series:
x 2 x3 x 4
e  1  x     
2! 3! 4!
x
Substitute xi for x.
 xi 2  xi 3  xi 4  xi 5  xi 6
e  1  xi 




 
2!
3!
4!
5!
6!
xi
x 2i 2 x3i 3 x 4i 4 x5i 5 x 6i 6
e  1  xi 




 
2!
3!
4!
5!
6!
xi
x 2 x3i x 4 x5i x 6
e  1  xi  
 
   Factor out the i terms.
2! 3! 4! 5! 6!
xi
2
4
6
x
x
x


x3 x5
xi
e  1       i  x     
2! 4! 6!
3! 5!



2
4
6
x
x
x


x3 x5
xi
e  1       i  x     
2! 4! 6!
3! 5!


This is the series
for cosine.
e xi  cos  x   i sin  x 
This is the series
for sine.
Let
x 
ei  cos    i sin  
ei  1  i  0
i
e 1  0
This amazing identity contains
the five most famous numbers
in mathematics, and shows
that they are interrelated.

Download