MAT-31101 Numeerinen analyysi 1 tentti L7.3.2008 MAT-31106 Numerical Analysis 1 Exam L7.3.2008
Tenttssii saa kriyttriri tauallista to,i, graafi,sta/ohjemoi,tauaa laskr,nta ja yhtci kaksi,puolr,sta Al si,uua mur,stiznpanoja. Ei, saa kciyttcici suurennuslasi,a. Laskuzssa urilzuar,heet on kr,rioi- tettaua nrikyur,rn.
You are allowed to use a plai,n or graphing/programmable calculator and one two-sided Al sheet of notes. A magni,fyi,ng glass maE not be used. Show all calculat,ion steyts.
1. Arvioi suureen JF +T suhteellinen virhe ja anna oikeiden desimaalien lukumddrd,, kun z x 3.21 (2 oikeaa desimaalia) ju A x 7.654 (3 oikeaa desimaalia).
Estimate the relative error and give the number of correct decimals of JPTfi when r x 3.27 (2 correct decimals) and g x 7.654 (3 correct decimals).
A n s w e r . S u b s t i t u t i n E i : 3 . 2 I , A :7.654, A,r :0.005 and AE : 0.0005 i n t o
L(r2 +'az)tlz _ xLr(r2 + a2)*rlz + a\r@z + a2)-r/2 _ ra,r + aLa
- @ + s \ l l - : - r 2 + - a 2
gives relative error 2.9 x 70-a. The absolute error is
##ffi : 0.0024 < 0.005
and so the number of correct decimals is two.
Selitti puolittamismenetelmdn edut ja haitat Newtonin ja Raphsonin menetelmddn verrattuna.
Discuss the advantages and disadvantages of the bisection method compared with the Newton-Raphson method.
Answer. Disadvantages: linear convergence rate (vs. quadratic for NR), need to provide ftlo starting r values with different function sign (NR needs one starting value). Advantages: no need to compute derivative (NR requires derivatives), gua- ranteed convergence (NR can diverge), rigorous error bound (interval width) at every iteration (NR step size is not a rigorous bound on error).
Etsi alla olevan taulukon Lagrangen interpolointipolynomi ja Newtonin interpo- Iointipolynomi, ja todista (kirjoittamatta auki kumpakaan polynomia!) ettd ne ovat sama funktio.
Find Lagrange's interpolating polynomial and Newton's interpolating polynomial for the above data, and prove (without expanding either of the polynomials!) that they are the same function.
Answer. Lagrange's form is
pre): (-o o8er) !1 -
il!1 -
:]+(o oloo)g -
:llf -
:l +(o loes)g:i$+
( 0 - r ) ( o - 3) ' - - ' ( 1
The divided difference table
2 .
' J .
- 0 . 0 8 9 9 0 . 0 1 0 . 1 0 9 8
0 . 0 9 9 9 -0 . 0 1 6 6 6 7 0.0499
r
so Newton's form is
? N ( r ) : - 0 . 0 8 9 9 * 0 . 0 9 9 9 r - 0.016667r(r - 7)
The polynomials pl and p1,1 are both of degree at most 2 and have the same values (ut /) at the three distinct points {0,1,3}, so (by the theorem on uniqueness of interpolating polynomials) are the same function.
4. Laske fl r'dr Rombergin menetelmd,S kdyttrien (vrihintririn kohne saraketta).
Compute [f r' d,r using the Romberg method with at least three columns.
7 r . 2 5 1 . 5 r . 7 5 2 2 . 2 5 2 . 5 2 . 7 5 3 r L.3217 1.8371 2.6627 4 6.2003 9.8821 16.1500 27
Answer: The first column is computed using recursive trapezoid rule:
T t ( 2 ) :
2, ( t + 2 T ) : 2 s n ( 1 ) : irrQ)+1.(4) :13
rrG) : irr!) +;(1.s371 + e.8821) : 14.85e6
rrG) : *Tr(il + i0.32rr + 2.6627 + 6.2003 + 16.1500) : r4.0r34
The second column is computed using extrapolation:
T t ( l ) - T 1 ( 2 )
T z ( r ) :
rrG) : rrG) :
The third and
The Romberg
7 1 ( 1 ) +
. n r 1 t , l 1 t ; / t
rr(i) +
fourth
r'(i)
. n r 1 r
_ r 3 \ a /
. f ' l l \ t 4 \
4 )
table is
h,
: 14.0134 *
1 R _ 2 R : 1 8 * - : 1 1 . 6 6 6 7
q i ) ; Z ' A : 14 8 5 e 6 . 4 g 5 F j ! : 13.8128
r'G) - r'G) 14.0134 - 14.8596
: 1 3 . 7 3 1 3
d
columns:
: 1 3 . 8 1 2 8 + : 1 3 . 7 3 1 3 + : 13.7259 +
1 3 . 8 1 2 8 - \4.6667 1 5
1 3 . 7 3 1 3 - 1 3 . 8 1 2 8 1 5
13.7259 - 13.7559
: 13.7559 : 1 3 . 7 2 5 9 : 13.7254 63
rr(h) rz(h) rr(h) rq(h)
2 2 8 1 1 8
0 . 5 1 4 . 8 5 9 6
0.25 r4.0r34 13.7254.
14.6667
1 3 . 8 1 2 8 1 3 . 7 5 5 9
13.7313 73.7259 13.7254
and f r'd,r x
5. Etsi toisen asteen polynomi 72@), jokaon taulukossa olevan datan paras neliosumman likiarvo, ja kirjoita p ortogonaalisten polynomien summana.
x ; l - z - 1 t 2
W
Find the degree-2 polynomial p(r) that is the best least squares approximation of the data tabulated above, and express p as a sum of orthogonal polynomials.
Answer. The polynomials po(r):1and n@): r are orthogonal with respect to
t h e i n n e r p r o d u c t ( f ,g): f (-z)g(-z) +/(-t)g(-t) +/(t)g(r) + f (z)g(z). T h e
next monic orthogonal polynomial is p2(r) : rpt(") - ltpo(r) : tr2 - 11 with . r , - l q t , I t r ) : 1 0 : q
\ p o , p o ) 4 2
The best least squares approximation is p(r) : copo(r) i crpt(") + c2p2(r) : cs -l c1r + c2(r2 - !) with
(f ' po)
c 0 : r
lPo, Po ) (f , Pt)
C T : 7 - \
\ P r , P t ) (f , Pt)
c 2 : r
\Pz, Pz )
a + b + c + d
4- 2 a - b + c + 2 d