Docsity

Math 105A Summer 2003-04 Practice Final: Interpolation & Numerical Integration, Exams of Mathematical Methods for Numerical Analysis and Optimization

Partial preview of the text

Download Math 105A Summer 2003-04 Practice Final: Interpolation & Numerical Integration and more Exams Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Jim Lambers Math 105A Summer Session I 2003- Practice Final Exam

  1. Use the Newton divided-difference formula to compute the cubic interpolating polynomial p 3 (x) for the function f (x) = ex, using interpolation points x 0 = 0, x 1 = 1, x 2 = 2, and x 3 = 3. What is an upper bound for the error |p 3 (0.5) โˆ’ f (0.5)|?
  1. Find the Hermite interpolating polynomial for the following data.

i xi f (xi) f โ€ฒ(xi) 0 โˆ’ 1 0 1 1 0 1 0 2 1 4 โˆ’ 1

  1. Use Lagrange interpolation to derive a formula for approximating f โ€ฒ(x 0 ) that uses the values of f (x) at x 0 โˆ’ h, x 0 , and x 0 + 2h. This formula is accurate to order O(hk), for some k. What is the value of k? Justify your answer.
  1. Use Romberg integration to compute an approximation to

โˆซ (^1)

โˆ’ 1

ex^ cos 2x dx

that is sixth-order accurate.

  1. Use the Composite Trapezoidal Rule with m = n = 2 to evaluate the double integral

โˆซ (^1)

0

0

eโˆ’(x+y)^ dy dx.

  1. Use the Composite Simpsonโ€™s Rule with n = 4 to evaluate the integral

โˆซ (^1)

0

cos x โˆš x dx.

Gaussian quadrature nodes and weights on [โˆ’ 1 , 1]:

n Nodes Weights 2 0. 5773502692 1. 0000000000 โˆ’ 0. 5773502692 1. 0000000000 3 0. 7745966692 0. 5555555556

  1. 0000000000 0. 8888888889 โˆ’ 0. 7745966692 0. 5555555556 4 0. 8611363116 0. 3478548451
  2. 3399810436 0. 6521451549 โˆ’ 0. 3399810436 0. 6521451549 โˆ’ 0. 8611363116 0. 3478548451 5 0. 9061798459 0. 2369268850
  3. 5384693101 0. 4786286705
  4. 0000000000 0. 5688888889 โˆ’ 0. 5384693101 0. 4786286705 โˆ’ 0. 9061798459 0. 2369268850

Divided Differences:

f [xi] = yi, f [xi, xi+1] = yi+1 โˆ’ yi xi+1 โˆ’ xi

f [xi, xi+1,... , xi+k] =

f [xi+1,... , xi+k] โˆ’ f [xi,... , xi+kโˆ’ 1 ] xi+k โˆ’ xi

Splines: If xj = x 0 + jh, j = 1, 2 ,... , n, then spline for f (x) on [x 0 , xn] is defined by

sj (x) = aj + bj (x โˆ’ xj ) + cj (x โˆ’ xj )^2 + dj (x โˆ’ xj )^2 , j = 0, 1 ,... , n โˆ’ 1 ,

h(cj + 4cj+1 + cj+2) = h 3

(aj+2 โˆ’ 2 aj+1 + aj ), j = 0, 1 ,... , n โˆ’ 2 aj = f (xj ), j = 0, 1 ,... , n, bj = aj+1 โˆ’ aj h

h

(2cj + cj+1), j = 0, 1 ,... , n โˆ’ 1 ,

dj =

cj+1 โˆ’ cj 3 h , j = 0, 1 ,... , n โˆ’ 1 , c 0 = cn = 0 (Free boundary conditions) h(2c 0 + c 1 ) =

h

(a 1 โˆ’ a 0 ) โˆ’ 3 f โ€ฒ(x 0 ), (Clamped boundary conditions)

h(cnโˆ’ 1 + 2cn) = 3 f โ€ฒ(xn) โˆ’

h

(an โˆ’ anโˆ’ 1 )