Numerical Analysis I, Fall 2011 (http://www.math.nthu.edu.tw/˜ wangwc/)

Midterm 01

Oct 25, 2011, 12:30PM-3:00PM.

1. Consider a particular format to store floating point numbers of the form ±1.a_{1}a_{2} ⋯ a_{7}× 2^{e} using 4 bits for the exponent and 7 bits for the mantissa.

(a) (5 pts) Suppose 1\underline{1000}1100000 corresponds to −3.5, what would be the floating point representation of 0.625?

(b) (10 pts) \underline{Derive} a relative error bound resulted from chopping with this floating point format (That is, ϵ_{M}).

2. (5 pts) Find first 15 digits of (100002)^{\frac{1}{3}} − (100001)^{\frac{1}{3}} . Write down your answer on the answer sheet and Explain. Note: Need 15 correct digits to get credit. No credit for using ’calculator’.

3. (10 pts) Consider the following recursive equation p_{0} = 1/3, p_{1} = 1/6, p_{2} = 1/12, p_{n} = \frac{7}{2}p_{n−1}− \frac{7}{2}p_{n−2}+p_{n−3}. What is the exact solution? Is it stable? Explain mathematically. If you can’t do it, do q_{0} = 1/3, q_{1} = 1/6, q_{n} = \frac{5}{2}q_{n−1} − q_{n−2} for partial credit.

4. (a) (10 pts) Derive formula for the approximation of f′(x) and f′′(x) respectively

using f(x − h), f(x), and f(x + 2h).

(b) (10 pts) Derive an error identity for the approximation of f′(x).

(c) (15 pts) Derive an error identity for the approximation of f′′(x)

f′′(x) − f′′(x)_{approx} = C_{1}f^{(n)}(ξ)h^{n+k}.  (1)

Hint: multiply by h^{2} and apply the trick (fundamental Theorem of calculus) that we used to derive error identity for trapezoidal rule. If you still can’t do it, derive an error bound of the form |f′′(x) − f′′(x)_{approx}| ≤ C_{2}|f^{(n)}|_{∞}h^{n+k} and find n, k (to get partial credit). Then assume (1) holds and try to find C_{1} (to get more partial credit, but still not full credit)

5. (15 pts) Find Gaussian quadrature points x_{1}, ⋯, x_{n} for ∫_{−1}^{1} f(x)dx with n = 3 (need not find c_{i}). You can either take the “maximal degree of precision” approach or the Legendre polynomial approach. If you can’t do “n = 3”, do “n = 2” to get partial credit. If you can’t do this either, \underline{derive} Simpson’s rule (formula only, no error term) for minimal partial credit.

6. (a) (10 pts) Implement N_{1}(h) = composite midpoint rule for I = ∫_{0}^{1} \sqrt{x} dx and find

the order of convergence p_{1} numerically.

(b) (10 pts) Based on the p_{1} you find, apply Richardson extrapolation to get the quadratureuformula for N_{2}(h).

(c) (15 pts) Show that C_{1}h^{p_{1}} ≤ |I −N_{1}(h)| ≤ C_{2}h^{p_{1}}. Hint: treat ∫_{0}^{h} and ∫_{h}^{1} separately and use the trick for the proof of “integral test”.