Unit 7, chapter 30

Leave the real line, collect the poles, return

How contour integration evaluates the integral of 1 over (1 plus x to the fourth) from 0 to infinity, with analytic functions, simple poles and residues, Cauchy's theorem, the residue theorem and an upper half-plane semicircle.

  • Chapter 30
  • The Gaussian integral, parameter differentiation and contour integration

The integrand 1/(1+x4)1/(1 + x^4) is positive and even, and it is at most 1/x41/x^4 for x>0x > 0, so the integral ∫0∞dx1+x4\int_0^{\infty} \frac{dx}{1 + x^4} converges. This page finds its exact value by leaving the real line. In the complex plane the denominator vanishes at four points, a closed semicircle in the upper half-plane encloses two of them, and the residue theorem gives the integral around that contour as 2πi2\pi i times the sum of two residues. An estimate shows that the curved arc contributes nothing as its radius grows, and evenness halves the whole-line value to π/(22)\pi/(2\sqrt{2}).

Key terms

Analytic function

Definition A complex number z=x+iyz = x + iy, with real xx and yy and i2=−1i^2 = -1, is drawn as the point (x,y)(x, y) of the complex plane, whose horizontal axis is the real line. A function ff defined on an open set UU of the complex plane is analytic on UU if at every point z0z_0 of UU the complex derivative

f′(z0)=lim⁡z→z0f(z)−f(z0)z−z0f'(z_0) = \lim_{z \to z_0} \frac{f(z) - f(z_0)}{z - z_0}

exists, with zz allowed to approach z0z_0 from every direction in the plane. Polynomials are analytic on the whole plane, and sums, products and quotients of analytic functions are analytic wherever no denominator is zero. So a rational function in lowest terms is analytic everywhere except at the zeros of its denominator. A point pp is an isolated singularity of ff when ff is analytic on a punctured disk 0<∣z−p∣<r0 < \lvert z - p \rvert < r but is not analytic, or not defined, at pp itself.

In plain words Complex differentiability asks for one limit that is the same whichever way zz approaches z0z_0, a much stronger demand than having partial derivatives in xx and yy. It has strong consequences. An analytic function has derivatives of every order, and around each point z0z_0 of UU it equals its Taylor series on every open disk centered at z0z_0 that lies inside UU.

Example The function f(z)=1/(1+z4)f(z) = 1/(1 + z^4) is analytic except where z4=−1z^4 = -1. Every solution has ∣z∣4=1\lvert z \rvert^4 = 1, so z=eiθ=cos⁡θ+isin⁡θz = e^{i\theta} = \cos\theta + i\sin\theta for some angle θ\theta. The fourth power multiplies the angle by 44, and −1=eiπ-1 = e^{i\pi}, so 4θ=π+2πk4\theta = \pi + 2\pi k and the solutions are

zk=ei(π/4+kπ/2)z_k = e^{i(\pi/4 + k\pi/2)}

for k=0,1,2,3k = 0, 1, 2, 3, the points (±1±i)/2(\pm 1 \pm i)/\sqrt{2} on the unit circle. Two of them, eiπ/4e^{i\pi/4} and e3iπ/4e^{3i\pi/4}, lie in the upper half-plane. By contrast, the conjugate f(z)=zˉ=x−iyf(z) = \bar{z} = x - iy is analytic nowhere, because its difference quotient hˉ/h\bar{h}/h equals 11 for real hh and −1-1 for imaginary hh.

Contour integration

Definition A contour CC is a piecewise smooth curve z=γ(t)z = \gamma(t) for a≤t≤ba \le t \le b, traversed in the direction of increasing tt. For ff continuous on CC, the contour integral of ff along CC is

∫Cf(z) dz=∫abf(γ(t)) γ′(t) dt.\begin{aligned} &\int_C f(z)\,dz \\[0.4em] &= \int_a^b f(\gamma(t))\, \gamma'(t)\,dt. \end{aligned}

Its value does not depend on how CC is parametrized, as long as the direction is kept, and reversing the direction changes its sign. A closed contour is simple if it does not cross itself, and positively oriented if it runs counterclockwise, keeping its interior on the left. The ML estimate bounds every contour integral. If ∣f(z)∣≤M\lvert f(z) \rvert \le M on CC and CC has length LL, then

∣∫Cf(z) dz∣≤ML.\left\lvert \int_C f(z)\,dz \right\rvert \le ML.

As a method, contour integration evaluates a real integral by making the real interval part of a closed contour and computing the integral around that contour in another way.

In plain words A contour integral adds up values of ff times small complex steps dzdz along a directed path, much as a line integral adds up a field along a curve. The ML estimate says that the integral is no larger in size than the largest size of the integrand times the length of the path.

Example Fix a point pp and a radius ρ>0\rho > 0, and go once counterclockwise around the circle γ(θ)=p+ρeiθ\gamma(\theta) = p + \rho e^{i\theta} with 0≤θ≤2π0 \le \theta \le 2\pi. Then γ′(θ)=iρeiθ\gamma'(\theta) = i\rho e^{i\theta}, and

∮γdzz−p=∫02πiρeiθρeiθ dθ=2πi\begin{aligned} \oint_{\gamma} \frac{dz}{z - p} &= \int_0^{2\pi} \frac{i\rho e^{i\theta}}{\rho e^{i\theta}}\,d\theta \\[0.4em] &= 2\pi i \end{aligned}

for every radius. For every integer n≠−1n \ne -1 the same computation gives ∮γ(z−p)n dz=0\oint_{\gamma} (z - p)^n\,dz = 0, because ∫02πei(n+1)θ dθ=0\int_0^{2\pi} e^{i(n+1)\theta}\,d\theta = 0.

Cauchy’s theorem

Definition Let CC be a simple closed, piecewise smooth contour, and let ff be analytic on an open set that contains CC and its interior. Then

∮Cf(z) dz=0.\oint_C f(z)\,dz = 0.

Analyticity is needed at every point inside CC, not only on CC itself.

In plain words An analytic function has no circulation around a loop that encloses no singular points. When f′f' is continuous, Green’s theorem shows why. Writing f=u+ivf = u + iv, the real and imaginary parts of ∮Cf(z) dz\oint_C f(z)\,dz are circulation integrals whose scalar curls, −vx−uy-v_x - u_y and ux−vyu_x - v_y, vanish by the Cauchy-Riemann equations ux=vyu_x = v_y and uy=−vxu_y = -v_x.

Example All four singular points of 1/(1+z4)1/(1 + z^4) lie on the unit circle, so they are at distance at least 22 from the point 33. The function is therefore analytic on an open set containing the closed disk ∣z−3∣≤1\lvert z - 3 \rvert \le 1, and

∮∣z−3∣=1dz1+z4=0.\oint_{\lvert z - 3 \rvert = 1} \frac{dz}{1 + z^4} = 0.

The condition matters. The function 1/z1/z is analytic everywhere except at 00, yet its integral around the unit circle is 2πi2\pi i, not 00, because the singular point 00 lies inside.

Simple pole and its residue

Definition Let ff be analytic on a punctured disk 0<∣z−p∣<r0 < \lvert z - p \rvert < r. The point pp is a simple pole of ff if the limit

A=lim⁡z→p(z−p)f(z)A = \lim_{z \to p} (z - p) f(z)

exists and is not 00. Then f(z)=A/(z−p)+g(z)f(z) = A/(z - p) + g(z), where gg is analytic on the whole disk ∣z−p∣<r\lvert z - p \rvert < r once g(p)g(p) is defined by its limit, and the coefficient AA is the residue, written Res⁡(f,p)\operatorname{Res}(f, p). At any isolated singularity, the residue is the coefficient of 1/(z−p)1/(z - p) in the Laurent series of ff around pp, and it equals 12πi∮f(z) dz\frac{1}{2\pi i} \oint f(z)\,dz around every counterclockwise circle ∣z−p∣=ρ\lvert z - p \rvert = \rho with 0<ρ<r0 < \rho < r. If f=P/Qf = P/Q with PP and QQ analytic at pp, P(p)≠0P(p) \ne 0, Q(p)=0Q(p) = 0 and Q′(p)≠0Q'(p) \ne 0, then pp is a simple pole and

Res⁡(f,p)=P(p)Q′(p).\operatorname{Res}(f, p) = \frac{P(p)}{Q'(p)}.

In plain words Near a simple pole, ff looks like A/(z−p)A/(z - p) plus a well-behaved part. A small counterclockwise loop around pp gets nothing from the well-behaved part, by Cauchy’s theorem, and 2πiA2\pi i A from the singular part, by the circle computation. The residue is the one number that a small loop around the pole can detect.

Example For f(z)=1/(1+z4)f(z) = 1/(1 + z^4) take P=1P = 1 and Q=1+z4Q = 1 + z^4. At each root pp of QQ the derivative Q′(p)=4p3Q'(p) = 4p^3 is not 00, so every pole is simple. Since p4=−1p^4 = -1, it follows that 1/p3=p/p4=−p1/p^3 = p/p^4 = -p, and

Res⁡(f,p)=14p3=−p4.\operatorname{Res}(f, p) = \frac{1}{4p^3} = -\frac{p}{4}.

At p1=eiπ/4=(1+i)/2p_1 = e^{i\pi/4} = (1 + i)/\sqrt{2} the residue is −(1+i)/(42)-(1 + i)/(4\sqrt{2}).

Residue theorem

Definition Let CC be a positively oriented, simple closed, piecewise smooth contour. Let ff be analytic on an open set containing CC and its interior, except at finitely many points p1,…,pmp_1, \dots, p_m inside CC, none of them on CC. Then

∮Cf(z) dz=2πi∑k=1mRes⁡(f,pk).\begin{aligned} &\oint_C f(z)\,dz \\[0.4em] &= 2\pi i \sum_{k=1}^{m} \operatorname{Res}(f, p_k). \end{aligned}

Singular points outside CC contribute nothing.

In plain words Cut a small disk around each singular point out of the inside of CC, and join each small circle to CC by a pair of cuts. Each cut is traversed once in each direction, so the two passes cancel, as shared edges cancel in Green’s theorem, and Cauchy’s theorem applies to the region that is left. So the integral around CC equals the sum of the counterclockwise integrals around the small circles, and each of those is 2πi2\pi i times a residue.

Example The circle ∣z−i∣=1\lvert z - i \rvert = 1, run counterclockwise, encloses the pole ii of 1/(z2+1)1/(z^2 + 1) but not the pole −i-i, which is at distance 22 from ii. With P=1P = 1 and Q=z2+1Q = z^2 + 1, the residue at ii is 1/(2i)1/(2i), so

∮∣z−i∣=1dzz2+1=2πi⋅12i=π.\begin{aligned} \oint_{\lvert z - i \rvert = 1} \frac{dz}{z^2 + 1} &= 2\pi i \cdot \frac{1}{2i} \\[0.4em] &= \pi. \end{aligned}

Upper half-plane semicircle

Definition For R>0R > 0, the upper half-plane semicircle CRC_R runs along the real axis from −R-R to RR and then back along the arc ΓR\Gamma_R, given by z=Reiθz = Re^{i\theta} with 0≤θ≤π0 \le \theta \le \pi. It is a positively oriented simple closed contour whose inside is the half-disk of points with ∣z∣<R\lvert z \rvert < R and Im⁡z>0\operatorname{Im} z > 0. Let PP and QQ be polynomials with P/QP/Q in lowest terms, deg⁡Q≥deg⁡P+2\deg Q \ge \deg P + 2 and no real zeros of QQ. Then the real integral of P/QP/Q converges absolutely, and

∫−∞∞P(x)Q(x) dx=2πi∑Im⁡p>0Res⁡ ⁣(PQ,p),\begin{aligned} &\int_{-\infty}^{\infty} \frac{P(x)}{Q(x)}\,dx \\[0.4em] &= 2\pi i \sum_{\operatorname{Im} p > 0} \operatorname{Res}\!\left(\frac{P}{Q}, p\right), \end{aligned}

where the sum runs over the zeros pp of QQ in the upper half-plane. The proof takes RR larger than every ∣p∣\lvert p \rvert and uses a vanishing arc bound. For large RR there is a constant KK with ∣P(z)/Q(z)∣≤K/R2\lvert P(z)/Q(z) \rvert \le K/R^2 on ΓR\Gamma_R, so by the ML estimate the arc integral is at most πR⋅K/R2=πK/R\pi R \cdot K/R^2 = \pi K/R in absolute value, which tends to 00 as R→∞R \to \infty.

In plain words Closing the real segment with a half circle gives a closed contour, so the residue theorem applies. The price is an extra integral along the arc. When the integrand shrinks faster than 1/R1/R on the arc, the growing length πR\pi R cannot keep up, the arc’s contribution disappears as R→∞R \to \infty, and only the real line is left.

Example For f(z)=1/(1+z4)f(z) = 1/(1 + z^4) and R>1R > 1, the contour CRC_R encloses exactly the two upper poles p1=(1+i)/2p_1 = (1 + i)/\sqrt{2} and p2=(−1+i)/2p_2 = (-1 + i)/\sqrt{2}, and no pole lies on it. Their sum is i2i\sqrt{2}, so the residues −p/4-p/4 add up to −i2/4=−i/(22)-i\sqrt{2}/4 = -i/(2\sqrt{2}), and

∮CRf(z) dz=2πi⋅(−i22)=π2.\begin{aligned} &\oint_{C_R} f(z)\,dz \\[0.4em] &= 2\pi i \cdot \left(-\frac{i}{2\sqrt{2}}\right) \\[0.4em] &= \frac{\pi}{\sqrt{2}}. \end{aligned}

On the arc ∣z4∣=R4\lvert z^4 \rvert = R^4, so the reverse triangle inequality gives ∣1+z4∣≥R4−1\lvert 1 + z^4 \rvert \ge R^4 - 1, and the ML estimate with length πR\pi R gives

∣∫ΓRf(z) dz∣≤πRR4−1,\left\lvert \int_{\Gamma_R} f(z)\,dz \right\rvert \le \frac{\pi R}{R^4 - 1},

which tends to 00 as R→∞R \to \infty. The real integral converges absolutely, because 0<f(x)≤10 < f(x) \le 1 and f(x)≤1/x4f(x) \le 1/x^4 for x≠0x \ne 0. For every R>1R > 1 the integral over [−R,R][-R, R] plus the arc integral equals π/2\pi/\sqrt{2}. As R→∞R \to \infty the first tends to the whole-line integral and the second tends to 00, so

∫−∞∞dx1+x4=π2.\int_{-\infty}^{\infty} \frac{dx}{1 + x^4} = \frac{\pi}{\sqrt{2}}.

The integrand is even, so the original half-line integral is half of this,

∫0∞dx1+x4=π22,\int_0^{\infty} \frac{dx}{1 + x^4} = \frac{\pi}{2\sqrt{2}},

about 1.11071.1107. As a check, the integral from 00 to 11 lies between 12\tfrac12 and 11, and the tail beyond 11 is less than ∫1∞x−4 dx=13\int_1^{\infty} x^{-4}\,dx = \tfrac13, so the answer has to lie between 12\tfrac12 and 43\tfrac43, and it does.

Check yourself

  1. Use an upper half-plane semicircle to evaluate ∫−∞∞dxx2+1\int_{-\infty}^{\infty} \frac{dx}{x^2 + 1}, and check the answer with an antiderivative.
Show the answer

The function 1/(z2+1)1/(z^2 + 1) has simple poles at ii and −i-i. For R>1R > 1 the contour CRC_R encloses only ii, where the residue is 1/(2i)1/(2i), so the integral around CRC_R is 2πi⋅12i=π2\pi i \cdot \frac{1}{2i} = \pi. On the arc ∣z2+1∣≥R2−1\lvert z^2 + 1 \rvert \ge R^2 - 1, so the arc integral is at most πR/(R2−1)\pi R/(R^2 - 1) in absolute value, which tends to 00. The real integral converges, so

∫−∞∞dxx2+1=π.\int_{-\infty}^{\infty} \frac{dx}{x^2 + 1} = \pi.

The antiderivative arctan⁡x\arctan x agrees, since arctan⁡b→π/2\arctan b \to \pi/2 as b→∞b \to \infty and arctan⁡a→−π/2\arctan a \to -\pi/2 as a→−∞a \to -\infty, a difference of π\pi.

  1. To evaluate ∫−∞∞dx(x2+1)(x2+4)\int_{-\infty}^{\infty} \frac{dx}{(x^2 + 1)(x^2 + 4)}, a classmate adds the residues at all four poles ±i\pm i and ±2i\pm 2i and multiplies the sum by 2πi2\pi i. What do they get, what went wrong, and what is the correct value?
Show the answer

Let f=1/Qf = 1/Q with Q(z)=(z2+1)(z2+4)Q(z) = (z^2 + 1)(z^2 + 4). The derivative is Q′(z)=2z(z2+4)+2z(z2+1)Q'(z) = 2z(z^2 + 4) + 2z(z^2 + 1), and the residues 1/Q′(p)1/Q'(p) are

Res⁡(f,i)=−i6,Res⁡(f,2i)=i12,Res⁡(f,−i)=i6,Res⁡(f,−2i)=−i12.\begin{aligned} \operatorname{Res}(f, i) &= -\tfrac{i}{6}, \\[0.4em] \operatorname{Res}(f, 2i) &= \tfrac{i}{12}, \\[0.4em] \operatorname{Res}(f, -i) &= \tfrac{i}{6}, \\[0.4em] \operatorname{Res}(f, -2i) &= -\tfrac{i}{12}. \end{aligned}

All four add up to 00, so the classmate gets 00, which is impossible for the integral of a positive function. The upper semicircle CRC_R with R>2R > 2 encloses only ii and 2i2i, and the lower poles lie outside it and contribute nothing. The enclosed residues add up to −i6+i12=−i12-\tfrac{i}{6} + \tfrac{i}{12} = -\tfrac{i}{12}. On the arc the denominator has absolute value at least (R2−1)(R2−4)(R^2 - 1)(R^2 - 4), so the arc integral is at most πR/((R2−1)(R2−4))\pi R/\left((R^2 - 1)(R^2 - 4)\right) in absolute value and tends to 00. Hence

∫−∞∞dx(x2+1)(x2+4)=2πi⋅(−i12)=π6.\begin{aligned} &\int_{-\infty}^{\infty} \frac{dx}{(x^2 + 1)(x^2 + 4)} \\[0.4em] &= 2\pi i \cdot \left(-\frac{i}{12}\right) = \frac{\pi}{6}. \end{aligned}

Partial fractions confirm it, since the integrand equals 13(1x2+1−1x2+4)\tfrac13\left(\frac{1}{x^2 + 1} - \frac{1}{x^2 + 4}\right), whose integral is 13(π−π2)=π6\tfrac13\left(\pi - \tfrac{\pi}{2}\right) = \tfrac{\pi}{6}.

  1. Evaluate ∫0∞dx1+x6\int_0^{\infty} \frac{dx}{1 + x^6} by contour integration.
Show the answer

The poles of 1/(1+z6)1/(1 + z^6) are the sixth roots of −1-1, the points ei(π/6+kπ/3)e^{i(\pi/6 + k\pi/3)} for k=0,…,5k = 0, \dots, 5, all on the unit circle. Each is simple, since the derivative 6p56p^5 of the denominator is not 00 there. For R>1R > 1 the semicircle CRC_R encloses the three upper poles

3+i2,i,−3+i2.\frac{\sqrt{3} + i}{2}, \quad i, \quad \frac{-\sqrt{3} + i}{2}.

Because p6=−1p^6 = -1, each residue is 1/(6p5)=−p/61/(6p^5) = -p/6. The three poles add up to 2i2i, so the residues add up to −i/3-i/3, and the integral around CRC_R is 2πi⋅(−i/3)=2π/32\pi i \cdot (-i/3) = 2\pi/3. On the arc ∣1+z6∣≥R6−1\lvert 1 + z^6 \rvert \ge R^6 - 1, so the arc integral is at most πR/(R6−1)\pi R/(R^6 - 1) in absolute value and tends to 00. The real integral converges, so the whole-line integral is 2π/32\pi/3, and by evenness

∫0∞dx1+x6=π3,\int_0^{\infty} \frac{dx}{1 + x^6} = \frac{\pi}{3},

about 1.04721.0472.

How this lesson connects