03.03.2014 Views

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

146 APPENDIX A. OLD EXAMS<br />

• Construct the divided differences table for the data.<br />

• Construct the Newton form of the polynomial p(x) of lowest degree that interpolates<br />

f(x) at these nodes.<br />

• Suppose that these data were generated by the function f(x) = x 3 − 5x 2 + 2x + 17.<br />

Find a numerical upper bound on the error |p(x) − f(x)| over the interval [−1, 3]. Your<br />

answer should be a number.<br />

A.2 Second Midterm, <strong>Fall</strong> 2003<br />

P1 (6 pnts) Write the Trapezoid rule approximation for ∫ b<br />

a f(x) dx, using the nodes {x i} n i=0 .<br />

P2 (6 pnts) Suppose Gaussian Elimination with scaled partial pivoting is applied to the matrix<br />

A =<br />

⎡<br />

⎢<br />

⎣<br />

0.0001 −<strong>0.1</strong> −0.01 0.001<br />

43 91 −43 1<br />

−12 26 −1 0<br />

1<br />

−7<br />

2<br />

−10 π<br />

Which row contains the first pivot? You must show your work.<br />

P3 (14 pnts) Let φ(n) be some quadrature rule that divides an interval into 2 n equal subintervals.<br />

Suppose<br />

∫ b<br />

a<br />

⎤<br />

⎥<br />

⎦ .<br />

f(x) dx = φ(n) + a 5 h 5 n + a 10 h 10<br />

n + a 15 h 15<br />

n + . . . ,<br />

where h n = b−a<br />

2<br />

. Using evaluations of φ(·), devise a “Romberg-style” quadrature rule that is<br />

n<br />

a O ( h 10 )<br />

n approximation to the integral.<br />

P4 (14 pnts) Compute the LU factorization of the matrix<br />

⎡<br />

1 0<br />

⎤<br />

−1<br />

A = ⎣ 0 2 0 ⎦<br />

2 2 −1<br />

using naïve Gaussian Elimination. Show all your work. Your final answer should be two<br />

matrices, L and U. Verify your answer, i.e., verify that A = LU.<br />

P5 (14 pnts) Run one iteration of either Jacobi or Gauss Seidel on the system:<br />

⎡<br />

⎣<br />

1 3 4<br />

−2 2 1<br />

−1 3 −2<br />

⎤<br />

⎡<br />

⎦ x = ⎣<br />

Start with x (0) = [1 1 1] ⊤ . Clearly indicate your answer x (1) . Show your work. You must<br />

indicate which of the two methods you are using.<br />

P6 (21 pnts) Derive the two-node Chebyshev Quadrature rule:<br />

∫ 1<br />

−1<br />

−3<br />

−3<br />

1<br />

⎤<br />

⎦<br />

f(x) dx ≈ c [f(x 0 ) + f(x 1 )] .<br />

Make this rule exact for all polynomials of degree ≤ 2.<br />

P7 (28 pnts) Consider the quadrature rule:<br />

∫ 1<br />

0<br />

f(x) dx ≈ z 0 f(0) + z 1 f(1) + z 2 f ′ (0) + z 3 f ′ (1).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!