chw3 - the trapezoidal rule is O ( h 2 ) in this case as...

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

View Full Document Right Arrow Icon
Math 128a, fall 2011, Chorin, computer homework 3 1. Write a computer program that evaluates R b a f ( x ) dx by the trapezoidal rule with extrapolation. Apply it to f = e x on [0 , 1] and make a graph showing that the error in the trapezoidal rule is O ( h 2 ) and that the error in the extrapolated result is ( h 4 ). Integrate f ( x ) = ( cos 2 ( x ) / (1 + x 7 ) by the same rule on the same interval, and use the extrapolation to show that
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: the trapezoidal rule is O ( h 2 ) in this case as well. 2. Calculate R 1 e x dx by Gaussian quadrature with 5 points and compare with the exact result. You can nd the points and the weights on the internet. 1...
View Full Document

This note was uploaded on 01/21/2012 for the course MATH 128A taught by Professor Rieffel during the Fall '08 term at University of California, Berkeley.

Ask a homework question - tutors are online