let fi ai -0 112 n times differentiable we

9
Taylor polynomial approximation Let fi ( ai b ) -0 112 be n - times differentiable , for some WE IN and let us denote by f ' " c × ) its km derivative at x which exists for all he 3014 - in } . ( here f ' " cx ) = f Cx ) ) Given Xo E La , b) , the Taylor formula for f of order n with starting point to is ~ ftp.7 f Cx ) = £ g. Cx - xD " t e ' I ? C x ) , the Ca , b) k = 0 where e' I ? C x ) is said to be the error at order W . ( n ) Taylor 's theorem states that line exo G 7 - = O x Xo ( x - AT and moreover if f is endowed of a Ceti ) th derivative in Ca , b) , I Cx ) = f "x ) ex - xoj " for some Tx E ( xo , × ) . C htt ) ! Before proving the theorem , we want to convince ourselves that the approximation it gives makes sense in a couple of cases i

Upload: others

Post on 01-Jan-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Let fi ai -0 112 n times differentiable WE

Taylorpolynomial approximation

Let fi ( ai b ) -0 112 be n - times differentiable, for some

WEIN and let us denote by f' "

c × ) its km derivative

at x which exists for all he 3014 - - - in } .

( here f' "

cx ) = f Cx ) ) . Given Xo E La ,b)

,the Taylor

formula for f of order n with starting point to is

~

ftp.7f Cx ) = £

g.Cx - xD

"

t e

' I? C x ),

theCa , b).

k = 0

where e' I? C x ) is said to be the error at order W.

( n )

Taylor 's theorem states that line exo G 7-

= O

x → Xo ( x - AT

and moreover if f is endowed of a Ceti )th

derivative

in Ca , b) ,I Cx ) = f "x ) ex - xoj

"

for some

Tx E ( xo,

× ).

C htt ) !

Before proving the theorem,

we want to

convince ourselves that the approximationit gives makes sense in a couple of cases i

Page 2: Let fi ai -0 112 n times differentiable WE

Fix Xo E Ca , b) and assume we want to find a

polynomial of degree 0 ( i.e.

a constant function )which

agrees with f Cx ) at the point Xo.

This is clearly the polynomial Xo,

whose graphis that of the line y = Xo

L

tix y-- f exo )

I

Xo X

Tf we ask for an approximation by a 1st order polynomialwe have to specify a parameter : every

1st order

polynomial whose graph passes through the point ( xo,f- Kd )

can be written as tcxo ) t in C x - Xo ) ,meth

.

Its graph is one of the straightlines y= fast in K - Xo )

We can now further ask which of those line

approximatefun better.

We need to define an approximationerror i e !! Cx ) = f HI - ftHolt mfx - Xo ))

,m

Note that fun l !? C xo) = o

in

Page 3: Let fi ai -0 112 n times differentiable WE

Wesay

that the error is the best if m is sucha )

e Cx )

that lion Him=

o

x → Xo ( X - Xo )

this condition gives

• =

him f Cx ) - fcxo ) - m ( x - Xo )=

him txl- in

x. → xo C x - Xo ) x -2 XoX - Xo

a )

⇐ b in -

- f Go ) ( = f'

Go , )

andy

= fcxo ) tf'

Got C x - Xo ) is the tangent line

to the graph of f at the point ( xo, flexor ) -

For such m,

we cell the error eat Cx ).

x y = tcxdtftx.lk - Xo )

9 ex ) = error at x if we approximate text• i y = tho )

with the tangent line at Xo .

:

I D

Xo XX

We repeat the question assuming to use an

approximationby a second - order polynomial .

y = f Chol t m Cx -

xo ) + ccx- Xo )2

Page 4: Let fi ai -0 112 n times differentiable WE

The error e!!m,ccx) = f Cx ) . f- Cbl - mcx - xo ) - ccx . %)2

a )e Cx )

Imposing now lim * mic=

o we get m = flew)x → xo X - Xo

(2)e Cx )

To optimize over C we now requirehim

bit'

case= O

X -7 Xo Cx - Xo )2a)

Note that lion e⇐ 7

xoyfkxo),

C

X -3×0 ¥=

=lim text - fcxo ) - think - a ) - CK - xo5

x -3 to Cx - Xo )2

deltas. him thx ) - ttxo ) - 2 CG - xo )

=

xoxo 2 C x - Xo )

= lim thx ) - f'

↳ ,

x -

not -c = o ⇐ is c= If

"

Go )

-"

{ F''

Go )

For the choice m=f' exo ) and c=f' we

cell the 2nd order error eatin,

och : = e !! Cx ).

we here proved that fcx ) = ¥of "L cx-xdhte.Y.kz

with e' ! CM→ o

-

( x - a)2 Xoxo

Page 5: Let fi ai -0 112 n times differentiable WE

As x → x .we call Cx - edh infinitesimal of order he

.

The Taylor polynomial of order n of fcx ) with startingpoint Xo approximates fcx ) with an error LIK )

which is an infinitesimal of higher order with

respect to Cx - xoT .

Example text = et we want the

Taylor polynomial of order 4 with shorting point

Xo = O.

Remember thot f = et t k =p f' 403=2--1

The Taylor polynomial of order 4 is

4

I I ,

Cx - of= it x t I t +

Ik=0 24

( remember that k ! = k Ck - r ) ( k - 2) .

. - .

. 1)Ft is

very Ompontant to find explicit expressions

for the error , of course .

The following theorem uses Lagrange theorem

to write the error -

Page 6: Let fi ai -0 112 n times differentiable WE

Theorem ( Taylor with Lagrange error )Let fi Ca ,

b ) -0112 be Cute ) - times differentiable

in Ca , b) .

let Xo E Ca , b ),

then Fxtxo there exists

§ in the internal of extreme x andx -such that

ex? 'cx)= F" s × - * 5th ( Lagrange error )@ ti ) !

Proof Fix for simplicity xsxo ( the case × > Xo

can be dealt with similarly ) .

We set

bunk ) : = Cut , ) ! extra )

( x - a)htt

'

2- the internal Ex , xo ] we consider the function

goys = In f "I ex . et t hit )k= o

the function g is continuous in Ex ,to ] and differentiable

in Cx , Xo ) j moreau

gcxi-E.tt?Yycx-xsht hncx ) = tix )

- -

" do

f-' 7×7.1a-

gcx.is-E.tk?gy3cx-xo5+4-xoI..hncx) = Fix )

( htt ) !

x )

Page 7: Let fi ai -0 112 n times differentiable WE

Since gCx ) = g Ko ) we can apply Rolle 's theorem

to get that F EE Cx , Xo ) : g'

C 5×7=0

We now compute g' Cy ) :

guys ⇐IIE ,F'

"

In ex - y )h

+

InI ,

I Ty ) .mx . yin :c . i )

- ht r

ftp.K-y/hnCx7--EitIIIcx-si-i-E.III.cx-n"

he

- ÷,

Cx - y )"

- hncx )

( htt )= tnc Cx - yjn - HII.

Cx -

y5=n ?

= 4-2,5 E ft"

Ty ) - him ]

g'

CE ) = o ⇐ is f"

E) = huey = @th ! eii( X - Xo )

htt

⇐ b e !? =

f-' F) E) ¥5

"

( htt ) !⑤

Page 8: Let fi ai -0 112 n times differentiable WE

In the previous example

e×= If I ,

xh +e' It ex )

By the previous theorem eY" ↳ =6×5%5 )I

⇒×

'= e

120

For xe

fi, i ) we have 1¥ Iset

.

120

This allows us to say that the error we make ifwe approximate et with it x txt Ig t x÷ for

x E C- I, e) is at most ↳ = 0.023

We now ask ourselves which order in the expansion

should we take if we want an error less than

to-

6

.

since et 'e I @5"n} .

" Is e÷'

,

it is enough to have ÷ s to- °

,

or

equivalently n ! 3 e. too which is satisfied byin 3 to . Eventually we have proved thot the

approximation of ex in C- in ) with a polynomialof order n= 10 produces an error less then to

- 6-

Page 9: Let fi ai -0 112 n times differentiable WE

Example him cos x - I

x → o cos C x' 'a ) - ttxlz

cos x = i - Eg t ¥4 - sing xs

cos = i - Ez t XI,

- sin Eh

=D cos x - t =- XI + sink ×3

6

as- it In

,

- si Eh

him II*.

-- E:

⇒is¥x - so

¥4 - sin x%=

=

him

MC- It sink .

× )× - so

= = -k

Note that it is notnecessary

to have the error expressed

in the Lagrange form to complete the exercise i

Osx - is = - I +

ej"ex ,

ask "7 - it { = ¥,

+ e ?'c x

's)

him %*¥ -- Liao

Mfk+ )

= -iz since

⇐ o

HCE,

+

ei"g)

fins.

⇒, E's

.

= fi: ei"c=o( x' E) 4