You are on page 1of 7

CIS541 Taylor Series Expansion Examples of Problems Solution Slide 1 Problem 1.

. 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,

sin x x and sin( x ) = sin x x . Therefore, the approximation above is


exact for x with smallest absolute value of x , which is zero. It allows us to choose value of c = 0 . cos c sin c ( x c) ( x c)2 + K By Taylor's Theorem, sin x = sin c + 1! 2! 1 0 And after substitution of c = 0 , sin x = 0 + x x 2 + K 1 2! You can see that to get the above specified approximation sin x x we can truncate Taylor series right after second zero-th term. It makes the error term for truncation to
3 look like E2 = x 3! cos for some between 0 and x . To have six correct decimal places the rounded the calculated value should have seventh decimal place less than 5. It is expressed by inequality below.

( )

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

x 2 x 3 e 4 Solution: e = 1 + x + + + x for some between 0 and x . 2 6 24 x < 1 e < e x < e1 2.7182818...


x

x2 x3 1 2.7182818 0.1174284083 So e (1 + x + + ) = e x 4 < 2 6 24 24


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

f (1) = ln 2, f ( n ) (1) = (1) n1 (n 1)!2 n . Thus,


(1) k 1 (k 1)!2 k ln(1 + x) = ln 2 + ( x 1) k + E n ( x) = k! k =1
n

(1) k 1 (k 1)!2 k ln 2 + ( x 1) k + E n ( x) (k 1)!k k =1


n
n

ln(1 + x ) = ln 2 + (1) k 1[( x 1) / 2]k / k + E n ( x ) , where


k =1

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.

Taylor Series Expansion Examples of Problems Solution

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

and error term is En ( x) = ( 1)

n +1

x 2 n +3 1 1 cos( ) , where < < . (2n + 3)! 3 3

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

1 < 10 10 (2n + 3)! 2

Page 6 of 7

CIS541

Taylor Series Expansion Examples of Problems Solution


3 ( 2 n +3) 2 < 10 10 (2n + 3)!

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

> n:=4; > leftside:=evalf(log10(2.0)-(2*n+3)*log10(3.0)-log10((2*n+3)!));


n := 4 leftside := -12.54845952428732

Result: 5 terms starting with zero-th term.

Page 7 of 7

You might also like