A1320 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

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 1/r, 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 ∫0∞sin⁡xxdx=π2 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 π2 (dashed) and close in only as 1/n.
  • 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 ∫01dxx (the integrand is infinite at 0), so you use the midpoint rule. How does its error shrink as you double the number of points?

Name it

Endpoint singularities

For ∫0bx−αg(x)dx with smooth g and 0<α<1:

  • Substitute to remove the singularity: x=t2 turns dxx into 2dt.
  • Subtract it: write g(x)=g(0)+(g(x)−g(0)), integrate g(0)x−α exactly, and use a rule on the remainder, which vanishes at 0.
  • Use a weighted rule: Gauss–Jacobi rules have x−α built into their weights.

Infinite ranges

  • Truncate at L and estimate the tail analytically: for e−x2 the tail beyond L is about e−L22L; for 11+x2 it's π2−tan−1⁡L≈1L, which needs a huge L.
  • Map to a finite interval: x=t1−t sends [0, 1) to [0, ∞) with dx=dt(1−t)2. It works when the transformed integrand stays bounded.
  • Gauss–Laguerre rules integrate ∫0∞e−xf(x)dx well when f is smooth and grows slowly.

Oscillatory integrands

For ∫0∞f(x)sin⁡ωxdx 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 ∫01cos⁡xxdx two ways.

Show the solution
  1. Substitute x=t2. With dx=2tdt the integral becomes 2∫01cos⁡(t2)dt a smooth integrand that Simpson or Gauss rules handle easily. It equals 1.809048.
  2. Or subtract the singularity. ∫01cos⁡xxdx=∫01dxx+∫01cos⁡x−1xdx=2+∫01cos⁡x−1xdx
  3. The new integrand. It behaves like −x3/22 near 0, finite with a finite derivative, and integrates to −0.190952: 2−0.190952=1.809048 the same value.

Answer both ways give 1.809048.

Worked example

Evaluate ∫0∞e−x1+xdx with Gauss–Laguerre rules of 2, 3, 4 and 6 points.

Show the solution
  1. The rule. Gauss–Laguerre rules approximate ∫0∞e−xf(x)dx by ∑wif(xi); here f=11+x.
  2. Two points. The nodes are 2±2 and the weights 2±24, the larger weight at the smaller node. The rule gives 0.5714.
  3. More points. The 3-, 4- and 6-point rules give 0.5882, 0.5933 and 0.5958. The true value is 0.596347.
  4. 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.
  5. A better route. The map x=t1−t 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 ∫0∞sin⁡xxdx.

Show the solution
  1. 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 π2=1.570796 after 8 lobes.
  2. Average neighbors. That gives 1.635, 1.546, 1.583, …, 1.573608.
  3. Average again, twice. The result is 1.570932 from the same eight lobes, an error of 1.4×10−4, three hundred times smaller.
  4. 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 1.4×10−4 of π2.

Check

What is ∫01x−0.6dx?

Check

About how much does ∫L∞e−x2dx contribute, for L = 3?

Check

What tail does truncating ∫0∞dx1+x2 at L = 100 leave out?

Check

The substitution x=t1−t maps ∫0∞dx(1+x)3 to an integral over [0, 1]. What is its value?

Check

About how large is lobe k = 5 of ∫sin⁡xx, the integral from kπ to (k+1)π?

Check

A rule's error on ∫01x−0.25g(x)dx goes as h1−p.

(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 ∫01xdx. Why?

Check

Substitute x=t2 in ∫0bcos⁡xxdx.

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°.

Explain why

Why does averaging neighboring partial sums speed up an alternating series?

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.