|
|||||
In the notation of the last section the actual area under the function f in the interval between and will be: The trapezoid rule that we have described, on the other hand, gives the following proposed answer for this area: while the "midpoint rule" approximates the area as f(0)d. This means that if we use two parts of the midpoint rule and one part of the trapezoid rule, we will get the quadratic b term exactly right, and the leading term in the error will come from the e term which will be on the order of d4. The rule for approsimating integrals just described is called Simpson's rule, and it takes the following form in the interval betweenand . Notice that in this formula f is evaluated at intervals apart. If we give the parameter a new name here, calling it h, the Simpson's rule formula in terms of h becomes and it represents an approximation to the area under the curve defined by f in the interval from -h to h; an approximation whose error is of fourth order in h. It is worthwhile noticing what these various rules look like when applied to a number of small subintervals in a row. The trapezoid rule gives equal weight d to evaluations at all intermediate points, since each is the left end and the right end of one subinterval and it gets d/2 weight from each. The end two evaluations on the other hand are ends of only one subinterval each, and these get weight d/2. The midpoint rule gives equal weight to the odd numbered evaluations of d or 2h. Simpson's rule gives weights that form the pattern 1 4 2 4 2 ... 4 1 multiplied by h/3, since the midpoints get weight 2/3 and the trapezoid rule divided by 3 accounts for the rest.
Notice that the leading term in the power series for f that produces an error in Simpson's rule is the ex4 term, and that produces an error which goes down by a factor of 16 if we divide our intervals in half.
|