{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# chw3 - the trapezoidal rule is O h 2 in this case as well 2...

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

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
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

{[ snackBarMessage ]}

Ask a homework question - tutors are online