This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: AMATH 341 / CM 271 / CS 371 Assignment 3 Due : Friday February 5, 2010 Instructor: K. D. Papoulia 1. Recall that a Vandermonde matrix is an n n matrix formed from a vector w = ( w , w 1 , w 2 , . . . , w n 1 ) as follows: V ( w ) = w n 1 w n 1 1 w n 1 2 . . . w n 1 n 1 w n 2 w n 2 1 w n 2 2 . . . w n 2 n 1 w 2 w 2 1 w 2 2 . . . w 2 n 1 w w 1 w 2 . . . w n 1 1 1 1 . . . 1 . (1) You may generate Vandermonde matrices using the MATLAB command vander , which takes the vector w as its single parameter. (a) Consider the Vandermonde matrix generated with w = [ 10 . : . 1 : 11 . ]. Solve the system V ( w ) x = b where b = [1; 9; 1; 9; 1; 9; 1; 9; 1; 9; 1] T using the build-in Matlab com- mands [L,U]=lu(A) and A \ b . Compare L U and A in some suitable norm and present the result (or a printout of the difference matrix). Compare Ax , where x = A \ b , and b and present the results. (b) Compute the condition number of the matrix V ( w ) (you can use a Matlab function for that) and use it to explain the observed discrepancy . (c) Consider b = w . What interpolation problem does V ( w ) x = b solve? Submit plots of the simplest exact solution and the approximated solution. Comment on the result and relate your findings to what you have learned before about polynomial interpolation. Can you explain why the results for two b s are different? Roughly sketching possible functions that were sampled will help. Obviously, the exact functions are not known, but for the purpose of this exercise we can assume they were the attest possible smooth curves fitting the data. 2. Piecewise quadratic functions are the lowest degree piecewise polynomials able to interpolate function values with a continuous first derivative. This interpolant is rarely used in practice, however, because it can behave pathologically. This exercise exhibits one of the pathologies. Suppose one is given a sequence of ordered pairs ( x 1 , y 1 ) , . . . , ( x n , y n ) with x 1 < x 2 < < x n . Consider finding a function f with the following properties: (a) f ( x i ) = y i for each i = 1 , ...n , (b) when restricted to any particular interval [ x i , x i +1 ], f ( x ) is quadratic in this interval, that is, there are coecients a i , b i , c i such that f ( x ) = a i x 2 + b i x + c i on this interval, and (c) f is continuous at x 2 , . . . , x n 1 .....
View Full Document
- Spring '10