

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Jim Lambers Math 105A Summer Session I 2003- Homework Assignment 2
This assignment is due in class on Tuesday, July 20. The exercises are from the textbook, Nu- merical Analysis, 7th Edition, by Burden and Faires. Note: These exercises have been modified to indicate tasks that must be performed using MATLAB. For other exercises, you may use MATLAB if you wish. For all exercises, you must show your work to receive full credit. For exercises involving MAT- LAB, you must submit your code and your output.
(a) f (x) = e^2 x^ cos 3x, x 0 = 0, x 1 = 0.3, x 2 = 0.6, n = 2 (b) f (x) = sin(ln x), x 0 = 2.0, x 1 = 2.4, x 2 = 2.6, n = 2
10), where f (x) = (1 + x^2 )−^1 for − 5 ≤ x ≤ 5, as follows: For each n = 1, 2 ,... , 10, let h = 10/n and yn = Pn(1 + √ 10), where Pn(x) is the interpolating polynomial for f (x) at the nodes x( 0 n ), x( 1 n ),... , x( nn )and x( jn )= −5+jh, for each j = 0, 1 , 2 ,... , n. Each interpolating polynomial must be constructed using the polyfit function, and each polynomial must be evaluated at x = 1 +
10 using the polyval function. Does the sequence {yn} appear to converge to f (1 +
(a) f (8.4) if f (8.1) = 16.94410, f (8.3) = 17.56492, f (8.6) = 18.50515, f (8.7) = 18. 82091
(b) f (0.9) if f (0.6) = − 0 .17694460, f (0.7) = 0.01375227, f (0.8) = 0.22363362, f (1.0) =
65809197
(a) Approximate f (0.05) using the following data and the Newton forward divided-difference formula: x 0. 0 0. 2 0. 4 0. 6 0. 8 f (x) 1. 00000 1. 22140 1. 49182 1. 82212 2. 22554
(b) Use the Newton backward divided-difference formula to approximate f (0.65).
P (x) = 3 − 2(x + 1) + 0(x + 1)(x) + (x + 1)x(x − 1)
and Q(x) = −1 + 4(x + 2) − 3(x + 2)(x + 1) + (x + 2)(x + 1)x
both interpolate the data x − 2 − 1 0 1 2 f (x) − 1 3 1 − 1 3
(b) Why does part (a) not violate the uniqueness property of interpolating polynomials?
Pn(x) = f [x 0 ] + f [x 0 , x 1 ](x − x 0 ) + a 2 (x − x 0 )(x − x 1 ) +a 3 (x − x 0 )(x − x 1 )(x − x 2 ) + · · · +an(x − x 0 )(x − x 1 ) · · · (x − xn− 1 ),
use Pn(x 2 ) to show that a 2 = f [x 0 , x 1 , x 2 ].
(b) Determine an error bound for the approximation in part (a), and compare it to the actual error.