+ All Categories

C1_L2

Date post: 26-Jan-2016
Category:
Upload: dinesh93
View: 213 times
Download: 0 times
Share this document with a friend
Description:
C1_L2
Popular Tags:
25
Taylor Series Chapter 1 Lecture 2
Transcript
Page 1: C1_L2

Taylor SeriesChapter 1 Lecture 2

Page 2: C1_L2

Taylor Series

Taylor series states that any smooth function can be approximated as a polynomial. The Taylor series then provides a mean to predict a function value at one point in terms of the function value and its derivatives at another point.

Page 3: C1_L2

Taylor Series

The Taylor series expansion of the function f(x) at xi+1 is given by

1ii xx

)(

)( 1

i

i

xf

xf

)(xf

x

nni

nii

ii

ii

Rhn

xfh

xfh

xfhxfxf

hxfxf

!

)(...

!3

)('"

!2

)(")(')(

)()()(

32

1

h

Page 4: C1_L2

Taylor Series

where and is a remainder term to account for all terms from n+1 to infinity:

where is a value of x that lies between

Usually is expressed as

where means the truncation error is of the order of

ii xxh 1 nR

1)1(

1

)(

)!1(

)(

!

)(

n

nk

nk

ik

n hn

fh

k

xfR

. and 1ii xx

nR

)( 1 nn hOR

)( 1nhO .1nh

Page 5: C1_L2

Taylor Series

The zero-order Taylor series approx. is

The first-order Taylor series approx. is

The second-order Taylor series approx. is

and so on.

In general, the nth-order Taylor series approximates the function with an nth-order polynomial.

)()( 1 ii xfxf

hxfxfxf iii )(')()( 1

21 !2

)(")(')()( h

xfhxfxfxf i

iii

Page 6: C1_L2

Taylor Series

Substitute and thus we get

This series is called Taylor series expansion of f(x) around the point xi.

iii xxhhxx 1

nn

ii

n

ii

iii Rxxn

xfxx

xfxxxfxfxf )(

!

)(...)(

!2

)("))((')()(

)(2

h

xi

)(

)(

ixf

xf

xx

Page 7: C1_L2

Maclaurin Series

For the special case where the Taylor series becomes

This series is called Maclaurin series expansion of f(x).

0ix

...!

)0(...

!2

)0(")0(')0()(

)(2 n

n

xn

fx

fxffxf

Page 8: C1_L2

Example 1

Use zero through fourth-order Taylor series expansions to approximate the function

at on the basis of the values at .

2.125.05.015.01.0)( 234 xxxxxf

11 ix 0ix

Page 9: C1_L2

Solution

The step size

We have

1011 ii xxh

4.2)(

9.04.2)(

0.19.02.1)("

25.00.145.04.0)('

2.125.05.015.01.0)(

)4(

)3(

2

23

234

xf

xxf

xxxf

xxxxf

xxxxxf

4.2)0(

9.0)0(

0.1)0("

25.0)0('

2.1)0(

)4(

)3(

f

f

f

f

f

Page 10: C1_L2

Solution

The true value of f(x) at is

The zero-order Taylor series approx. is

The true error is

The first-order approx. is

The true error is

11 ix

2.02.125.05.015.01.0)1( f

2.1)0()1( ff

0.1|2.12.0| tE

95.0)0(')0()1( hfff

75.0|95.02.0| tE

Page 11: C1_L2

Solution

The second-order approx. is

The true error is

The third-order approx. is

The true error is

45.0!2

)0(")0(')0()1( 2 h

fhfff

25.0|45.02.0| tE

3.0!3

)0('"

!2

)0(")0(')0()1( 32 h

fh

fhfff

1.0|3.02.0| tE

Page 12: C1_L2

Solution

The fourth-order approx. is

The true error is

Thus, the 4th-order Taylor series approx. of f(1) is equal to the true value. We observed that the truncation error is decreased by the addition of terms.

2.0!4

)0(

!3

)0('"

!2

)0(")0(')0()1( 4

)4(32 hf

hf

hf

hfff

0|2.02.0| tE

Page 13: C1_L2

Example 2

Use Taylor series expansions with n=0 to 5 to approx.

on the basis of the value at

31 at cos)( ixxxf

.4ix

Page 14: C1_L2

Solution

The step size

The true value at is

The zero-order Taylor series approx. is

The true percent relative error is

12431 ii xxh

31ix 5.0)cos()( 33 f

707106781.0)cos()()(

)()(

443

1

ff

xfxf ii

%4.41%1005.0

707106781.05.0

t

Page 15: C1_L2

Solution

The first-order approx. is

The true percent relative error is

521986659.0))(sin()cos())((')()(

)(')()(

124412443

1

fff

hxfxfxf iii

%40.4%1005.0

521986659.05.0

t

Page 16: C1_L2

Solution

The second-order approx. is

The true percent relative error is

497754491.0)(2

)cos())(sin()cos()(

!2

)(")(')()(

212

412443

21

f

hxf

hxfxfxf iiii

%449.0%1005.0

497754491.05.0

t

Page 17: C1_L2

SolutionThe third-order approx. is

The true percent relative error is

499869147.0

)(!3

)sin()(

!2

)cos())(sin()cos()(

!3

)('"

!2

)(")(')()(

312

4212

412443

321

f

hxf

hxf

hxfxfxf iiiii

%0262.0%1005.0

499869147.05.0

t

Page 18: C1_L2

Solution

The fifth-order approx. is

The true percent relative error is

Thus, the inclusion of additional terms results in an improved estimate.

500000304.0)(!5

)sin()(

!4

)cos(

)(!3

)sin()(

!2

)cos())(sin()cos()(

512

4412

4

312

4212

412443

f

%000060838.0%1005.0

500000304.05.0

t

Page 19: C1_L2

Example 3

A chemical solution is tested in a temperature chamber. Microwave signals are transmitted towards the solution and the reaction is reported with the following function

(a) Find the sixth-order Maclaurin series for the reaction that happened between t=0 and 0.5 seconds

(b) Calculate the true value of k from the function definition.

5.0

5.00)(

3

tk

tettf

t

Page 20: C1_L2

Example 3

(c) Starting with the simplest version of the Maclaurin series obtained in part (a), add terms one at a time to estimate k by considering the intersection point t=0.5 between the two steps of the function. After each new term is added, compute the true and approximate percent relative errors. Add terms until the absolute value of the approximate error estimate falls below a pre specified error criterion %.10s

Page 21: C1_L2

Solution

(a) Here

The Maclaurin series expansion of f(t) is

t

t

t

t

t

t

t

ettttf

ettttf

ettttf

ettttf

ettttf

etttf

ettf

)1890120()(

)156060()(

)123624()(

)9186()(

)66()("

)3()('

)(

32)6(

32)5(

32)4(

32)3(

32

32

3

120)0(

60)0(

24)0(

6)0(

0)0("

0)0('

0)0(

)6(

)5(

)4(

)3(

f

f

f

f

f

f

ft

6615

2143)( tttttf

Page 22: C1_L2

Solution

(b) The true value of k from the function definition is

(c) The pre specified error estimate is

First estimate:

The true percent relative error is

206090158.0)5.0()5.0( 5.03 efk

%.10s

125.0)5.0()5.0(

)(3

3

fk

ttf

%35.39%100206090158.0

125.0206090158.0

t

Page 23: C1_L2

Solution

Second estimate:

The true percent relative error is

The approx. percent relative error is

1875.0)5.0()5.0()5.0(

)(43

43

fk

tttf

%0204.9%100206090158.0

1875.0206090158.0

t

%10%33.33%1001875.0

125.01875.0

sa

Page 24: C1_L2

Solution

Third estimate:

The true percent relative error is

The approx. percent relative error is

203125.0)5.0()5.0()5.0()5.0(

)(5

2143

52143

fk

ttttf

%4388.1%100206090158.0

203125.0206090158.0

t

%10%6923.7%100203125.0

1875.0203125.0

sa

Page 25: C1_L2

Solution

Thus, after three terms are included, the approximation error falls below and the approx. value of k is 0.203125.

%10s