Example: Approximating an improper integral


Let's approximate the improper integral

correct to one decimal place.

Step I:

The integral is miserable to do exactly, so the first step is to find a convergent integral that's (a) bigger and (b) easier to deal with. For this one, that would be the integral

and we work that one out as follows:

Step II:

Now we try to find a fencepost value for the easy integral, so that the area past the fencepost is less than 0.025. We do that as follows:

so that the area past the fencepost is equal to 1/b. Setting that equal to 0.025, we find b = 40.

Step III:

Since

the area of the hard integral past the fencepost b = 40 is also less than 0.025.!

Step IV:

Approximate the hard integral up to the fencepost with an error of less than 0.025: The graph of y = 1/(x2 + x + 1) looks like

Since it's always concave up (in a theoretical math class, we should prove that by taking the second derivative and showing that it's always positive between 1 and 40), we know that the TRAP(N) is always an upper bound, and that MID(N) is a lower bound. We start to experiment with the N, choosing N = 10 (you have to start somewhere!), then N=100, then N=200:

N MID(N) TRAP(N)
10 0.4605 0.8882
100 0.5778 0.584
200 0.57938 0.58097

Note that until N = 200, even the average of MID(N) and TRAP(N) leads to an error of larger than 0.025. But when N = 200, the average of MID(200) and TRAP(200) is 0.580175, which is 0.000795 away from MID(200) or TRAP(200); so the error in approximating our hard integral from 1 to 40 is at most 0.000795 if we use the value 0.580175.

Conclusion:

This says that if we use the value 0.580175 for the improper integral, we'll be off by at most 0.025795. Since the total error is less than 0.05, we can say that when we round 0.580175 to one decimal place (and get 0.6), we'll have approximated the improper integral correctly to one decimal place.