Home › Complex Analysis › Lesson 10

Evaluating Real Integrals and Infinite Sums

Lesson 10 of 14

Key idea of this section

Trigonometric integrals: put z = eiθ, cos θ = (z + z⁻¹)/2, dθ = dz/(iz).
Integrals over ℝ: close the contour with a large semicircle; Jordan's lemma for eikx.
Many-valued integrands: keyhole contours around a branch cut.
Sums: ∑ f(n) = −(sum of residues of π cot(πz) f(z) at the poles of f).

Type 1: rational functions of cos θ and sin θ

Substituting z = eiθ turns ∫₀2π R(cos θ, sin θ) dθ into the integral of a rational function over the unit circle. The classical example, for a > |b| > 0, is

∫₀2π dθ/(a + b cos θ) = 2π/√(a² − b²).

Derivation. Since a + b(z + 1/z)/2 = (bz² + 2az + b)/(2z) and dθ = dz/(iz), the integral is (2/i) ∮ dz/(bz² + 2az + b) over |z| = 1. The roots of the quadratic are z± = (−a ± √(a² − b²))/b, with product 1; the root z₊ lies inside the circle and z₋ outside. The residue at z₊ is 1/(b(z₊ − z₋)) = 1/(2√(a² − b²)), so the integral is (2/i) · 2πi/(2√(a² − b²)) = 2π/√(a² − b²). For instance ∫₀2π dθ/(5 + 3 cos θ) = 2π/4 = π/2. The same method handles cos(nθ) in the numerator, by taking the real part of zⁿ.

Type 2: rational functions on the real line

Theorem 10.1. If P and Q are polynomials with deg Q ≥ deg P + 2 and Q has no real zeros, then ∫ from −∞ to ∞ of P(x)/Q(x) dx = 2πi ∑ Res(P/Q, a) over the zeros a of Q in the upper half-plane.

Proof. Integrate over the boundary of the half-disc of radius R. On the semicircle |P/Q| ≤ C/R² for large R, so its contribution is at most πR · C/R² → 0 by the ML-inequality.

Example. ∫ dx/(x⁴ + 1) over ℝ. The poles in the upper half-plane are eiπ/4 and e3iπ/4. At a pole a, the residue is 1/(4a³) = a/(4a⁴) = −a/4. Their sum is −(eiπ/4 + e3iπ/4)/4 = −i√2/4, and 2πi · (−i√2/4) = π/√2.

Example. For a, b > 0 with a ≠ b, ∫ dx/((x² + a²)(x² + b²)) over ℝ = π/(ab(a + b)). The residues at ia and ib are 1/(2ia(b² − a²)) and 1/(2ib(a² − b²)); their sum simplifies to 1/(2i ab(a + b)), and multiplying by 2πi gives the result. The formula remains valid for a = b by continuity, giving π/(2a³).

Type 3: Fourier integrals and Jordan's lemma

Lemma 10.2 (Jordan). For R > 0, ∫₀π e−R sin θ dθ < π/R. Consequently, if g(z) → 0 uniformly as |z| → ∞ in the closed upper half-plane and k > 0, then the integral of g(z) eikz over the upper semicircle of radius R tends to 0.

Proof. On [0, π/2], sin θ ≥ 2θ/π (concavity), so ∫₀π/2 e−R sin θ dθ ≤ ∫₀π/2 e−2Rθ/π dθ < π/(2R); the other half is symmetric. On the semicircle |eikz| = e−kR sin θ, so the integral is at most max|g| · R · π/(kR) → 0.

Example. For k > 0 and a > 0, ∫ cos(kx)/(x² + a²) dx over ℝ = (π/a) e−ka. Integrate eikz/(z² + a²); its residue at ia is e−ka/(2ia), and 2πi times this is π e−ka/a, which is real, so it is the integral of the cosine (the sine part vanishes by oddness).

Indented contours. When the integrand has a simple pole on the real axis, one avoids it with a small semicircle of radius ε. As ε → 0 the integral over a small semicircle around a simple pole c, traversed clockwise above c, tends to −πi Res(f, c): half a turn picks up half of 2πi. Applied to eiz/z with a big semicircle (Jordan) and a small one at 0, this gives PV ∫ eix/x dx = πi, and taking imaginary parts,

∫₀∞ (sin x)/x dx = π/2,

the Dirichlet integral, which is an improper Riemann integral but not a Lebesgue integral.

Type 4: branch cuts and keyhole contours

Let 0 < a < 1 and use the branch of za−1 on ℂ \ [0, ∞) with 0 < arg z < 2π. Integrate za−1/(1 + z) around the keyhole contour: a large circle |z| = R, a small circle |z| = ε, and the two edges of the cut along [ε, R]. The circles contribute nothing in the limit (the integrand is O(Ra−2) on the large circle and O(εa−1) on the small one), while the lower edge carries the factor e2πi(a−1) relative to the upper edge. Hence, with I the desired integral,

(1 − e2πi(a−1)) I = 2πi Res at −1 = 2πi eiπ(a−1),
I = ∫₀∞ xa−1/(1 + x) dx = 2πi/(e−iπ(a−1) − eiπ(a−1)) = π/sin(πa).

For a = 1/2 this gives ∫₀∞ dx/(√x (1 + x)) = π, which can be checked with the substitution x = t². The identity is the reflection formula Γ(a)Γ(1 − a) = π/sin(πa) in disguise (Lesson 13).

Summing series

Let f be rational with deg(denominator) ≥ deg(numerator) + 2 and no poles at integers. Integrate π cot(πz) f(z) over the boundary of the square CN with vertices (N + 1/2)(±1 ± i). One checks that |cot(πz)| is bounded on all these squares independently of N, so the integrals tend to 0, and the residue theorem gives

∑ over n ∈ ℤ of f(n) = −∑ Res(π cot(πz) f(z)) over the poles of f.

Example (the Basel problem). Use f(z) = 1/z², with the double pole at 0 now coinciding with a pole of cot. Since π cot(πz) = 1/z − π²z/3 − π⁴z³/45 − …, the residue of π cot(πz)/z² at 0 is −π²/3. The residues at n ≠ 0 are 1/n², so ∑ over n ≠ 0 of 1/n² − π²/3 = 0, that is ∑ 1/n² = π²/6 (n ≥ 1). The next coefficient gives ∑ 1/n⁴ = π⁴/90.

Example. For a > 0, ∑ over n ∈ ℤ of 1/(n² + a²) = (π/a) coth(πa). Using π/sin(πz) instead of π cot(πz) gives alternating sums, such as ∑ over n ∈ ℤ of (−1)ⁿ/(n² + a²) = π/(a sinh(πa)).

Exercise

  • (a)
    Evaluate ∫₀2π dθ/(2 + sin θ).
  • (b)
    Evaluate ∫ dx/(x² + 1)² over ℝ.
  • (c)
    Evaluate ∫ cos x/(x² + 4) dx over ℝ.
Show solution

Answers: (a) The substitution θ ↦ θ + π/2 does not change the integral over a full period and turns sin θ into cos θ, so the value is 2π/√(4 − 1) = 2π/√3 ≈ 3.6276. (b) The residue at the double pole i is −i/4 (Lesson 9), so the integral is 2πi(−i/4) = π/2. (c) With k = 1 and a = 2, the value is (π/2) e−2 ≈ 0.2126.

V.3.1