{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

program4 - via step halving only when they exceed their...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Program 4 Foundations of Computational Math 2 Spring 2011 Due date: 11:59 PM Monday, 4/4/11 Implement an adaptive Newton-Cotes integration strategy and demonstrate its use. Your code: should be based on the composite version of the trapezoidal rule should be able to run in a mode where the step is refined with step halving over the entire interval and refinement continues until the estimated error is smaller than a requested tolerance (or a maximum number of points is reached); should be able to run in a mode where the left and right halves of the interval are refined
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: via step halving only when they exceed their alloted portions of the error requested. Use your code to • verify the degree of exactness of the method by integrating an appropriate set of poly-nomials; • integrate f ( x ) = e x on [ a, b ] = [0 , 2] and compare the true error, I ( f )-I n ( f ), and the error estimate that controls your termination of the adaptive algorithm; • compare the number of function evaluations required by the two adaptive forms of Newton Cotes to achieve a similar accuracy over the entire interval of integration. 1...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online