PDA

View Full Version : Chapter 2, Problem 3


dstefan
06-05-2008, 11:50 PM
Chapter 2, Problem 3:

Compute an approximate value of
\int_1^3 \sqrt{x} ~e^{-x} dx
using the Midpoint rule, the Trapezoidal rule, and Simpson's rule.

Start with n=4 intervals, and double the number of intervals until two consecutive approximations are within 10^{-6} of each other.

Solution:

The approximate values of the integral found using the Midpoint, Trapezoidal, and Simpson's rules are:
\begin{tabular}{|c|c|c|c|}\hline No. Intervals & Midpoint Rule & Trapezoidal Rule& Simpson's Rule \\ \hline 4 & 0.40715731 & 0.41075744 & 0.40835735 \\ \hline 8 & 0.40807542 & 0.40895737 & 0.40836940 \\ \hline 16 & 0.40829709 & 0.40851639 & 0.40837019 \\ \hline 32 & 0.40835199 & 0.40840674 & 0.40837024 \\ \hline 64 & 0.40836569 & 0.40837937 & 0.40837024 \\ \hline 128 & 0.40836911 & 0.40837253 & \\ \hline 256 & 0.40836996 & 0.40837082 & \\ \hline 512 & 0.40837018 & 0.40837039 & \\ \hline 1024 & 0.40837023 & 0.40837028 & \\ \hline \end{tabular}

The approximate value of the integral is 0.408370, and is obtained for a 256 intervals partition using the Midpoint rule, for a 512 intervals partition using the Trapezoidal rule, and for a 16 intervals partition using Simpson's rule.