# assn7 - AMATH 341 CM 271 CS 371 Assignment 7 Due Monday...

This preview shows pages 1–2. Sign up to view the full content.

AMATH 341 / CM 271 / CS 371 Assignment 7 Due : Monday March 29, 2010 Instructor: K. D. Papoulia 1. Consider a general quadrature scheme for the interval [ a,b ] that uses distinct quadrature points x 1 ,...,x n and weights w 1 ,...,w n where the weights are initially unknown. Suppose we require this rule to be exact for polynomials of degree up to n - 1. Then an exact formula for the weight w k is given by the integral over [ a,b ] of the k th polynomial in the Lagrange interpolating basis for the points x 1 ,...,x n . (This polynomial appears, e.g., inside the parentheses in the summation at the bottom of p. 93 of the Moler text, which is p. 1 of the ‘Interpolation’ chapter on-line). Explain why this is so. [Hint: what is the outcome of the quadrature rule if it is applied to this Lagrange basis polynomial?] Solution. The k th polynomial in the Lagrange interpolating basis is l k ( x ) = ( x - x 1 ) ··· ( x - x k - 1 )( x - x k +1 ) ··· ( x - x n ) ( x k - x 1 ) ··· ( x k - x k - 1 )( x k - x k +1 ) ··· ( x k - x n ) . This polynomial has the property, apparent by inspection, that l k ( x m ) = 1 if m = k else l k ( x m ) = 0. Also apparent is that its degree is n - 1. Since the quadrature rule is supposed to be exact for polynomials of n - 1 or less, then it is exact for l k , i.e., Z b a l k ( x ) dx = n X i =1 w i l k ( x i ) . However, the right-hand side simpliﬁes to w k because of the property of the Lagrange basis polynomials, so we conclude that w k must be the value of the exact integral of the Lagrange basis polynomial over [ a,b ]. 2. Consider integrating a function over the interval [0 , ) using the Matlab function quad . This function takes as its ﬁrst argument a function handle (the integrand), its second and third arguments the limits of integration, and its fourth the accuracy requirement. [Special note: the function handle sent to

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 06/21/2010 for the course CS 5212 taught by Professor Papoulia,katerina during the Spring '10 term at Waterloo.

### Page1 / 4

assn7 - AMATH 341 CM 271 CS 371 Assignment 7 Due Monday...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online