A13 · Lesson 20 · Singular, infinite and oscillatory integrals
Integrals that standard rules handle badly, and how to fix them
The rules of lessons 17 to 19 assume a smooth integrand on a finite interval. Engineering integrals often break those assumptions: a field near a sharp edge blows up like , a step response or a noise spectrum runs out to infinity, and a Fourier integral oscillates forever while shrinking slowly. Each case has a standard repair: change variables to remove the singularity, map or truncate the infinite range with a tail estimate, or integrate oscillations lobe by lobe and accelerate the sum. Applied naively, the same rules give slow or wrong answers.
- The integral is a sum of lobes, one between each pair of zeros, alternating in sign and shrinking slowly.
- The dots are the partial sums after n lobes; they swing above and below (dashed) and close in only as .
- The second set of dots averages neighboring partial sums, and that average is far closer. Repeating the averaging closes in faster still.
Predict
The trapezoid rule can't be used on (the integrand is infinite at 0), so you use the midpoint rule. How does its error shrink as you double the number of points?
By only about : the error goes as . Most of the error comes from the first interval, where the integrand has its spike. The substitution turns the integral into , which any rule gets exactly.
Name it
Endpoint singularities
For with smooth g and :
- Substitute to remove the singularity: turns into .
- Subtract it: write , integrate exactly, and use a rule on the remainder, which vanishes at 0.
- Use a weighted rule: Gauss–Jacobi rules have built into their weights.
Infinite ranges
- Truncate at L and estimate the tail analytically: for the tail beyond L is about ; for it's , which needs a huge L.
- Map to a finite interval: sends [0, 1) to [0, ∞) with . It works when the transformed integrand stays bounded.
- Gauss–Laguerre rules integrate well when f is smooth and grows slowly.
Oscillatory integrands
For with slowly decaying f, integrate between successive zeros to get an alternating series of lobes, then accelerate the partial sums: averaging neighbors repeatedly (Euler's transform) or Aitken's Δ² (lesson 7). Specialized rules (Filon, Levin) build the oscillation into the weights.
Worked example
Compute two ways.
Show the solution
- Substitute . With the integral becomes a smooth integrand that Simpson or Gauss rules handle easily. It equals 1.809048.
- Or subtract the singularity.
- The new integrand. It behaves like near 0, finite with a finite derivative, and integrates to −0.190952: the same value.
Answer both ways give 1.809048.
Worked example
Evaluate with Gauss–Laguerre rules of 2, 3, 4 and 6 points.
Show the solution
- The rule. Gauss–Laguerre rules approximate by ; here .
- Two points. The nodes are and the weights , the larger weight at the smaller node. The rule gives 0.5714.
- More points. The 3-, 4- and 6-point rules give 0.5882, 0.5933 and 0.5958. The true value is 0.596347.
- Why it's slow. f has a pole at x = −1, close to the start of the range, so f is far from a polynomial there.
- A better route. The map followed by Gauss–Legendre on [0, 1] reaches all six digits easily.
Answer 0.5714, 0.5882, 0.5933 and 0.5958 with 2, 3, 4 and 6 points, converging slowly toward 0.596347.
Worked example
Accelerate the lobe sums of .
Show the solution
- The partial sums. After 1 to 8 lobes they are 1.851937, 1.418152, 1.674762, 1.492161, 1.633965, 1.518034, 1.616086 and 1.531131: still 0.04 from after 8 lobes.
- Average neighbors. That gives 1.635, 1.546, 1.583, …, 1.573608.
- Average again, twice. The result is 1.570932 from the same eight lobes, an error of , three hundred times smaller.
- What this is. Repeated averaging is Euler's transform for alternating series; it cancels the slowly decaying swing.
Answer three rounds of averaging turn the eight lobe sums into 1.570932, within of .
Check
What is ?
Check
About how much does contribute, for L = 3?
Check
What tail does truncating at L = 100 leave out?
Check
The substitution maps to an integral over [0, 1]. What is its value?
Check
About how large is lobe k = 5 of , the integral from to ?
Check
A rule's error on goes as .
(a)
By what factor does halving h shrink the error?
(b)
By what factor must the number of points grow to cut the error 1000-fold?
Check
Gauss–Legendre quadrature converges slowly on . Why?
Check
Substitute in .
Step 1
What is the new upper limit?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What is the new integrand in t?
Explain why
Why does averaging neighboring partial sums speed up an alternating series?
For a slowly converging alternating series, the partial sums overshoot and undershoot the limit by nearly equal amounts: each new term is almost the same size as the last, with the opposite sign. So the limit lies close to the midpoint of two neighboring partial sums, and averaging them cancels most of the swing, leaving an error set by how fast the terms change size. The averages themselves still alternate around the limit, only more weakly, so averaging again cancels the next layer. Each round removes another order of the slowly decaying error, which is Euler's transformation.
Practice
Keep practicing
9 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.