Taylor and MacLaurin Series - Drexel University

Post on 03-Apr-2022

26 views 0 download

Transcript of Taylor and MacLaurin Series - Drexel University

Taylor and MacLaurin Series

Theorem. The polynomial pn(x) of degree n with the property that the value of p and the values of its first n derivatives match those of f at the point x0 is called the Taylor polynomial of degree n. Its formula is:

or in summation notation

( )0 2( ) ( ) ( )( ) ( )0 0 0 02

(3) ( ) ( ) ( )0 03 ( ) ( )0 03! !

f xp x f x f x x x x xn

nf x f x nx x x xn

′′′= + − + − +

− + + −L

Theorem. The polynomial pn(x) of degree n with the property that the value of p and the values of its first n derivatives match those of f at the point x0 is called the Taylor polynomial of degree n. Its formula is:

or in summation notation

( )0 2( ) ( ) ( )( ) ( )0 0 0 02

(3) ( ) ( ) ( )0 03 ( ) ( )0 03! !

f xp x f x f x x x x xn

nf x f x nx x x xn

′′′= + − + − +

− + + −L

( )( )0( ) ( )0!0

kn f x kp x x xn kk

= −∑=

If x0 = 0, the polynomial is called the MacLaurin polynomial of degree n. Its formula is:

(3) ( )(0) (0) (0)2 3( ) (0) (0)2 3! !

nf f f np x f f x x x xn n

′′′= + + + + +L

If x0 = 0, the polynomial is called the MacLaurin polynomial of degree n. Its formula is:

( )(0)!0

kn f kxkk

= ∑=

(3) ( )(0) (0) (0)2 3( ) (0) (0)2 3! !

nf f f np x f f x x x xn n

′′′= + + + + +L

If x0 = 0, the polynomial is called the MacLaurin polynomial of degree n. Its formula is:

( )(0)!0

kn f kxkk

= ∑=

Example. Find the MacLaurin polynomial of degree n for the function f(x) = ex.

(3) ( )(0) (0) (0)2 3( ) (0) (0)2 3! !

nf f f np x f f x x x xn n

′′′= + + + + +L

If x0 = 0, the polynomial is called the MacLaurin polynomial of degree n. Its formula is:

( )(0)!0

kn f kxkk

= ∑=

Example. Find the MacLaurin polynomial of degree n for the function f(x) = ex.

Here all derivatives of f are the same and all equal 1 at x = 0. Thus the MacLaurin Polynomial is

( )!0

kn xp xn kk

= ∑=

(3) ( )(0) (0) (0)2 3( ) (0) (0)2 3! !

nf f f np x f f x x x xn n

′′′= + + + + +L

The first few are: ( ) 11p x x= +

2( ) 1

2 2xp x x= + +

2 3( ) 1

3 2 6x xp x x= + + +

2 3 4( ) 1

4 2 6 24x x xp x x= + + + +

2 3 4 5( ) 1

5 2 6 24 120x x x xp x x= + + + + +

The first 4 of these are shown below with the exponential function.

( ) 10p x =

Example. Find the first four taylor polynomials for ln(x) about x = 2.

Example. Find the first four taylor polynomials for ln(x) about x = 2.

Solution. f(x) = ln(x), f′ (x) = 1/x, f′′ (x) = −1/x2, f′′′ (x) = 2/x3, f(4)(x) = − 6/x4.

Thus f(2) = ln(2), f′ (2) = 1/2, f′′ (2) = −1/4, f′′′ (2) = 2/8 = 1/4, f(4)(2) = − 6/16 = − 3/8.

Example. Find the first four taylor polynomials for ln(x) about x = 2.

Solution. f(x) = ln(x), f′ (x) = 1/x, f′′ (x) = −1/x2, f′′′ (x) = 2/x3, f(4)(x) = − 6/x4.

Thus f(2) = ln(2), f′ (2) = 1/2, f′′ (2) = −1/4, f′′′ (2) = 2/8 = 1/4, f(4)(2) = − 6/16 = − 3/8.

1( ) ( ) ( )( ) ln(2) ( 2)1 0 0 0 2p x f x f x x x x′= + − = + −

1 1 2( ) ln(2) ( 2) ( 2)2 2 4p x x x= + − − −

1 1 12 3( ) ln(2) ( 2) ( 2) ( 2)3 2 4 4p x x x x= + − − − + −

( ) ( ) ln(2)0 0p x f x= =

1 1 1 32 3 4( ) ln(2) ( 2) ( 2) ( 2) ( 2)4 2 4 4 8p x x x x x= + − − − + − − −

Example. Find the first five MacLaurin polynomials for sin(x).

Example. Find the first five MacLaurin polynomials for sin(x).

Solution. f(x) = sin(x), f′ (x) = cos(x), f′′ (x) = −sin(x), f′′′ (x) = −cos(x), f(4)(x) = sin(x).

Thus f(0) = 0, f′ (0) = 1, f′′ (0) = 0, f′′′ (0) = −1, f(4)(2) = 0,….The coefficients then repeat 0, 1, 0, −1, 0, 1, 0, −1, …

( )(0)!

kxkfk

The kth term of the polynomial is

Example. Find the first five MacLaurin polynomials for sin(x).

Solution. f(x) = sin(x), f′ (x) = cos(x), f′′ (x) = −sin(x), f′′′ (x) = −cos(x), f(4)(x) = sin(x).

Thus f(0) = 0, f′ (0) = 1, f′′ (0) = 0, f′′′ (0) = −1, f(4)(2) = 0,….The coefficients then repeat 0, 1, 0, −1, 0, 1, 0, −1, …

( )1p x x= ( )

2p x x=

1 13 3( )3 3! 6p x x x x x= − = −

( ) 00p x =

1 3( )4 6p x x x= −

1 1 1 13 5 3 5( )5 3! 5! 6 120p x x x x x x x= − + = − +

( )(0)!

kxkfk

The kth term of the polynomial is

These polynomials are shown below along with the 9th degree MacLaurin polynomial x − x3/3! + x5/5! − x7/7! + x9/9!

These polynomials are shown below along with the 9th degree MacLaurin polynomial x − x3/3! + x5/5! − x7/7! + x9/9!

These polynomials are shown below along with the 9th degree MacLaurin polynomial x − x3/3! + x5/5! − x7/7! + x9/9!

These polynomials are shown below along with the 9th degree MacLaurin polynomial x − x3/3! + x5/5! − x7/7! + x9/9!

If the MacLaurin polynomials for a function f capture its behavior near 0 more and more closely as n increases, and the Taylor polynomials do the same about points other than 0, is it possible to capture the behavior of f exactly?

If the MacLaurin polynomials for a function f capture its behavior near 0 more and more closely as n increases, and the Taylor polynomials do the same about points other than 0, is it possible to capture the behavior of f exactly?

The idea is that we let the approximating polynomials become infinite, that is we turn them into infinite series.

Definition. The MacLaurin series for a function f(x) is the infinite series

Such a series is called a power series.

( ) (3)(0) (0) (0)2 3(0) (0)! 2 3!0

kf f fkx f f x x xkk

∞ ′′′= + + + +∑=

L

In general, the MacLaurin series will converge in some symmetric interval around 0, that is (−d, d), where d may be infinity. Where it converges, it will sum to f(x) exactly.

In general, the MacLaurin series will converge in some symmetric interval around 0, that is (−d, d), where d may be infinity. Where it converges, it will sum to f(x) exactly.

Example. Find the MacLaurin series for ex.

In general, the MacLaurin series will converge in some symmetric interval around 0, that is (−d, d), where d may be infinity. Where it converges, it will sum to f(x) exactly.

Example. Find the MacLaurin series for ex.

Solution. The general term of the series is ( )(0) .

!

kf kxk

Now the kth derivative of ex is ex, so ( )(0) 0

! ! !

k k kf x xkx ek k k

= =

In general, the MacLaurin series will converge in some symmetric interval around 0, that is (−d, d), where d may be infinity. Where it converges, it will sum to f(x) exactly.

Example. Find the MacLaurin series for ex.

Solution. The general term of the series is ( )(0) .

!

kf kxk

Now the kth derivative of ex is ex, so ( )(0) 0

! ! !

k k kf x xkx ek k k

= =

Thus the MacLaurin series is2 3 1

! 2! 3! !0

k kx x x xxk kk

∞= + + + + + +∑

=L L

We will show later that this series converges everywhere and its sum is ex.

Example. Find the MacLaurin series for cos(x).

Example. Find the MacLaurin series for cos(x).

Solution. The general term of the series is ( )(0) .

!

kf kxk

The derivatives of cos(x) form the pattern:cos(x), −sin(x), −cos(x), sin(x), repeat. Thus the odd ones are 0 at 0, while the even ones alternate between 1 and −1 at 0.

(2 1) (2 )(0) sin(0) 0; (0) ( 1) cos(0) ( 1)k k k kf f+ = = = − = −

Example. Find the MacLaurin series for cos(x).

Solution. The general term of the series is ( )(0) .

!

kf kxk

The derivatives of cos(x) form the pattern:cos(x), −sin(x), −cos(x), sin(x), repeat. Thus the odd ones are 0 at 0, while the even ones alternate between 1 and −1 at 0.

(2 1) (2 )(0) sin(0) 0; (0) ( 1) cos(0) ( 1)k k k kf f+ = = = − = −

Thus the MacLauren series is2 2 4 6 8 ( 1) 1

2 ! 2! 4! 6! 8!0

kx x x x xkkk

∞− = − + − + +∑

=L

We will show later that this series converges everywhere and its sum is cos(x).

Similarly, if we let the Taylor polynomial approximation increase without limit, we get the Taylor Series for f(x) at the point x0. It’s formula is

( )( )0 ( )0!0

kf x kx xkk

∞−∑

=

Example. Find the Taylor series for 1/x about the point 1.

Example. Find the Taylor series for 1/x about the point 1.

Solution. The general term of the series is ( )(1)( 1) .

!

kf kxk

The derivatives of 1/x proceed as follows:f(x) = 1/x, f′ (x) = −1/ x2, f′′ (x) = 2!/x3, f′′′ (x) = −3!/x4, f(4)(x) = 4!/x4,… In general we have

!( )( ) ( 1) .1

kk kf xkx

= −+

( )(1) ( 1) !.k kf k= −

Example. Find the Taylor series for 1/x about the point 1.

Solution. The general term of the series is

The derivatives of 1/x proceed as follows:f(x) = 1/x, f′ (x) = −1/ x2, f′′ (x) = 2!/x3, f′′′ (x) = −3!/x4, f(4)(x) = 4!/x4,… In general we have

!( )( ) ( 1) .1

kk kf xkx

= −+

Thus the Taylor series about the point 1 is

( 1) 2 3( 1) ! ( 1) ( 1) 1 ( 1) ( 1) ( 1) ...!0 0

kxk k kk x x x xkk k

∞ ∞−− = − − = − − + − − − +∑ ∑= =We will show later that this series converges in (0, 2) and its sum there is 1/x.

( )(1) ( 1) !.k kf k= −

( )(1)( 1) .!

kf kxk