0% found this document useful (0 votes)
21 views4 pages

ws05 02 24 2021 Soln

This document provides a math worksheet with two problems involving Lagrange interpolation and Newton forward difference formulas. Problem 1 uses Neville's method to find Lagrange interpolating polynomials of degrees 1, 2, and 3 to approximate a given function at different values. Problem 2 uses the Newton forward difference formula to construct interpolating polynomials of degrees 1, 2, and 3 for given data and approximates a specified value using each polynomial. The worksheet provides the relevant formulas and steps to solve each problem.

Uploaded by

hind.mtawa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views4 pages

ws05 02 24 2021 Soln

This document provides a math worksheet with two problems involving Lagrange interpolation and Newton forward difference formulas. Problem 1 uses Neville's method to find Lagrange interpolating polynomials of degrees 1, 2, and 3 to approximate a given function at different values. Problem 2 uses the Newton forward difference formula to construct interpolating polynomials of degrees 1, 2, and 3 for given data and approximates a specified value using each polynomial. The worksheet provides the relevant formulas and steps to solve each problem.

Uploaded by

hind.mtawa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Math 128A: Worksheet #5

Name: Date: February 24, 2021


Spring 2021

Problem 1 (3.2 #1a). Use Neville’s method to obtain the approximations for Lagrange interpolating
polynomials of degrees one, two, and three to approximate the following:

degree f (8.4) if f (8.1) = 16.94410, f (8.3) = 17.56492, f (8.6) = 18.50515, f (8.7) = 18.82091
tr
Qi
a
,j=Pijn
last point points interpolated

/ Q n o = H s b 4 92
Oth 1st 2nd 3rd
x;
degree degree degree degree
-
- -
-

Xo Quo -

-
16.94410

x.
I !! ! !
! ?:{I} Qa!
.IT?IIIssQs.s=tt.8t7H2sXzQz.o-- ,
18.50515
431=17.87363
% Qso =
18.82091

Qi ,o =P ; -

-
flexi) Qo ,o=Po=fGD-_ 16.94410

8.4 Paju .si Pies


. . .

.
. . .
.it
I 11 II
G- xi-DQiis-i-G-xiSQi.by ,
Qi =
,
; Xi Xi
j
-
-

Lx xD Quo G 4)
0-0,0=0.3 17.50-492 0.1 16.94410
- -
- -
. .

Q ,, ,
=

X, -
Xo O 2
-

=
17.87533

1
Problem 2 (3.3 #3b). Use the Newton forward-di↵erence formula to construct interpolating polynomials
of degree one, two and three for the following data. Approximate the specified value using each of the
polynomials.

f (0.25) if f (0.1) = 0.62049958, f (0.2) = 0.28398668, f (0.3) = 0.00660095, f (0.4) = 0.24842440

FD : Pdx)=fGo]t8[xo.xdlx-xostffxo.x.xdlx-xokx-xist.n.tffeos-sxnIG-xd-lx-xn.is
BD : PnhD= S-fxdtffxn-i.xiflx-xdtfcxn-zixn-iixdlx-xdlx-xn.IT . . - tfcxo .
. . .

,xn]Lx -
)
xn . . -
G- xD

constant linear quadratic cubic

/
Xi Hei] ffxii ,
Xi ] flexi Xi ,xi]
z
-

,
-
i Fleiss . .
-

]
Yi
O ,
.
-0.62049958
3.365129

o.zgzgggggz.goggy.gg?gqgzgfzofzgs.o.yzg,gygy
0.2 -

0.3 0.00660095
2.4182345
0.4 0.24842440

Exit Stx:-D
FCxiI=fGi)
-

fam ,
=
Xi -
Xi I
-

]=f¥?IfD=
0.2839 0.6204
fcxo ,× it
-

3.36512g
. . .

=
,

In
general ,
f[×i ,
. . .

,
+
g) =
faith . - -
Nit ;] -
f- Exi .
-

→ Vitti]
Xitj -
Xi

.bg?IfofhoND--
FLY 2.905 -3.365
f- fro ,x ,×z] ,
=
. . .

0.2
. . .

= -2.2962635

¥¥%tffxo,xDG xD
Poch = =
-0.62049958
p
,
=
-
=
-0.62049958+3.3651296-0.1)
P (0.257=-0.11573023
,

Pdx)=f[xoIt8[xo.x.JG-xdtfcxo.xi.xdcx-xoJG-xD-P.CA -
2.29626356-0.134-0.2)
Paco 255=-0.13295220625 .

BG)=f[xoItf[xo.x.JG-xdtffxo.xi.xdcx-xoJG-xdtffxo.x.xz.xdcx-xoJG-x.IQ xD -

=PzGD -0.473151676-0.116-0.214-0.3)2
136.25) x 0.132774774375 -
Problem 3 (3.4 #1b and #3b).
1 b. Use the Hermite theorem or divided di↵erences to construct an approximating polynomial for the
following data:

x f (x) f 0 (x)
0.8 0.22363362 2.1691753
1.0 0.65809197 2.0466965

3b. This data was generated by the function f (x) = sin(ex 2). Use the interpolating polynomials from 1b.
to approximate f (0.9).

lb .

zi f[z ;] ffti -
i , ffti-z.2-i.it ;] Fftos .
-

→ Zi]

zero
-

- 0.8 FEED 0.22363362


-

f' ↳D= 2.1691753


0.01598225
Z
,
-4=0.8 fth)= 0.22363362
2.17229175 -3.2177925
ZEH -1.0 fled -
0.65809197 - 0.62797625
F' GD -
2.0466965
+5×1=10 ftp.zo.fggoqgg

HEI f-Gai -

flew ,
=

Zi
-

Zo -
I

8427 -
FEED 0.65809197-0.2236 '

gqz , ,zzy= 2.17229175


-
-

= =

Zz -
Z
, 1*0 -
0.8

FC2.e.zo.i.zif-flti-hziJ-fftiz.zi.IT
Ze -
2-¥2

HID =fLzDt8 '

lx-zdtffeo.znziflx-zdlx-zidtfczor.EU Zo)G-ZDkZd
-

His I 0.22863362 2.16917531×-0.87+0.015582256-0.812 -3.21779256-0.854 D


-

2b .
flo -9) -
Helo .
= 0.443924765

Error : lflo.93-HIO.tl/--lsrnLeO'9-27-0.4439247651=3.232×10-4

/ Ix xoklx-x.la there
3
Errorbound : IHO -9) THO 9) I -

.
=
If -

.
,
SMG) is really gross ,

at the idea is bound it on


you
the internal co 8. 1.0]
-
Problem 4. Consider the function f (x) = cos(x). Use divided di↵erences to compute the interpolation
polynomial H(x) of degree at most 2 satisfying

H(0) = f (0), H(⇡/2) = f (⇡/2), H 0 (⇡/2) = f 0 (⇡/2).

For small " > 0, compute the interpolation polynomial L(x) of degree at most 2 satisfying

L" (0) = f (0), L" (⇡/2 ") = f (⇡/2 "), L" (⇡/2 + ") = f (⇡/2 + ").

Let " approach 0. What do you observe and why?

Xo =D ,
X ,
=
¥ Zo -
-
Xo , Z
,
- Xi , Zz=X ,

Zi fled ffti-i.ES ffti.z.Zi-i.fi]


O l o I
Ee
-

= -

HE
Etta
-

E O = -

FEE)= -

I
E O

tffto.ZIG-zdtffeo.z.zdl x)-zdlx-ZD-l-zxtf.EE
HGD ⇐
FEET
) - G E
-

Xo = O
,
x, =
'Z -
E
, Xz=¥tE
Xi FAI fcxi i. x-D - f- Go x. xD
,

0 I costed -
I
= C,
E E
4 too
E- cost )
lazy to write this out
E
-

e ←
cos cos
-

E) Ea-
+
=q
ETE cos +
e)
Thus, Lew -_ f- Go] tfcxo.xDG-xdtffxo.sn , G- xD G-xD

= It
cos
.EE?-txt.EfexLx-EEiD
As e-20 ,
c, -2
osE¥ =
-

E , ↳→ ¥ cos /*¥=-smED= -

and →
ttz = -

,¥t¥

Thus ,
Lew → LG) -

-
I -

Exit # 't)xG E) t
-
-

-
HG)
Thrsrs because
,
as so
e-
,
the conditions ↳ Etc)=fCEtE) and LELE e) FEE e)
- - -

give
4
Eso Le Este)
'
Eso SIETE) FED
LEE)
}
'
a) these the
-
-_
-

are
-

(2) L' (E) =


'
Eso
LEE LEE -

D= Eso S-EEtdz-HE-D-f.cz) conditions for H

You might also like