Unformatted text preview:

CMSC AMSC 460 Fall 2007 Homework 4 Due Tuesday October 30 before class begins 15 points The assignment investigates the stability of two of the ways we learned for polynomial interpolation the power basis and the Newton basis Suppose we want to find a polynomial that interpolates data values fi i 1 n at n equally spaced points xi between 0 and 1 If we use the power basis to express p x d1 xn 1 d2 xn 2 dn 1 x dn then our problem is to solve Vd f where V is a Vandermonde matrix If we use the Newton basis to express p x c1 c2 x x1 c3 x x1 x x2 cn x x1 x x2 x xn 1 then our problem is to solve Bc f where B is a lower triangular matrix Note that the solution c is just the vector of divided differences This is another way to compute it The accuracy of our coefficients dcomputed or ccomputed will depend on the condition number of the coefficient matrix V or B where the condition number is defined to be A kAkkA 1 k 1 1 Write a Matlab program that computes the condition numbers of V and B for n 1 20 Hand in a copy of your program and its output table and figure Follow these directions 1a 4 Make sure your program generates V and B correctly Have Matlab display the matrices V and B for n 4 This will also help you in debugging 1b 2 Have Matlab make a well formatted table of the condition numbers 1c 2 Have Matlab plot the condition numbers as a function of n one figure containing V and B as functions of n Label the axes and the curves 1d 3 Design your program so that it generates B one column at a time using a single Matlab statement to generate all of the elements below the main diagonal of the column 1e 1 Make sure your program is well documented 2 3 Explain from the condition number data why it is better to use the Newton basis rather than the power basis Hint The following Matlab commands may be helpful to you linspace vander eye cond semilogy legend xlabel ylabel print disp sprintf diary 2


View Full Document

UMD CMSC 460 - Homework #4

Loading Unlocking...
Login

Join to view Homework #4 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Homework #4 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?