1314sem1 Ma2213

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

MA2213

NATIONAL UNIVERSITY OF SINGAPORE

MA2213 – NUMERICAL ANALYSIS I

(Semester 1 : AY2013/2014)
Name of examiner : Dr. Andy Yip

Time allowed : 2 hours

INSTRUCTIONS TO CANDIDATES
1. Please write your matriculation/student number only. Do not write your name.

2. This examination paper contains NINE (9) questions and comprises FOUR (4)
printed pages.

3. Answer ALL questions.

4. Please start each question on a new page.

5. This is a CLOSED BOOK (with helpsheet) examination.

6. You are allowed to use one A4 size, double-sided, handwritten or printed helpsheet.

7. You may use non-programmable calculators. However, you should lay out system-
atically the various steps in the calculations.

8. Unless specified otherwise, you should give answers in exact value.

1
MA2213

Question 1 [20 marks] Multiple choice questions. Answer A, B or C.


(a) What is the result of the Matlab code diag(diag(diag(ones(4,4),1),-1),2)’?
A. 0 0
B. 0 0 0
C. 1 0 0
0 1 0
0 0 1
(b) How many polynomials of degree 100 can interpolate a given set of data on 100
distinct nodes?
A. no definite answer, depends on the data
B. 1
C. infinitely many
(c) Which of the following statements about divided difference table is true?
A. Reordering the data leads to a different table and hence possibly leads to a
different interpolating polynomial.
B. If the last k entries on the upper envelope of the table are zero, then the last
k entries on the lower envelope are also zero.
C. The table (zeroth through the nth divided differences) is uniquely determined
by any n + 1 of its entries and the n + 1 nodes.
(d) Which of the following statements about Simpson’s rule is/are true?
i. It can integrate some polynomials of degree 4 exactly.
ii. It can integrate some polynomials of degree 5 exactly.

A. i only
B. ii only
C. none

(e) Which of the following statements about LU and P ⊤ LU factorizations of square


matrices is true? Here, L is unit lower-triangular, U is upper-triangular and P is
a permutation matrix.
A. P ⊤ LU factorization may not exist.
B. Some singular matrices have a LU factorization.
C. If a (square) matrix does not have a LU factorization, then it is singular.

2
MA2213

Question 2 [10 marks] Suppose that the polynomial of minimal degree that inter-
polates the data
x0 x1 x2 x3 x4
f (x0 ) f (x1 ) f (x2 ) f (x3 ) 100
is P , a polynomial of degree 3. Find the polynomial of minimal degree that interpo-
lates the data
x1 x2 x3 x4
f (x1 ) f (x2 ) f (x3 ) 200
Express the answer in terms of P .

Question 3 [10 marks] Devise, from first principles, the 3-point open Newton-Cotes
∫b
formula for approximating a f (x)dx. (Derivation of the error term is not required.)

Question 4 [10 marks] Use Romberg integration to compute R3,3 for the integral
∫ 8
1
dx.
0 1 + |x − 4|

Compute R1,1 using n = 1.

Question 5 [10 marks] Give a 2-by-2 matrix that has no LU factorization.

Question 6 [10 marks] Factor the matrix


 
1 0 −1
A =  2 −2 2 
3 −2 −1

into A = P ⊤ LU using Gaussian Elimination with Partial Pivoting.

Question 7 [10 marks] It is given that DF T (y0 , y1 , y2 , y3 ) = DF T (y4 , y5 , y6 , y7 ) =


(4, 8, 12, 16). Compute DF T (y0 , y1 , y2 , y3 , y4 , y5 , y6 , y7 ) using the Fast Fourier Trans-
form algorithm. Show all intermediate values.

3
MA2213

Question 8 [10 marks] Let x1 , x2 , . . . , xn be n given distinct nodes. Consider a


quadrature rule
∑n
Q(f ) = ci f (xi )
i=1

on the n nodes. Prove or disprove that there exist unique coefficients c1 , . . . , cn such
that the degree of precision of Q is n − 1 or more.

(Remark: Either prove that the coefficients may not exist by providing a counterex-
ample or prove that the coefficients exist and are unique.)

Question 9 [10 marks] Let


 
a1 c1
 b1 a2 c2 
 
 . .. 
A= b2 . . . 
 
 ..
. an−1 cn−1 
bn−1 an

be an n-by-n tridiagonal matrix. Prove that if A is strictly diagonally dominant, then


the Doolittle LU factorization
  
1 u1 r1
 l1 1  u2 r2 
  
 .  . . 
A= l2 . .  . . . . 
   
 ..
. 1   un−1 rn−1 
ln−1 1 un

computed by the Doolittle factorization algorithm

Step 1 Set u1 = a1 .
Step 2 For i = 2, . . . , n set ri−1 = ci−1
li−1 = bi−1 /ui−1
ui = ai − ri−1 li−1 .

is well-defined, i.e. ui ̸= 0 for all 1 ≤ i ≤ n.

(Hint: Prove that |ui | > |ci | for all 1 ≤ i ≤ n.)

END OF PAPER. GOOD LUCK!

You might also like