MATH 251 Exam 2, Fall 2007
American University of Beirut · Numerical Computing · 8 pages
More MATH 251 files
Show the text of this exam
AMERICAN UNIVERSITY OF BEIRUT
Faculty of Arts and Sciences
Mathematics Department
MATH 251
QUIZ II
FALL 2007-2008
Closed Book, 75 MINUTES
WRITE YOUR ANSWERS ON THE QUESTION SHEET
STUDENT NAME
ID NUMBER
Problem
Out of
Grade
1
16
2
14
3
12
4
8
TOTAL
50
1
1. (16 points) Consider the following square matrix:
2
−2
3
7
4
4
0
7
2
1
1
3
6
5
4
17
(a) (9 points) Apply on this matrix, Gauss Elimination with the
scaled partial pivoting strategy, showing the status of the
4 by 4 matrix after each elimination, i.e. each of the pivot rows
and the corresponding multipliers should be identified and circled.
• Reduction 1:
Changing Matrix Coefficients
scales
Including Multipliers
s
2
(continued...)
3
(b) (7 points) Specify the elements of the 4 by 4 matrices P, L and U
which verify:
PA = LU
and give the determinant of the original matrix A
4
2. (14 points) Consider the following n ∗ n quadridiagonal matrix
A =
d1
u1
0
· · ·
· · ·
0
0
0
l1
d2
u2
0
· · ·
· · ·
0
0
v1
l2
d3
u3
0
· · ·
0
0
0
v2
l3
d4
u4
0
· · ·
0
0
0
v3
l4
d5
u5
· · ·
0
...
...
...
...
...
...
...
...
0
0
· · ·
0
vn−3
ln−2
dn−1
un−1
0
0
· · ·
0
0
vn−2
ln−1
dn
This matrix is assumed to have the diagonal dominance property:
|di| ≥ |ui| + |li−1| + |vi−2|, ∀i, 3 ≤ i ≤ n − 1
|d1| ≥ |u1|, |d2| ≥ |u2| + |l1|, |dn| ≥ |ln−1| + |vn−2|
As such we can use naive Gauss elimination to reduce it into an upper
triangular matrix.
(a) (8 points) Complete the following algorithm that should perform
the reduction of the matrix A:
function [d,u,l,v]=lu_QuadriDiag(d,u,l,v)
% d is the diagonal vector. Its dimension is n
% u is the upper diagonal vector. Its dimension is n-1
% l is the first lower diagonal vector. Its dimension is n-1
% v is the second lower diagonal vector. Its dimension is n-2
for k= :
% Get the multipliers (take into consideration the last iteration)
% Modify the coefficients (take into consideration the last iteration)
end
5
(b) (4 points) Give the number of flops needed to execute the above
algorithm.
(c) (2 points) Give the upper triangular matrix U obtained from this
reduction.
6
3. (12 points) Consider a function f(x) given at 6 distinct data points by
the following table:
x
0
0.1
0.2
0.3
0.4
0.5
0.6
f(x)
1.00
1.01
1.02
1.05
1.08
1.13
1.19
(a) (8 points) In case you want to use this table to find an approximate
value to f(x), 0.2 < x < 0.3, give on the basis of Newton’s formula,
the expression of p3(x), the most suitable interpolation polynomial
of degree 3.
(b) (4 points) Compute p3(0.25).
7
4. (8 points) Consider the set:
D3 = {(xi, yi)|i = 1, 2, 3},
where yi = f(xi) for a given function f, (xi ̸= xj, i ̸= j).
x1
x2
x3
y1
y2
y3
Prove that:
[x1, x2, x3] = [xi1, xi2, xi3]
where {i1, i2, i3} is any permutation of {1, 2, 3}.
8