ANumericalinlefrationisiastadler/na18/material/Notes19.pdfYo 2 z IIT Last class Lagrange...

12
Last class Lagrange interpolation Hermite interpolation finish ANumericalinlefrationisia 34 Kut IR distinct Yo y yutR 2 0,2 1 2 n 412 Find Pan E Bane such that Pantaleo Yi Rin Xi z 9 n pau.ci Hntk2iismatphofedit'mnmipkynauid What properties of Hu and Ka do we expect Hubli to IIT Kalki t.i.io finna iii

Transcript of ANumericalinlefrationisiastadler/na18/material/Notes19.pdfYo 2 z IIT Last class Lagrange...

Last class Lagrange interpolation

Hermite interpolation finish

ANumericalinlefrationisia34 Kut IR distinct

Yoy yutR20,21 2n412

Find Pan EBane such that

Pantaleo YiRin Xi z

9 n

pau.ciHntk2iismatphofedit'mnmipkynauid

What properties of Huand Ka do we expect

Hubli to IIT Kalki

t.i.io finna iii

Hula Lucia ll 2 Lien H xD E Gant

Kxtx LalxD Attn c Gant satisfy the

aboveconstraints

I76247

Theorem no f ab R f ant is continuous

then the v Hermiteinterpolant off

satisfiesunique

fGa Pan.la f fIIa TutiHD2

Mnt he x ta

12ht2Htt x

2

thx PantGc f Manta

ProfileExample For n I construct a cubic polynomial

B such that

Bait Balti pjco.tt B'a It

Xo O K I

BbcHoldyo

t ko 2o t Hildy t k 127211o

lol l

Kola t Hile

Local I K L Ix 3C for 26 024 1

Kola7432 x ko s l xp K

Hilal Lila I 241k Ge xD243 2x

Bce231 K2 K

i ego

computeapproximate

derivatives to f

How accurately does Prix approximate flex

Numerical differentiation

Recall fent sixfix Pma Tnt Knit

we can try todifferentiate the

above

except it's not clear that fuelis continuous

or evendifferentiable

If Pu is Lagrange interpolant off on aidwehave

f let pricey e pbMnet Cfa proof see

Siili

where Mnt man flat xRecap

If himlbnt.IM O then Rief

uniformly ou laid

Numerical Integration

The definite integrals

e'die andcoscaldic

are easy toevaluate

analytically

Unfortunately most integralscannot be

evaluated

analytically with for examplea table of integrals

For example

Idid and fcos da

Now for generalintegralsb

fun dua

ince polynomials are easy to integratethe

s f with a polynomial

idea is to replace

and integrate the polynomial exactly

Ne estReplace

fix with its Lagrangeinterpolaatof degree n

all thatis repaired

is the functionvalues fix

fabfun de I Rhodewhere the

interpolationpoints

ti at Andi i 91,2 n

are equidistantn Kai

Pala II Luck funLula Ito xn xD

Recall it

b

fix die I Lula fun da

II feed Latade

can be easilyprecomputed exactly

Earyacijweights

we

with above choices weobtain a Newlon

Cotes formula

of ordern

fi wgn Hanrem

For n I o Trapezoid rule

fix DX I PCH de

k at i xo a X b

P Ix Local ffa t L a fcb

xa bfeat t 3 fad

b Afca t x a FID

a

Realdie fzffiafbxdxtfcbbf.sc adx

bzIffca t f lbs

Jara ofthebtrapezoidi

j in

b j

Xo a 74 bwoped

Wo BIA W BI Wo ki2

For n 2 Simpson's Rule

a at i Xo a K BE x b

fields fled Lo t fail FIX d

w InadaI

du

evaluate theintegral with

the change ofvariables

Nb2Itt beta2that baa dt.by

wo Wao by symn.net

Remark youcould use the change of variables

or more simply expand the product

III H Gutta Ktx as

constant

and integrate eachterm separately

tbafabfinds Palmde bitfealtyffatty

FID

Since the weightsare

independent of f

they can beprecomputed

in advanced

ERRORESTIMATES

we seek tostudy the

error

Enif Iaflatde II Waffen

i e what is the wife of the error that

is beingcommited by integrating the Lagrange

interpolaert

ten I Ifda II we fun I

If da Procida

If Predictfix Pala Idn

RECAU

I HuipnhaltfnY.TT

Tntilx7l

facMnIjTTntilxYdseMna faf

tf GH

Now we can use thisestimate to determine

an

upper bound on the einer commitedwhen using

the trapezoid mule Crel

IE I E MI bfathisaldic

ME I all b Ida

May µ a b a die

b a 3Mr

12For Simpson's rule D

tea I E fable a x latbI ex b Ida

196

when f eThisistmetofatbe

NOTE Ei El D shown

Eoff 0 when f EPs fE z

n odd Newton Coles is dead for polynomials

of order N

Nis even Newton Coles

is exact forpolynomial

oforder net

Next class composite quadrature rules