MATH3242.03/COSC3122.03
FW03
Solutions to Assignment 2
1. Elementary rules
Integral 
(a) 
(b) 
Exact value 
0.38866 
0.67474 
Trapezoidal rule 
0.61228 
0.64390 
Simpson's Rule 
0.41609 
0.67440 
Midpoint rule 
0.93027 
0.68966 
2. Composite rules using 5 points:
Integral 
(a) h = 11/24 
(a) h = 0.2 
Trapezoidal rule 
0.33239 
0.67276 
Simpson's rule 
0.39018 
0.67475 
Midpoint rule 
0.50577 
0.67873 
3. Integral from tabulated data: n = 6, h = 0.1 (N.B. 3 significant figures is all that can be justified from data but the 4th figure is shown in brackets):
Trapezoidal rule 
2.00(8) 
Simpson's rule 
1.98(8) 
Midpoint rule 
1.94(8) 
4. The magnitude of the error in Simpson's Rule is
where we have taken the largest value for 2x^{3 }for x Î [1,3] which occurs at x = 1. For this error to be less than 5´10^{4 }(an accuracy of 3 decimal places) we must have n^{4} > 2×10^{4}/5×180 or n > 5.16. Thus take n = 6. (Remember n has to be even). Thus the composite Simpson's rule yields 2.94381 for the integral. The exact value is 2.94376. Thus the error limit is satisfied.
5. Romberg integration to evaluate the integral
k 
h 
R_{k}^{(1)} 
R_{k}^{(2)} 
R_{k}^{(3)} 
R_{k}^{(4)} 
1 
2. 
3.29584 



2 
1. 
3.03421 
2.94700 


3 
0.5 
2.96657 
2.94402 
2.94382 

4 
0.25 
2.94947 
2.94377 
2.94375 
2.94375 
which agrees with the exact value given in question 4.
6. Apply Richardson extrapolation to the composite Trapezoidal Rule using the notation of Romberg integration. Thus
using equation (4.32) with m_{k}= 2^{k1.}. Writing out R_{k1}^{(1)} using the form of the composite trapeziodal rule from Theorem 4.5 we get
Noting that 2h_{k} = h_{k1} we get
which is equivalent to the form of the composite Simpson's rule given in Theorem 4.4 with n=2^{k1}.
7. The values from the MAPLE program for using n+1 points are
n 
integral 

4 
3.829179 
8 
3.820280 
16 
3.820198 
32 
3.820198 
Since the last two values agree to the number of figures shown, we can conclude that the value of the integral is 3.82020 correct to 5 decimal places. Note that this method does not guarantee the correctness since there may be false convergence. If you want to be sure, evaluate the integral with n = 64 as another check.