taylor series mika seppälä. mika seppälä: taylor polynomials approximating functions it is often...

12
Taylor Series Mika Seppälä

Upload: evan-shepherd

Post on 03-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Taylor Series Mika Seppälä. Mika Seppälä: Taylor Polynomials Approximating Functions It is often desirable to approximate functions with simpler functions

Taylor Series

Mika Seppälä

Page 2: Taylor Series Mika Seppälä. Mika Seppälä: Taylor Polynomials Approximating Functions It is often desirable to approximate functions with simpler functions

Mika Seppälä: Taylor Polynomials

Approximating FunctionsIt is often desirable to approximate functions with simpler functions. These simpler functions are typically functions whose values can be easily computed and whose behavior is well understood. That allows one to study the properties of complicated functions using such approximations.

Definition The Taylor polynomial of degree n for given function f at a point a is a polynomial P of degree n such that P(k) (a)=f (k)(a) for k=0,1,…,n. This means that the value of the polynomial P and all of its derivatives up to the order n agree with those of the function f at the point x=a.

Observe that the defining conditions for the Taylor polynomial have to do with the behavior of the polynomial at one point only.

We assume that the function f is has derivatives of all orders everywhere in its domain of definition.

Page 3: Taylor Series Mika Seppälä. Mika Seppälä: Taylor Polynomials Approximating Functions It is often desirable to approximate functions with simpler functions

Mika Seppälä: Taylor Polynomials

Formula for Taylor Polynomials at x=0

0 1Let P be a Taylor polynomial for a given

function f at 0. Assume that f has derivatives of arbitrary high

order at 0.

nna a x a x

x

x

0P(0) a2P''(0) 2a1P'(0) a

3P'''(0) 3 2a

( )P (0) ( 1) 3 2 !kk kk k a k a

Straightforward differentiation yields.

The general formula is

( )( ) ( ) f (0)

The defining condition P (0) f (0) yields: .!

kk k

kak

We conclude that the Taylor Polynomial for a infinitely differentiable function f at x=0 is uniquely defined, and that the coefficients ak are given by the above formula.

Page 4: Taylor Series Mika Seppälä. Mika Seppälä: Taylor Polynomials Approximating Functions It is often desirable to approximate functions with simpler functions

Mika Seppälä: Taylor Polynomials

Taylor Polynomial for the Sine Function

2 13 51 1 ( 1)

sin( ) .3! 5! (2 1)!

n nxx x x x

n

Formula

The following figure illustrates Taylor polynomials of degrees 5 (blue), 9 (red) and 15 (green) for the sine function.

One concludes from the picture that all of the above Taylor approximations for the sine function appear to approximate the function well near the origin (center of the above picture). Higher order Taylor polynomials approximate better away from the origin.

Page 5: Taylor Series Mika Seppälä. Mika Seppälä: Taylor Polynomials Approximating Functions It is often desirable to approximate functions with simpler functions

Mika Seppälä: Taylor Polynomials

Basic Taylor Polynomials

2 4 2 2

0

1 1 ( 1) ( 1)cos( ) 1

2! 4! (2 )! (2 )!

n knn k

k

x x x x xn k

2 1 2 13 5

0

1 1 ( 1) ( 1)sin( ) .

3! 5! (2 1)! (2 1)!

n n k kn

k

x xx x x x

n k

2 3

0

1 1 1 1e 1

2! 3! ! !

nx n k

k

x x x xn k

2 3( 1) ( 1)( 2) ( 1) ( ( 1))(1 ) 1

2! 3! !p np p p p p p p p n

x px x x xn

The above approximations are valid (usable) for all values of x.

The Taylor approximation below is valid only for -1<x<1.

Page 6: Taylor Series Mika Seppälä. Mika Seppälä: Taylor Polynomials Approximating Functions It is often desirable to approximate functions with simpler functions

Mika Seppälä: Taylor Polynomials

Basic Taylor Series

2 4 2

0

1 1 ( 1)cos( ) 1

2! 4! (2 )!

kk

k

x x x xk

2 13 5

0

1 1 ( 1)sin( ) .

3! 5! (2 1)!

k k

k

xx x x x

k

2 3

0

1 1 1e 1

2! 3! !x k

k

x x xk

Letting n grow the Taylor polynomials define Taylor series for the respective functions. Basic Taylor Polynomials yield the following Basic Taylor Series.

2 3( 1) ( 1)( 2)(1 ) 1

2! 3!p p p p p p

x px x x

These series expansions are valid for all x.

This series expansion is valid for -1<x<1.

The Binomial Series

Page 7: Taylor Series Mika Seppälä. Mika Seppälä: Taylor Polynomials Approximating Functions It is often desirable to approximate functions with simpler functions

Mika Seppälä: Taylor Polynomials

Taylor Polynomials at x=a

The conditions used to define a Taylor polynomial P of a given function f require that the polynomial P and all of its non-zero derivatives at a point x=a agree with those of the function f. Clearly the definition implies that the polynomial P approximates the function f best near the point x=a.

Formula for Taylor Polynomials at x=a Assume the function f has all derivatives at the point x=a.

( )2f´( ) f´´( ) f ( )

P( ) f( ) ( ) ( ) ( )1! 2! !

nna a a

x a x a x a x an

Taylor polynomial of degree n at x=a is

The above formula follows by directly computing the values of the derivatives of the function f and those of the polynomial P at x=a.

Page 8: Taylor Series Mika Seppälä. Mika Seppälä: Taylor Polynomials Approximating Functions It is often desirable to approximate functions with simpler functions

Mika Seppälä: Taylor Polynomials

Goodness of Approximations

The following figure shows the graph of the sine functions and those of its Taylor polynomials of degree 5 at the points x=-x=0x=x=2x=3

The Taylor polynomial of degree 5 at the point x=-approximates the sine function so well near the point x=- that its graphs is completely covered by the black graph of the sine function near that point. As x< -3or x> - the approximation fails to follow the graph of the sine function. These portions of the graph of the Taylor polynomial of degree 5 at x=- are shown as the left most red graphs above and under the x -axis.

Page 9: Taylor Series Mika Seppälä. Mika Seppälä: Taylor Polynomials Approximating Functions It is often desirable to approximate functions with simpler functions

Mika Seppälä: Taylor Polynomials

Finding Taylor Series

One can find Taylor series for complicated functions by

1. Substitutions

2. Integrating a series term by term

3. Differentiating a series term by term

4. Any combination of the above tricks

One usually starts with one of the basic Taylor series and manipulates that to get the desired Taylor series. The above tricks are legal provided that the series in question converge and represent the functions in question. This depends on the function for which Taylor series representation needs to be derived. Many of the basic Taylor series converge everywhere.

Page 10: Taylor Series Mika Seppälä. Mika Seppälä: Taylor Polynomials Approximating Functions It is often desirable to approximate functions with simpler functions

Mika Seppälä: Taylor Polynomials

Finding Taylor Series by Substitution

2 2

2 3

0

To find Taylor series at 0 for the function e substitute -

to the basic Taylor series

1 1 e 1

2! 3! !

x

nz

n

x z x

zz z z

n

22

2 4 6

0

One gets

1 1 ( 1) e 1

2! 3! !

n nx

n

xx x x

n

Page 11: Taylor Series Mika Seppälä. Mika Seppälä: Taylor Polynomials Approximating Functions It is often desirable to approximate functions with simpler functions

Mika Seppälä: Taylor Polynomials

Finding Taylor Series by Integration

2

0

1Since 1

1n

n

x x xx

1

0 0

1 1.

1 1n n

n n

dx x dx x Cx n

1 2 3

0

This implies

1 1 1ln 1 .

1 2 3n

n

x x C C x x xn

1 2 3

0

Evaluating the above for 0 one gets 0. Hence

1 1 1ln 1 .

1 2 3

This expansion is valid for 1.

n

n

x C

x x x x xn

x

Page 12: Taylor Series Mika Seppälä. Mika Seppälä: Taylor Polynomials Approximating Functions It is often desirable to approximate functions with simpler functions

Mika Seppälä: Taylor Polynomials

Finding Taylor Series by Differentiation

2

0

Since

1 1

1-n

n

x x xx

1 22

0 0

1 1 1 2 3

(1 ) 1n n

n n

d dx nx x x

x dx x dx

The above formula is a special case of the binomial series.