Professional Documents
Culture Documents
. Specified: For the function f ( x) = 12 10 x + x 2 and interval [a, b] = [2,3] find the number that occurs in the Mean-Value Theorem. Solution: f ( ) = 10 + 2 , f (a) = 12 10 2 + 2 2 = 4 , f (b) = 12 10 3 + 3 2 = 9 . Mean-Value Theorem: f (b) f (a) = f ( )(b a ) 9 (4) = (10 + 2 )(3 2) 5 = 10 + 2 = 2.5
Page 1 of 7
CIS541 Taylor Series Expansion Examples of Problems Solution Problem 2. Specified: Find the Taylor series for f ( x) = sinh( x) about the point c = 0 .
Slide 2
e x ex Solution: sinh x = , f ( 0 ) ( x) = sinh x , f ( x) = cosh x , f ( x) = sinh( x) . f ( x) = cosh x , etc. 2 f (0) = 0 , f (0) = 1 , f (0) = 0 , f (0) = 1 , etc.
f ( x) = 0 + x 1! + 0 + x 3 3! + ... = x 2 k +1 (2k + 1)!
k =0
Page 2 of 7
CIS541 Taylor Series Expansion Examples of Problems Solution Slide 3 Problem 3. Specified: For small values of x , the approximation sin x x is often used. Estimate the error in using this formula with the aid of Taylor's Theorem. For what range of values of x will this approximation give results correct to six decimal places? Solution: sin x is an odd function. The function is odd if f ( x ) = f ( x ) . Hence,
( )
Want
3 x sin x x =
( 6 )cos < 1 10 2
The equal sign in this inequality reflects the fact that the truncation error is less than En , which we compare with
3 6 1 10 6 .It suffices to have x < 3 10 or x < 0.0144 radians. 2
Page 3 of 7
CIS541 Taylor Series Expansion Examples of Problems Solution Slide 4 Problem 4. Specified: What is the fifth term in Taylor expansion of x 4 x 3 + 2 x 2 10 x + 8 about the point 1 ? Solution: f ( 4) ( x) = 24 , Fifth term = f ( 4 ) (1)( x 1) 4 / 4!= ( x 1) 4 Problem 5. Specified: Determine the Taylor polynomial of degree 2 for
f ( x) = e(sin x )
expanded about the point . Solution:
f ( x) = e sin x , f ( x) = e sin x cos x, f ( x) = e sin x (cos2 x sin x), and f ( ) = 1, f ( ) = 1, f ( ) = 1 . (x )2 sin x Hence, e 1 ( x ) + 2
Problem 6. Specified: Assume that x < 1 and determine by Taylor's Theorem the best upper bound of
x2 x3 e (1 + x + + ) . 2 6
x
Page 4 of 7
CIS541 Taylor Series Expansion Examples of Problems Solution Slide 5 Problem 7. Specified: Derive the Taylor series with remainder term for ln(1 + x) about 1. Derive inequality that m gives the number of terms that must be taken to yield ln 4 with error less than 2 . (n) n 1 n Solution: f ( x ) = ln(1 + x ), f = ( 1) ( n 1)!(1 + x) , and
E n ( x ) = ( 1) n [( x 1) /(1 + )]n +1 /( n + 1) for some between 1 and x . n +1 n n +1 Now E n (3) = (1) [ 2 /(1 + )] /( n + 1) for 1 < < 3 but 2 < 1 + [ 2 /(1 + )] < 1 and E n (3) < 1 /(n + 1) < 2 m n > 2 m 1
Page 5 of 7
CIS541 Problem 8.
Slide 6
Specified: How many terms are needed in Series (2) to compute sin x for x <
1 accurate to 10 3
decimal places (rounded)? Taylor series (2) is a Maclaurin series, where point of expansion is equal zero. The derivatives of sin x are: (sin x )(0 ) = sin x , (sin x )(1) = cos x , (sin x )(2 ) = sin x , (sin x )(3) = cos x , (sin x )(4 ) = sin x , (sin x )(5 ) = cos x , etc. It is easy to notice that all even derivatives at point of expansion are equal zero and odd derivatives equal one. Therefore, Taylor series looks like this
x3 x5 x 7 sin x = x + +L 3! 5! 7!
x 2 n +1 The generic expression for n - th term of this series is: ( 1) , (2n + 1)!
n
n +1
It is clear, that maximum error value can be reached at = 0 , and it makes error term
En ( x) ( 1)
n +1
x 2 n +3 (2n + 3)!
2 n +3
For Series (2) to converge the error term should be small enough to satisfy the accuracy requirement:
En ( x ) x (2n + 3)!
2 n +3
1 ) ( = 3
Page 6 of 7
CIS541
Slide 7
Take logarithm of both sides of inequality and use trial and error approach to find n value.
(2n + 3) log 3 + log 2 log((2n + 3)!) < 10
Below are the results of left hand side computation performed with Maple:
> n:=3;
n := 3
> leftside:=evalf(log10(2.0)-(2*n+3)*log10(3.0)-log10((2*n+3)!));
leftside := -9.552824329689774
Page 7 of 7