MATH 251 Exam 2 with Solution, Spring 2009
American University of Beirut · Numerical Computing · 10 pages · with solution
More MATH 251 files
Show the text of this exam
AMERICAN UNIVERSITY OF BEIRUT
Mathematics Department-FAS
MATH 251
TEST 2
SPRING 2008-2009
Closed Book, 75 mn
STUDENT NAME
SotlvutTioN
ID NUMBER
Problem | Grade
1 /15
2 710
3 714
4 /ii
TOTAL 50
(b) -(4 points) Approximate f(1.2) using Newton’s Interpolating poly-
nomial based on the given set of data D, and the coefficients found in
a Aso 13
Porzsa() = “e +Aye (mw ms? + Myo (a —aedln a
h Wat "
4 uy aN 2 (we nw Vu 02 )
= ae (m — moh amyl uz \ = (w- igen t
cA.z ¥
f (1.2) = ween
10
1. Let A be the following invertible 3 x 3 matrix.
2-1 7 4
4 0 -7|*
23 343
(a) (5 points) Apply on this matrix, Gauss Elimination with the
scaled partial pivoting strategy, showing the status of the
matrix after each elimination, i.e. each of the pivot rows and the
corresponding multipliers should be identified and circled. Update
the index vector at each reduction.
Iv= C4A,2,% =\
Rew ction A, neigh ‘A ees $=C+,4,% ma
idiot inienenee
C3,2,4 >
=e Rds Lwot equals —» AN=
(b) (5 points) Specify the elements of the 3 by 3 matrices P, L and U
which verify:
PA=LU
)2\ Lecce IVs C3,2,4\= é: (e)
Ra
(c) (5 points) Using the LU decomposition of A, find the last row
of A~!.(Do not compute the entries of A~ that are not required).
AAT! si = SrA” =f
Loa = 2
/s LY Le, ot, c3d= Tes,e2, er)
- + cocmvel % © LU oe. =&3
2 Te ber Ars Snve “ 4 tia eee ee
3) LV c3 sea
To @o ule ss. \orr Row 9 An’,
eo \e
-e3 2 by FS
Ua = aa fete TacesTe 33 =&3 4 79
@® LUases : ler Ur =%
Ua ayaa y &S
ao \(>\ [2 \ au” a (4 |
(2 , 2 }ide]r la 4370)
3 \ >
1 2 5 , a
a =p 2s
€ a 3 ae (:) = i 39
o 4 -\3 wh \
o 9 3/3 ud
3 w) Fe) 3 was i a. wy
(< 6 fa \(=)* (i\— 38 age-= = 3° 38 Aq
° o 38/% m3 ood kd 3 ia 7 7 =
Br Kae SS i
@ eset! Ler Ucz sy =o Solve Uvega oe OR is
‘
o\f Ys A 7 _ og
ay 2) a \2(3) mR = 4" (*)
rn) ce 4e 43 = l3
2. (10 points)The following algorithm takes as input an invertible matrix
A, performs scaled partial pivoting and returns an index vector IV up-
dated at each reduction, a scale row-vector s, and determines the pivot
row and pivot element at each reduction.
Fill in for each of the following the least number of Matlab commands.
function{[IV, s , pivbt | = ScaledpartialPivoting(A)
(i) - Create the Index vector IV
[m a = Bize CA);
LV = \:n,
(ii) - Create the Scale vetcor s
va te1i9
gta) = ACL);
(iii) - Determine the Pivot Row at each reduction
You lee 1: aH)
pivds AC TMi) i ke) A.
maxi = ACV) | s (Iv);
(iv) - Update the Index Vector at each reduction
f= Iv(k)}
Ey («) = Ivey,
ANC) 2 vr;
end
end
(v) - Determine the Pivot Element at each reduction
Pon Ce et
A(zVG) ,u) = A (TV, &) [er vot
for ya ktlin
4(sv@),;) = AGVO),a)
— A (ZV(aj, k)¥ AlZv00),;)
i
end
3. (14 points) Derive the equations of the Natural Cubic Spline interpolant
S(a), for the following set of data Do, then draw an approximate graph
representing S(x).
i 0 j1]2 \ —
wie a 4
x; |-1/2|0] 1 wie t a ee
f(z) | 1 [24-1 Mezed Wise M274
z
Lo ahs SU imi ews
(es ea —& ee Waa aewi => ore = SS 7
ie 2
Cytnc SFLINE ered on Nz. 3
Qo C-Yo ods Qala N= A +5 (nm +3, ) ~—
A ah = Q as aS ee And
Qo £0,433 Salwv= +3 3
Approximate Graph of S(x)
y
| sy Wo
A 2</a o
2 |ul4 | 8/3
A 1%/qa] o
wad
1
4. (a) - (7 points) The following set of data D, is associated with the 0
order Bessel’s functions of the 1st kind :
a 0 1 2 3 4
Li 1.0 1.3 1.6 1.9 2.2
Yi = f(x) | 0.76519 | 0.62008 | 0.45540 | 0.28181 | 0.11036
Define the difference operators A*y; recursively, then construct the Dif-
ferences -Table (the entries being the Difference functions {A*})
based on D4.
Ay; = ose e Pe — a Mcosssreerersuenrnumnermnrnnnaiad i= 9,A,---% -4
k-) AK-A
Aty, = cl MA weet! 4 ee a By ea te
for k= phe EO ae
Differences -Table :
i Xy Mig || geese... M tereacces | oneneseeeas, A? ssiteamenes: | nowwencane Ae desseuten | axegessy) At seoseeene
0] 1.0 | 0.76519 x x x *
t
1| 1.3 | 0.62008 Ay: a ONS - x %
x
2| 1.6 | 0.45540 Als - 0.16468 Byo2-0.01987 M
\ 3 ze
3]1.9]o.28181) Ayas-ONSND YD o0ongs [Pre= 0.01066
4
\ 3 20, 3
4} 2.2} 0.11036] Sys z-0,.migiO'y~, o.o0214 DM ponos Ay. peed]
_Nyo z= 0.91454 j A¥e= Oy - Myo
Alyo= wey? => OWS Bro = Ay
= 0.01066
A’ yp = ye-4 7 7 O.MNOE Abus Aha -My 0 008911
N 4 4 4s -\e =. 617 354 i Atya = Nys- qo? O,002\y Fi bAy = a Ay,
I 43 = anys = 0-18 14S )
eos
Alyse Sy) - Sys
ur nein
=