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.

A.5. SECOND MIDTERM, FALL 2004 151<br />

P2 (10 pnts) Complete this statement of the polynomial interpolation error theorem: Let p be the<br />

polynomial of degree at most n interpolating function f at the n+1 distinct nodes x 0 , x 1 , . . . , x n<br />

on [a, b]. Let f (n+1) be continuous. Then for each x ∈ [a, b] there is some ξ ∈ [a, b] such that<br />

f(x) − p(x) = ? ?<br />

n∏<br />

(?) .<br />

P3 (10 pnts) State the conditions which define the function S(x) as a natural cubic spline on the<br />

interval [a, b].<br />

[Problems] Answer no more than five of the following six.<br />

P1 (16 pnts) How large must n be to interpolate the function e x to within 0.001 on the interval<br />

[0, 2] with the polynomial interpolant at n equally spaced nodes?<br />

P2 (16 pnts) Let φ(h) be some computable approximation to the quantity L such that<br />

i=0<br />

φ(h) = L + a 5 h 5 + a 10 h 10 + a 15 h 15 + . . .<br />

Combine evaluations of φ(·) to devise a O ( h 10) approximation to L.<br />

P3 (16 pnts) Derive the constants A and B which make the quadrature rule<br />

∫ 1<br />

−1<br />

( √ )<br />

(√ )<br />

15<br />

15<br />

f(x) dx ≈ Af − + Bf(0) + Af<br />

5<br />

5<br />

exact for polynomials of degree ≤ 2. Use this quadrature rule to approximate<br />

π =<br />

∫ 1<br />

−1<br />

2<br />

1 + x 2 dx<br />

P4 (16 pnts) Find the polynomial of degree ≤ 3 interpolating the data<br />

x −1 0 1 2<br />

y −2 8 0 4<br />

(Hint: using Lagrange Polynomials will probably take too long.)<br />

P5 (16 pnts) Find constants α, β such that the following is a quadratic spline on [0, 4].<br />

⎧<br />

⎪⎨ x 2 − 3x + 4 : 0 ≤ x < 1<br />

Q(x) = α(x − 1)<br />

⎪⎩<br />

2 + β(x − 1) + 2 : 1 ≤ x < 3<br />

x 2 + x − 4 : 3 ≤ x ≤ 4<br />

P6 (16 pnts) Consider the following approximation:<br />

f ′ (x) ≈ f(x + h) − 5f(x) + 4f(x + h 2 )<br />

3h<br />

• Derive this approximation via Taylor’s Theorem.<br />

• Assuming that f(x) has bounded derivatives, give the accuracy of the above approximation.<br />

Your answer should be something like O ( h ?) .<br />

• Let f(x) = x 2 . Approximate f ′ (0) with this approximation, using h = 1 3 .

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

Saved successfully!

Ooh no, something went wrong!