=========================preview======================
(MATH230)Spring01Final.pdf
Back to MATH230 Login to download
======================================================
HKUST MATH230 Final Examination
May 30, 2001.
Close book and notes

Name Student number

Part Points Score
I 30
IIA 16
IIB 16
IIC 13
IID 25
Total 100

Some useful formulae:
Newtons iteration xn+1 = xn . f(xn)/f .(xn)
h

Trapezoidal rule (f(a)+ f(b))
2
h
Simpsons rule (f(a)+4f ( a+b )+ f(b))
32
Richardson extrapolation T2n 1 (4T2n . Tn), E2n 1 (T2n . Tn)
T3 T3
Part I (30 marks)
Please.ll-in the most appropriate answer in the following table for each corresponding problem (2 points for each correct answer).
You are recommended to spend no more than 30 minutes on Part I.
Prob Ans Prob Ans
1 b 9 c
2 c 10 a
3 c 11 b
4 d 12 b
5 a 13 c
6 b 14 d
7 d 15 a
8 d

1 Which of the followings produces NaN (not-a-number) in matlab?
a) inf+inf b) inf*0 c) 1\0 d) -inf*inf

2 Which of the followings is false in matlab?
a) realmax is the largest.oating point number
b) realmin is the smallest positive.oating point number
c) eps is the smallest positive.oating point number
d) 1+eps is greater than 1

3 What is the value of x after the following loop has.nished?
x=1; while x<1000, x=10*x+1; end;

a) 1001 b) 1000 c) 1111 d) 1024
4 Given matrices A, B of the same size, which of the followings may be unde.ned?
a) A*B b) [A;B] c) A-B d) A*B

5 If it took 105 .ops in matlab to compute rand(n)\b for some n 1 vector b, then how many.ops does it likely take to compute rand(2*n)\[b;b]? a) 8 105 b) 4 105 c) 2 105 d) 0.5 105
6 The workcount for backward substitution is
a) O(n3) b) O(n2) c) O(n) d) O(n0.5)

7 Consider a linear system Ax = b, which of the followings is false? a) the condition number cond(A) estimates the ratio of the relative errors in x and b b) the system has no solution when rank(A) < rank([A,b]) c) partial pivoting is often used in an LU-based solver d) Jacobi iteration is the only iterative method available
8 Which of the followings gives the real root of x5 . 3 = 0?
a) 3^1/5
b) roots(x^5-3)
c) x=3; while abs(x^5-3)>1e-12, x=(x^5-3)/(5*x^4), end
d) fzero(x^5-3,[0,3])

9 For the commands
x=linspace(1-1e-6,1+1e-6,50);
y=polyval([1 -3 3 -1],x);
plot(x,y,.),
which of the followings describes the output best?
a) a smooth cubic curve
b) dots all lying on a horizontal line
c) dots whose y-coordinates di.er by multiples of some constant value
d) nothing appears as matlab cannot handle the computation

10 Which of the followings is false concerning the numerical solution to f(x) = 0? a) Newtons method is not applicable for multiple root b) Newtons method may not converge for some initial guesses c) bisection does not need information on derivatives d) bisection method usually has linear convergence
11 Given 4 data points (1,y1), (2,y2), (3,y3), (4,y4), let p(x)=4x2 + ax + b interpolate the.rst 3 data points, let q(x)= x2 + cx + d interpolate the last 3 data points