How to approximate an integral over an infinite interval or with an unbounded integrand by cutting off a tail you can bound, removing singularities, and keeping track of each source of error.
The rules for definite integrals need a finite interval and a function that stays bounded. Improper integrals break both. A computer cannot sample infinitely far out, and it cannot evaluate x1 at 0. The fix is not a new rule but some honest preparation, so that what is left is an ordinary integral with a known extra error.
Key terms
Truncating an infinite interval
Definition Suppose f is continuous on [a,∞) and ∫a∞f(x)dx converges. For any T>a,
∫a∞f(x)dx=∫aTf(x)dx+∫T∞f(x)dx.
Truncating at T means approximating the whole integral by the proper integral ∫aTf(x)dx. The truncation error is the tail ∫T∞f(x)dx, which tends to 0 as T→∞ because the integral converges.
In plain words Stop at some far point T and ignore what lies beyond. That is fine as long as you know the part you threw away is small.
Example For ∫0∞e−xdx=1 the tail can be found exactly. It is
∫T∞e−xdx=e−T.
With T=10 the truncation error is e−10≈4.5×10−5.
Bounding tails
Definition Suppose f and g are continuous on [T,∞), ∣f(x)∣≤g(x) for all x≥T, and ∫T∞g(x)dx converges. Then by the comparison test ∫T∞∣f(x)∣dx converges, so ∫T∞f(x)dx converges absolutely, and
∫T∞f(x)dx≤∫T∞g(x)dx.
The comparison function g is chosen so that its tail can be computed exactly.
In plain words When you cannot compute the tail, trap it under something simpler that you can integrate.
Example Truncate
∫0∞e−x2dx=2π≈0.886227
at T=3. For x≥3 we have 3x≥1, so e−x2≤3xe−x2, and the right side has an antiderivative. Hence
The true tail is about 1.96×10−5, so the bound is quite sharp.
Isolating a singularity
Definition Suppose f is continuous on (a,b] and unbounded near a, and ∫abf(x)dx converges. Isolating the singularity means writing f=s+r on (a,b], where s is continuous on (a,b] and carries the bad behavior near a, the convergent improper integral ∫abs(x)dx can be found exactly, and r has a finite limit as x→a+, so that defining r(a) as that limit makes r continuous on [a,b]. Then
∫abf(x)dx=∫abs(x)dx+∫abr(x)dx,
and only the second integral, which is proper, is approximated numerically.
In plain words Subtract off the part of the function that blows up, integrate that part by hand, and give the computer only the well behaved remainder.
Example Take
I=∫01xcosxdx≈1.809048.
Simpson’s rule cannot even start, since the integrand is undefined at 0. Near 0 we have cosx≈1, so subtract s(x)=x1, whose integral over [0,1] is 2. The remainder
r(x)=xcosx−1
tends to 0 as x→0+, so set r(0)=0. Simpson’s rule with n=4 gives ∫01r(x)dx≈−0.191160, so I≈2−0.191160=1.808840, an error of about 2.1×10−4.
Substitutions
Definition Let f be continuous on (a,b), where a or b may be infinite, and let φ be continuously differentiable and strictly increasing on (α,β) with φ(t)→a as t→α+ and φ(t)→b as t→β−. Then
∫abf(x)dx=∫αβf(φ(t))φ′(t)dt,
in the sense that one improper integral converges exactly when the other does, and then they are equal. The same holds with φ strictly decreasing if the limits of integration on the right are swapped. A good substitution turns an improper integral into a proper one with a smooth integrand.
In plain words A change of variable can stretch an infinite interval into a finite one or cancel the factor that blows up.
Example In ∫01xcosxdx put x=t2 with t in (0,1), so dx=2tdt and x=t. The integral becomes
∫012cos(t2)dt,
a proper integral of a smooth function. Simpson’s rule gives 1.809003 with n=4 (error about 4.6×10−5) and 1.8090483 with n=8 (error about 1.6×10−7). For an infinite interval, the substitution x=t1 turns
∫1∞1+x2dxinto∫011+t2dt,
and Simpson’s rule with n=4 gives 0.785392 against the exact 4π≈0.785398.
Splitting integration error from truncation error
Definition Let I=∫a∞f(x)dx converge, where f is continuous on [a,∞), and let Q be a numerical approximation to ∫aTf(x)dx. By the triangle inequality
∣I−Q∣≤∫T∞f(x)dx+∫aTf(x)dx−Q.
The first term is the truncation error, controlled by the choice of T. The second is the integration error, controlled by the rule and the number of subintervals. To reach a total tolerance τ, choose T and n so that the two bounds add up to at most τ. The same split applies to an isolated singularity.
In plain words There are two separate mistakes, cutting off the tail and approximating what is left. Bound each one on its own and share the error budget between them.
Example Approximate ∫0∞e−x2dx within 10−4. Truncating at T=3 costs at most 2.06×10−5, which leaves about 7.9×10−5 for Simpson’s rule on [0,3]. For f(x)=e−x2 the fourth derivative is
f(4)(x)=(16x4−48x2+12)e−x2,
and ∣f(4)(x)∣≤12 for x≥0. The Simpson bound is
180n412⋅35,
which equals about 6.9×10−5 at n=22, the smallest even n that fits the budget. The total is at most 9.0×10−5. In fact S22≈0.886207, and the actual error 1.96×10−5 is almost entirely truncation.
Check yourself
Show that truncating ∫1∞1+x3dx at T=10 costs at most 0.005.
Show the answer
For x≥10 we have 1+x31<x31, so the tail is less than
∫10∞x−3dx=2⋅1001=0.005.
Which substitution turns ∫01xexdx into a proper integral, and what is the new integral?
Show the answer
The substitution x=t2 with dx=2tdt gives
∫012et2dt,
whose integrand is smooth on [0,1].
You want ∫0∞e−xcosxdx within 10−6. How large should T be to keep the truncation error below 5×10−7?
Show the answer
Since ∣e−xcosx∣≤e−x, the tail is at most e−T. You need e−T≤5×10−7, that is T≥ln(2×106)≈14.51. The remaining 5×10−7 goes to the integration rule.
May we count page visits to understand which courses and learning features are useful? Cloudflare collects visit and performance statistics, without your account details or answers. Your choice does not affect access. Details