|
|||||
You can do even better by providing a rule for estimating the change in y over
an interval with the accuracy of Simpson's rule. To do so we estimate f at the
beginning middle and end of the interval, and give relative weights to these of
1 4 1 as in Simpson's rule. It is only necessary to apply estimates of f at the
middle and right endpoints that are accurate "to second order", so that
their error is cubic or smaller. to approximate the integrand in the middle of the interval, and to approximate it at the right end, with Thus, with the notations given this method provides the following rule: Again, this rule can be implemented without much difficulty on a spreadsheet. You now need a column for each of x, y and the four f terms that occur in this rule, which requires one or two entries and copying for each column. It can be extrapolated as well. Exercise 26.3 Compute solution to the same equation, y' = y + x using this method with the old initial conditions, y(0) = 1 at x = 1. How much better is it than the previous one for N = 32? The remarkable thing about this rule is that the error is of fourth order, as it is for Simpson's rule. Thus, if we double the number of intervals the error falls by 16 for large N values. Simpson's rule has the symmetry that makes this so. It is a bit surprising that the estimates here do not have a cubic error term, but they do not have one. With x in B11 and y in C11 here are the relevant entries for the f's in D E F and G for this equation, to be copied down for the equation y' = x + y.
Here are results for this method at x=2. The extrapolations start with the assumption that the leading term in the error decreases by a factor of 16 on halving the intervals
The proportional errors are indicated here
It can be seen that the same number of evaluation points (N for Runge Kutta is comparable to 2N for the trapezoid like rule) yields perhaps a thousand times the accuracy for this evaluation rule in this example, though the best extrapolation for the trapezoid is better than the best unextrapolated Runge-Kutta formula here by a factor of a thousand. |