Error approximation for Simpson's rule

The maximum error bound for Simpson's rule is given by the following formula:

maxSimpsonError (n) = ((b - a)^5M)/(180n^4), where M = Max_ (x∈[a, b]) f^(4)(x) 

(Notice that this can not just be cut and pasted to define it; you must adapt it for Mathematica.)

Define an error function (as above), maxSimpsonError[n].  Make a table comparing this error for different values of n (at least an order of magnitude) with the actual errors for Simpson's rule.

IF you have defined your error functions like I told you to above, you should be able to execute the following command (you may need to change the domain for n, if you used different values) to plot all three errors as a function of n:

Plot[{maxTrapError[n], maxMidPtError[n], maxSimpsonError[n]}, {n, 100, 1000}, PlotStyle {Green, Blue, Gold}]

[Graphics:../HTMLFiles/index_66.gif]

⁃Graphics⁃

Compare the relative "efficiency" of the three different approximation methods.


Created by Mathematica  (April 22, 2004)