9.3 taylors theorem: error analysis. 2 7 1 yes no
DESCRIPTION
yes noTRANSCRIPT
QuickTime™ and a decompressor
are needed to see this picture.
9.3 Taylor’s Theorem: Error Analysis
2
7
112
yes
yesyes
no
no
Finding Truncation Error in a Taylor Polynomial
Graph the function y1 = ln (1 + x) and it’s corresponding Taylor Polynomial
y2 = x -
x2
2 +
x3
3 -
x4
4 +
x5
5
Finding Truncation Error in a Taylor Polynomial
Graph the function y1 = ln (1 + x) and it’s corresponding Taylor Polynomial
2 3 4 5
2x x x xy = x - + - - 2 3 4 5
To find the error between the functions, graph y3 = abs (y2 – y1).
Finding Truncation Error in a Taylor Polynomial
To find the error between the functions, graph y3 = abs (y2 – y1).
Where is the error the smallest?
Finding Truncation Error in a Taylor Polynomial
Use Table to see where truncation error is least on (-1,1)
Finding Error in a Taylor Polynomial
Graph the function y1 = sin x and it’s corresponding Taylor Polynomial and find the interval in which the
Taylor polynomial is accurate to the thousandths place.
3
2xy = x - 6
Finding Error in a Taylor Polynomial
The third order Taylor Polynomial for y = sin x is accurate to the thousandths place on the interval (-.65, .65). Graph
y3 = abs (y1(x) – y2(x)), and y4 = .001.
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: Use to approximate over .2 4 61 x x x+ + + 2
11 x−
( )1,1−
Since the truncated part of the series is: ,8 10 12 x x x+ + + ⋅⋅⋅
the truncation error is , which is .8 10 12 x x x+ + + ⋅⋅⋅8
21x
x−
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:
( ) ( ) ( )( ) ( )( )( ) ( )( ) ( )2
2! !
nn
nf fa af f f Rx a a x a x a x a x
n′′′= + + + ⋅⋅⋅ +− − −
Lagrange Form of the Remainder
( )( )( )( ) ( )
11
1 !
nn
n
f cR x x a
n
++= −
+
Remainder after partial sum Sn where c is between a and x.
→
Lagrange Form of the Remainder
( )( )( )( ) ( )
11
1 !
nn
n
f cR x x a
n
++= −
+
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 .( )( )1nf c+
This seems kind of vague, since we don’t know the value of c,
but we can sometimes find a maximum value for .( )( )1nf c+
→
This is called Taylor’s Inequality.
Taylor’s InequalityNote that this is not the formula that is in our book. It is from another textbook.
Lagrange Form of the Remainder
( )( )( )( ) ( )
11
1 !
nn
n
f cR x x a
n
++= −
+
If M is the maximum value of on the interval between a and x, then:
( )( )1nf x+
( ) ( )1
1 !n
nMR x x a
n+≤ −
+
→
ex. 2: Prove that , which is the Taylor
series for sin x, converges for all real x.
( )( )
2 1
0 1!2 1
kk
k
xk
+∞
= −+
∑
Since the maximum value of sin x or any of it’s derivatives is 1, for all real x, M = 1.
( )( )
110
!1n
nR x xn
+∴ ≤ −+ ( )
1
!1
nxn
+
=+
( )
1
lim 0!1
n
n
xn
+
→∞=
+
so the series converges.
Taylor’s Inequality
( ) ( )1
1 !n
nMR x x a
n+≤ −
+→
ex. 5: Find the Lagrange Error Bound when is used
to approximate and .
2
2xx−
( )ln 1 x+ 0.1x ≤
( ) ( )ln 1f x x= +
( ) ( ) 11f x x −′ = +
( ) ( ) 21f x x −′′ = − +
( ) ( ) 32 1f x x −′′′ = +
( ) ( ) ( ) ( ) ( )22
0 001 2!
f ff f x x Rx x′ ′′
= + + +
Remainder after 2nd order term
( ) ( )2
202xf x Rx x= + − +
On the interval , decreases, so
its maximum value occurs at the left end-point.
[ ].1,.1− ( )3
21 x+
( )3
21 .1
M =+ − ( )3
2.9
= 2.74348422497≈
→
ex. 5: Find the Lagrange Error Bound when is used
to approximate and .
2
2xx−
( )ln 1 x+ 0.1x ≤
On the interval , decreases, so
its maximum value occurs at the left end-point.
[ ].1,.1− ( )3
21 x+
( )3
21 .1
M =+ − ( )3
2.9
= 2.74348422497≈
Taylor’s Inequality
( ) ( )1
1 !n
nMR x x a
n+≤ −
+
( )32.7435 .1
3!nR x ≤
( ) 0.000457nR x ≤
Lagrange Error Bound
x ( )ln 1 x+2
2xx− error
.1 .0953102 .095 .000310
.1− .1053605− .105− .000361
Error is less than error bound. →
Example using Taylor’s Theorem with Remainder
For approximately what values of x can you replace sin x by with an error magnitude no greater than 1 x 10-3 ?
Since f 5( ) c( ) = cos c ≤ 1, then
R 4(x) ≤ x
5
5! ≤ 1 x 10 - 3
x5 ≤ .12
x ≤ .65
x - x3
3!
Taylor’s Theorem with Remainder
( )( ) ( )( )
n 1n 1n+1
nn n
xf c xlim R (x) = lim 0
n + 1 ! (n 1)!
++
→∞ →∞≤ →
+
( )n
7n
100 100 100 100 100 100 100Ex : lim = ... ... ...n+1 ! 1 2 3 100 101 10→∞
g g g g g g
Taylor’s Theorem with Remainder works well with the functions y = sin x and y = cos x because |f (n+1)(c)| ≤ 1.
Note: Factorial growth in the denominator is larger than the exponential growth in the numerator.
Since | Rn(x)| 0 then the Taylor Series converges as n → ∞
2 3 4
12! 3! 4!
x x x xe x= + + + + +⋅⋅⋅
An amazing use for infinite series:
Substitute xi for x.
( ) ( ) ( ) ( ) ( )2 3 4 5 6
1 2! 3! 4! 5! 6!
xi xi xi xi xi xie xi= + + + + + + + ⋅⋅⋅
2 2 3 3 4 4 5 5 6 6
1 2! 3! 4! 5! 6!
xi x i x i x i x i x ie xi= + + + + + + + ⋅⋅⋅
2 3 4 5 6
1 2! 3! 4! 5! 6!
xi x x i x x i xe xi= + − − + + − + ⋅⋅⋅
2 4 6 3 5
1 2! 4! 6! 3! 5!
xi x x x x xe i x⎛ ⎞= − + − + ⋅⋅⋅ + − + + ⋅⋅⋅⎜ ⎟⎝ ⎠
Factor out the i terms.
→
Euler’s Formula
2 4 6 3 5
1 2! 4! 6! 3! 5!
xi x x x x xe i x⎛ ⎞= − + − + ⋅⋅⋅ + − + + ⋅⋅⋅⎜ ⎟⎝ ⎠
This is the series for cosine.
This is the series for sine.
( ) ( )cos sinxie ix x= + Let x π=
( ) ( )cos sinie iπ π π= +
1 0ie iπ =− + ⋅
1 0ie π + =This amazing identity contains the five most famous numbers in mathematics, and shows that they are interrelated.
π