7.2 KB · commit a9602da
We have so far considered integration formulae which use equally spaced abscissae. In practical problems, however, we often come across situations which require the use of different step-sizes while solving a problem. This would be so if the interval in question contains parts over which the function varies too rapidly or too slowly. For better accuracy and efficiency, it would be desirable to take a smaller size in parts of the interval over which the function variation is large. Similarly, it would be efficient to take larger step sizes over parts in which the function varies too slowly. A numerical integration procedure which adopts automatically a suitable step-size to solve an integration problem numerically is called adaptive quadrature method. We describe below an 'adaptive quadrature method' based on Simpson's (1/3)-rule.
Suppose that we wish to approximate the integral
I=∫aby(x)dx(6.61)
to within an accuracy ε>0. Using Simpson's (1/3)-rule with h=(b−a)/2, we obtain
I=∫aby(x)dx≈3h[y(a)+4y(2a+b)+y(b)]−90h5yiv(ξ1),a<ξ1<b=I(a,b)−180(b−a)h4yiv(ξ1),(6.62)where
I(a,b)=3h[y(a)+4y(2a+b)+y(b)].(6.63)
Now, we subdivide the interval and set h=(b−a)/4. Simpson's (1/3)-rule then gives
I=∫aby(x)dx=6h[y(a)+4y(43a+b)+2y(2a+b)+4y(4a+3b)+y(b)]−180×16h4(b−a)yiv(ξ2)=6h[y(a)+4y(43a+b)+y(2a+b)]+6h[y(2a+b)+4y(4a+3b)+y(b)]−180×16(b−a)h4yiv(ξ2)=I(a,2a+b)+I(2a+b,b)−180×16(b−a)h4yiv(ξ2),(6.64)where
I(a,2a+b)=6h[y(a)+4y(43a+b)+y(2a+b)](6.65a)
and
I(2a+b,b)=6h[y(2a+b)+4y(4a+3b)+y(b)].(6.65b)
Assuming
yiv(ξ1)=yiv(ξ2)
Eqs. (6.62) and (6.64) give on simplification
151[I(a,b)−I(a,2a+b)−I(2a+b,b)]=180×16(b−a)h4yiv(ξ2).(6.66)
Substituting Eq. (6.66) in Eq. (6.64), we obtain an estimate for the error, viz.
∫aby(x)dx−I(a,2a+b)−I(2a+b,b)=151I(a,b)−I(a,2a+b)−I(2a+b,b).(6.67)
If we suppose
151I(a,b)−I(a,2a+b)−I(2a+b,b)<ε(6.68)
for some ε>0 in the interval [a,b], then Eq. (6.67) means that
∫aby(x)dx−I(a,2a+b)−I(2a+b,b)<ε(6.69)
and that
∫aby(x)dx≈I(a,2a+b)+I(2a+b,b)(6.70)
to within an accuracy of ε>0.
If the inequality (6.68) is not satisfied, then the procedure is applied to each of the intervals [a,(a+b)/2] and [(a+b)/2,b] with the tolerance ε/2. If the inequality is satisfied in both the intervals, then the sum of the two approximations will give an approximation to the given integral. If the test fails in any of the intervals, then that particular interval is subdivided into 'two subintervals' and the above procedure is applied with a tolerance which is half of the previous tolerance. The following example demonstrates the testing procedure.