Real integrals by residues
A real integral over the whole line, or over one full turn of an angle, may have no antiderivative in elementary terms. Can the residue theorem, which is about closed loops in the complex plane, still find its exact value?
Where you are 5 in Series and residues
Why this exists
The integral \displaystyle \int_{-\infty}^{\infty} \frac{x\sin 2x}{x^2 + 9}\,dx converges, yet its integrand has no elementary antiderivative; its value \pi e^{-6} (Example 4) comes from elsewhere. Partial fractions (Integration by partial fractions) reach \displaystyle \int_{-\infty}^{\infty} \frac{dx}{1 + x^6} only after factoring x^6 + 1 into three real quadratics.
The The residue theorem evaluates integrals over closed loops. This lesson makes a real integral part of one: the segment [-R, R] is closed by a half circle whose contribution tends to 0, and the angles [0, 2\pi] become the circle C(0, 1). Each integral is then 2\pi i times a few residues.
Definition
Let f be continuous on \mathbb{R}. The improper integral \int_{-\infty}^{\infty} f(x)\,dx converges when both tails \int_{-\infty}^{0} f(x)\,dx and \int_0^{\infty} f(x)\,dx converge separately (Improper integrals); for complex-valued f this means the real and imaginary parts do. The principal value is the symmetric limit
when this limit exists. The contour method below computes the principal value; Result 1 says when it is the improper integral.
For R > 0, \Gamma_R is the arc \gamma(t) = Re^{it}, 0 \le t \le \pi, and \sigma_R is the segment from -R to R followed by \Gamma_R. It is a positively oriented simple closed piecewise smooth path, and its inside is the half-disk \{z : |z| < R, \operatorname{Im} z > 0\}.
For polynomials p and q \ne 0, the degree gap of \displaystyle \frac{p}{q} is \deg q - \deg p. A rational function of two variables is a quotient \displaystyle R(x, y) = \frac{P(x, y)}{Q(x, y)} of polynomials in x and y.
Intuition
On \Gamma_R a rational function with degree gap k has modulus about \displaystyle \frac{C}{R^k}, and the arc has length \pi R. The ML-inequality bounds the arc’s contribution by about \displaystyle \frac{\pi C}{R^{k-1}}, which tends to 0 when k \ge 2. Once R is large, the residue theorem fixes \int_{\sigma_R} f(z)\,dz as 2\pi i times the residues in the upper half-plane (Figure 1), so the integral over [-R, R] tends to that number.
An oscillating factor needs more care. On the upper half-plane |e^{iaz}| = e^{-ay} \le 1 for a > 0, and it is very small except near the real axis. Jordan’s lemma turns this into a bound that is good enough for degree gap 1. The upper half-plane is the right side for e^{iaz}; the functions \cos z and \sin z do not work, since |\cos(iy)| = \cosh y grows in both half-planes.
For a full turn, z = e^{i\theta} runs once around C(0, 1) as \theta runs from 0 to 2\pi (Figure 3), with
A rational function of \cos\theta and \sin\theta becomes a rational function of z, and the integral over the angle becomes a contour integral.
Results
1. Principal value and improper integral. Let f be continuous on \mathbb{R}. If \int_{-\infty}^{\infty} f(x)\,dx converges, then \operatorname{PV}\int_{-\infty}^{\infty} f(x)\,dx exists and equals it. The converse is false.
2. Rational functions over the line. Let p and q be polynomials with \deg q \ge \deg p + 2 and q(x) \ne 0 for every real x. Then \displaystyle \int_{-\infty}^{\infty} \frac{p(x)}{q(x)}\,dx converges, and
the sum over the zeros z_k of q in the upper half-plane.
3. Jordan’s lemma. Let a > 0, R_0 > 0, and let g be continuous on \{z : \operatorname{Im} z \ge 0, |z| \ge R_0\}, with M(R) = \max_{z \in \Gamma_R} |g(z)|. Then for every R \ge R_0,
In particular, if M(R) \to 0 as R \to \infty, the integral tends to 0.
4. Oscillating integrals. Let p and q be polynomials with \deg q \ge \deg p + 1 and q(x) \ne 0 for every real x, and let a > 0. Then \displaystyle \int_{-\infty}^{\infty} \frac{p(x)}{q(x)}e^{iax}\,dx converges, and with \displaystyle g(z) = \frac{p(z)e^{iaz}}{q(z)},
When p and q have real coefficients, the real and imaginary parts are \displaystyle \int_{-\infty}^{\infty} \frac{p(x)}{q(x)}\cos ax\,dx and \displaystyle \int_{-\infty}^{\infty} \frac{p(x)}{q(x)}\sin ax\,dx.
5. Integrals over a full turn. Let R(x, y) be a rational function of two variables whose denominator is nonzero at every point (\cos\theta, \sin\theta). Let
Then f is a rational function of z with no pole on C(0, 1), and
the sum over the poles of f inside the unit circle.
Why it is true
A bound for polynomials. Let q(z) = b_n z^n + \cdots + b_0 with b_n \ne 0 and n \ge 1. For |z| \ge 1, \left|\sum_{j<n} b_j z^j\right| \le B|z|^{n-1} with B = \sum_{j<n}|b_j|, so by the reverse triangle inequality
Also |p(z)| \le A|z|^m for |z| \ge 1, where m = \deg p and A is the sum of the moduli of the coefficients of p. So for |z| \ge \rho_q, \displaystyle \left|\frac{p(z)}{q(z)}\right| \le C|z|^{m-n} with \displaystyle C = \frac{2A}{|b_n|}, and q has no zeros there.
Result 1. Proof. Write \int_{-R}^{R} f = \int_{-R}^{0} f + \int_0^{R} f. Both terms have limits as R \to \infty, so the sum does. For the converse, f(x) = x has \int_{-R}^{R} x\,dx = 0 for every R, while \int_0^{b} x\,dx \to \infty. \blacksquare
Result 2. Proof. Let \displaystyle f = \frac{p}{q}, m = \deg p, n = \deg q \ge m + 2, and take R larger than \rho_q and than the modulus of every zero of q. The zeros in the upper half-plane are then inside \sigma_R, those in the lower half-plane are outside, and none is on \sigma_R. As f is holomorphic on \mathbb{C} except at the zeros of q, the residue theorem with G = \mathbb{C} gives
since the segment parametrized by \gamma(x) = x contributes the real integral. On \Gamma_R, \displaystyle |f(z)| \le CR^{m-n} \le \frac{C}{R^2}, so the ML-inequality gives \displaystyle \left|\int_{\Gamma_R} f\right| \le \pi R\cdot\frac{C}{R^2} \to 0. So the principal value equals the residue sum. For convergence, \displaystyle |\operatorname{Re} f(x)| \le |f(x)| \le \frac{C}{x^2} for |x| \ge \rho_q, so \int_{\rho_q}^{\infty} |\operatorname{Re} f| converges by direct comparison with a p-integral. Since 0 \le \operatorname{Re} f + |\operatorname{Re} f| \le 2|\operatorname{Re} f|, the tail of \operatorname{Re} f converges as a difference of two convergent integrals. The same holds for \operatorname{Im} f and for the left tail, so the improper integral converges, and Result 1 identifies it with the principal value. \blacksquare
Result 3. Proof. First, \displaystyle \sin t \ge \frac{2t}{\pi} on \displaystyle [0, \frac{\pi}{2}] (Figure 2): \displaystyle \varphi(t) = \sin t - \frac{2t}{\pi} vanishes at both ends and \varphi'' = -\sin t \le 0, so \varphi is concave and lies above its chord, the zero function. On \Gamma_R, z = Re^{it} and |e^{iaz}| = |e^{iaR\cos t}|\,e^{-aR\sin t} = e^{-aR\sin t}, and |\gamma'(t)| = R. Let I_R = \int_{\Gamma_R} g(z)e^{iaz}\,dz. Using \sin(\pi - t) = \sin t to fold \displaystyle [\frac{\pi}{2}, \pi] onto \displaystyle [0, \frac{\pi}{2}],
The ML-inequality alone gives \pi R\,M(R), which needs degree gap 2; Jordan’s lemma saves the factor R.
Result 4. Proof. Let \displaystyle h = \frac{p}{q} and take R as in the proof of Result 2. The function h(z)e^{iaz} is holomorphic on \mathbb{C} except at the zeros of q, so the residue theorem gives \int_{-R}^{R} h(x)e^{iax}\,dx + \int_{\Gamma_R} h(z)e^{iaz}\,dz = 2\pi i S, with S the residue sum in the statement. On \Gamma_R, \displaystyle |h| \le CR^{m-n} \le \frac{C}{R}, so Result 3 with g = h bounds the arc by \displaystyle \frac{\pi C}{aR} \to 0, and the principal value is 2\pi i S.
For the right tail, let X \ge \rho_q and b > X. Integration by parts gives
As b \to \infty, h(b) \to 0 because the degree gap is at least 1. The derivative \displaystyle h' = \frac{p'q - pq'}{q^2} has numerator of degree at most m + n - 1 and denominator of degree 2n, so its degree gap is at least n - m + 1 \ge 2. Then \displaystyle |h'(x)e^{iax}| = |h'(x)| \le \frac{C'}{x^2} for large x, and the last integral converges as in the proof of Result 2. The left tail is the same after x \mapsto -x. So the improper integral converges and, by Result 1, equals 2\pi i S. For real p and q, h is real on \mathbb{R} and e^{iax} = \cos ax + i\sin ax. \blacksquare
Result 5. Proof. Clearing the powers of z shows that f is a quotient of polynomials in z, so it has finitely many poles. On the circle, \displaystyle f(e^{i\theta}) = \frac{R(\cos\theta, \sin\theta)}{ie^{i\theta}}, because \displaystyle \frac{e^{i\theta} + e^{-i\theta}}{2} = \cos\theta and \displaystyle \frac{e^{i\theta} - e^{-i\theta}}{2i} = \sin\theta. This is a continuous function of \theta, hence bounded, while |f(z)| \to \infty at a pole, so no pole lies on C(0, 1). With \gamma(\theta) = e^{i\theta} and \gamma'(\theta) = ie^{i\theta},
and the residue theorem with G = \mathbb{C} evaluates the left side. \blacksquare
Worked examples
Two simple poles above the axis
Evaluate \displaystyle \int_{-\infty}^{\infty} \frac{x^2\,dx}{(x^2 + 1)(x^2 + 4)}.
SolutionThe degree gap is 4 - 2 = 2, and the denominator is at least 4 on \mathbb{R}, so Result 2 applies. The zeros of the denominator are \pm i and \pm 2i; the ones in the upper half-plane are i and 2i (Figure 1). Each is a simple pole, so \operatorname{Res}(f, z_0) = \lim_{z \to z_0}(z - z_0)f(z) (Result 2 of The residue theorem):
Their sum is \displaystyle \frac{1}{6i}, so the integral is \displaystyle 2\pi i\cdot\frac{1}{6i} = \frac{\pi}{3}.
Check: partial fractions give \displaystyle \frac{x^2}{(x^2 + 1)(x^2 + 4)} = -\frac{1/3}{x^2 + 1} + \frac{4/3}{x^2 + 4}, and \displaystyle -\frac{\pi}{3} + \frac43\cdot\frac{\pi}{2} = \frac{\pi}{3}.
A full turn with one pole inside
Let a and b be real with a > |b|. Show that \displaystyle \int_0^{2\pi} \frac{d\theta}{a + b\cos\theta} = \frac{2\pi}{\sqrt{a^2 - b^2}}.
SolutionIf b = 0 both sides are \displaystyle \frac{2\pi}{a}, so let b \ne 0. The denominator is at least a - |b| > 0, so Result 5 applies. With \displaystyle \cos\theta = \frac{z + z^{-1}}{2},
The roots of bz^2 + 2az + b are \displaystyle z_\pm = \frac{-a \pm \sqrt{a^2 - b^2}}{b}, real and distinct with product 1. So one is inside the unit circle and the other outside. Since 0 < a - |b| < a + |b|, we have (a - |b|)^2 < (a - |b|)(a + |b|) = a^2 - b^2, that is \displaystyle |z_+| = \frac{a - \sqrt{a^2 - b^2}}{|b|} < 1. The residue at the simple pole z_+ is
and 2\pi i times it is \displaystyle \frac{2\pi}{\sqrt{a^2 - b^2}}. For instance \displaystyle \int_0^{2\pi} \frac{d\theta}{5 + 4\cos\theta} = \frac{2\pi}{3}.
A multiple angle through e^{2i\theta}
Evaluate \displaystyle \int_0^{2\pi} \frac{\cos 2\theta}{5 - 4\cos\theta}\,d\theta.
SolutionSubstituting \displaystyle \cos 2\theta = \frac{z^2 + z^{-2}}{2} works but leaves a pole of order 2 at 0. Since the denominator is real, it is shorter to take \cos 2\theta = \operatorname{Re} e^{2i\theta} and evaluate \displaystyle \int_0^{2\pi} \frac{e^{2i\theta}}{5 - 4\cos\theta}\,d\theta. Here e^{2i\theta} = (\cos\theta + i\sin\theta)^2, so the integrand is a rational function of \cos\theta and \sin\theta and Result 5 applies, with the factor e^{2i\theta} becoming z^2. Now
so
The poles are \displaystyle \frac12, inside, and 2, outside (Figure 3). At the simple pole \displaystyle \frac12,
So \displaystyle \int_0^{2\pi} \frac{e^{2i\theta}}{5 - 4\cos\theta}\,d\theta = 2\pi i\left(-\frac{i}{12}\right) = \frac{\pi}{6}. This is real, so its real part gives \displaystyle \int_0^{2\pi} \frac{\cos 2\theta}{5 - 4\cos\theta}\,d\theta = \frac{\pi}{6}, and its imaginary part gives \displaystyle \int_0^{2\pi} \frac{\sin 2\theta}{5 - 4\cos\theta}\,d\theta = 0.
Degree gap one and Jordan’s lemma
Evaluate \displaystyle \int_{-\infty}^{\infty} \frac{x\sin 2x}{x^2 + 9}\,dx.
SolutionThe degree gap of \displaystyle \frac{x}{x^2 + 9} is only 1, so Result 2 does not apply, and the ML-inequality alone does not make the arc small. Result 4 with p(z) = z, q(z) = z^2 + 9 and a = 2 does apply. The only zero of q in the upper half-plane is 3i, a simple zero with q'(3i) = 6i. By Result 3 of The residue theorem,
So \displaystyle \int_{-\infty}^{\infty} \frac{xe^{2ix}}{x^2 + 9}\,dx = 2\pi i\cdot\frac{e^{-6}}{2} = \pi i e^{-6}. The imaginary part gives \displaystyle \int_{-\infty}^{\infty} \frac{x\sin 2x}{x^2 + 9}\,dx = \pi e^{-6}. The real part gives \displaystyle \int_{-\infty}^{\infty} \frac{x\cos 2x}{x^2 + 9}\,dx = 0, as it must since that integrand is odd. Using \displaystyle \frac{z\sin 2z}{z^2 + 9} on \sigma_R instead would fail: at z = iR, |\sin 2z| = \sinh 2R, which grows far faster than R.
A short proof: a family of rational integrals
Prove that for every integer n \ge 0,
Proof. The degree gap is 2n + 2 \ge 2 and the denominator has no real zeros, so Result 2 applies. The only zero in the upper half-plane is i, a pole of order n + 1, since f(z) = (z - i)^{-n-1}(z + i)^{-n-1}. Result 2 of The residue theorem with m = n + 1 gives
Differentiating n times multiplies by \displaystyle (-n - 1)(-n - 2)\cdots(-2n) = (-1)^n\frac{(2n)!}{n!} and lowers the power to -2n - 1. Since (2i)^{2n+1} = 2^{2n+1}(-1)^n i,
Multiplying by 2\pi i gives \displaystyle \frac{\pi (2n)!}{4^n (n!)^2} = \frac{\pi}{4^n}\binom{2n}{n}. \blacksquare
For n = 0 this is \pi, and for n = 1 it is \displaystyle \frac{\pi}{2}. The substitution x = \tan u turns the integral into \int_{-\pi/2}^{\pi/2} \cos^{2n}u\,du (Trigonometric integrals), so the same formula evaluates those powers of cosine.
Noise through a filter in an acoustics lab
In an acoustics lab, Yuna and Kofi run a microphone signal through a low-pass filter whose power response is \displaystyle |H(f)|^2 = \frac{1}{1 + (f/f_c)^6} at frequency f hertz, with cutoff f_c = 12{,}000 Hz. White noise with N_0 watts per hertz at every frequency comes out with power N_0 B, where B = \int_0^{\infty} |H(f)|^2\,df is the filter’s noise bandwidth. Find B.
SolutionPut f = f_c x, so \displaystyle B = f_c\int_0^{\infty} \frac{dx}{1 + x^6}. The integrand is even, so this is half the integral over \mathbb{R}, where Result 2 applies (degree gap 6, and 1 + x^6 \ge 1). The zeros of z^6 + 1 are e^{i(2k+1)\pi/6} for k = 0, \ldots, 5. The ones in the upper half-plane are e^{i\pi/6}, i and e^{5i\pi/6}. Each is a simple zero, and by Result 3 of The residue theorem, using z_k^6 = -1,
As e^{i\pi/6} + e^{5i\pi/6} = i, the residues sum to \displaystyle -\frac{2i}{6} = -\frac{i}{3}, the integral over \mathbb{R} is \displaystyle 2\pi i\left(-\frac{i}{3}\right) = \frac{2\pi}{3}, and \displaystyle \int_0^{\infty} \frac{dx}{1 + x^6} = \frac{\pi}{3}. So
The filter passes as much white noise as an ideal filter passing exactly 0 to B hertz.
Boundaries
Principal value is weaker. The contour argument controls only symmetric integrals \int_{-R}^{R}. For instance \displaystyle \int_{-R}^{R} \frac{x^3}{x^4 + 1}\,dx = 0 for every R, so the principal value is 0, but \displaystyle \int_0^{b} \frac{x^3}{x^4 + 1}\,dx = \frac14\ln(b^4 + 1) \to \infty. Results 2 and 4 hold as stated because their degree conditions also make each tail converge.
Poles on the real axis. Results 2 and 4 need q(x) \ne 0 on \mathbb{R}. The integral \displaystyle \int_{-\infty}^{\infty} \frac{\sin x}{x}\,dx = \pi is evaluated by closing \displaystyle \frac{e^{iz}}{z} with a path that also detours around 0 on a small half circle. Passing above 0 clockwise, that half circle contributes -\pi i times the residue at 0 in the limit, half of what a full clockwise circle gives. This is stated here without proof.
Degree conditions. With degree gap 1 and no oscillating factor the tails behave like \displaystyle \int \frac{dx}{x} and diverge. With a < 0, e^{iaz} grows in the upper half-plane; close in the lower half-plane instead, where the path runs clockwise and the residue sum takes a minus sign.
Branch points. Integrals such as \displaystyle \int_0^{\infty} \frac{x^{\alpha - 1}}{1 + x}\,dx need a branch of \log z and a path avoiding its cut (a keyhole), beyond this lesson.
Full turns. Result 5 needs the denominator nonzero on the whole circle and a full period of angles; an integral over [0, \pi] reduces to it only through a symmetry in \theta \mapsto 2\pi - \theta.
Where this goes next
Result 4 computes Fourier transforms \int_{-\infty}^{\infty} f(x)e^{-i\omega x}\,dx of rational functions, used in signal processing and differential equations. The The argument principle and Rouché's theorem applies the residue theorem to \displaystyle \frac{f'}{f} to count the zeros of f inside a loop.
Exercises
Rational functions over the line
- Evaluate \displaystyle \int_{-\infty}^{\infty} \frac{(x + 2)\,dx}{(x^2 + 1)(x^2 + 9)}.
- Evaluate \displaystyle \int_{-\infty}^{\infty} \frac{x^2\,dx}{(x^2 + 4)^2}.
- Evaluate \displaystyle \int_{-\infty}^{\infty} \frac{dx}{x^4 + x^2 + 1}.
- Evaluate \displaystyle \int_{-\infty}^{\infty} \frac{x\,dx}{(x^2 + 1)(x^2 + 2x + 2)}.
Integrals over a full turn
- Evaluate \displaystyle \int_0^{2\pi} \frac{d\theta}{2 + \sin\theta}.
- Evaluate \displaystyle \int_0^{2\pi} \frac{d\theta}{(5 - 3\cos\theta)^2}.
- Evaluate \displaystyle \int_0^{2\pi} \frac{\sin^2\theta}{5 + 3\cos\theta}\,d\theta.
- Evaluate \int_0^{2\pi} e^{\cos\theta}\cos(\theta - \sin\theta)\,d\theta by writing the integrand as the real part of e^{e^{i\theta}}e^{-i\theta}.
Oscillating integrals
- Evaluate \displaystyle \int_{-\infty}^{\infty} \frac{\cos \pi x}{x^2 + 4}\,dx.
- Evaluate \displaystyle \int_{-\infty}^{\infty} \frac{\cos 2x}{(x^2 + 1)^2}\,dx.
- Evaluate \displaystyle \int_{-\infty}^{\infty} \frac{x\cos x}{x^2 + 2x + 2}\,dx and \displaystyle \int_{-\infty}^{\infty} \frac{x\sin x}{x^2 + 2x + 2}\,dx.
- Evaluate \displaystyle \int_{-\infty}^{\infty} \frac{\sin x}{x^2 + 4x + 5}\,dx.
An application
- In the setting of Example 6, Kofi chains two buffered first-order low-pass stages with cutoffs 3{,}000 Hz and 6{,}000 Hz, so that |H(f)|^2 is the product of \displaystyle \frac{1}{1 + (f/3000)^2} and \displaystyle \frac{1}{1 + (f/6000)^2}. Find the noise bandwidth B = \int_0^{\infty} |H(f)|^2\,df.
Explaining
- Show that \displaystyle \int_{\Gamma_R} \frac{z\,dz}{z^2 + 1} \to \pi i as R \to \infty. Use this and \sigma_R to find \displaystyle \operatorname{PV}\int_{-\infty}^{\infty} \frac{x\,dx}{x^2 + 1}, and explain why the improper integral diverges.
- Closing \displaystyle \int_{-\infty}^{\infty} \frac{\cos 2x}{x^2 + 1}\,dx with \displaystyle \frac{\cos 2z}{z^2 + 1} on \sigma_R suggests the value \pi\cosh 2. Explain the error, give the correct value, and find the limit of \displaystyle \int_{\Gamma_R} \frac{\cos 2z}{z^2 + 1}\,dz.
- Evaluate \displaystyle \int_{-\infty}^{\infty} \frac{e^{-2ix}}{x^2 + 1}\,dx by closing in the lower half-plane, and explain the sign.
- Result 5 applied blindly to \displaystyle \int_0^{2\pi} \frac{d\theta}{1 + \cos\theta} finds no pole inside the circle and suggests 0. Explain what goes wrong.
Proofs
- Let 0 < r < 1 and let n \ge 0 be an integer. Prove that \displaystyle \int_0^{2\pi} \frac{\cos n\theta}{1 - 2r\cos\theta + r^2}\,d\theta = \frac{2\pi r^n}{1 - r^2}.
- Let n \ge 2 be an integer. Prove that \displaystyle \int_0^{\infty} \frac{dx}{1 + x^n} = \frac{\pi}{n\sin(\pi/n)}, using the boundary of the sector \displaystyle \{z : |z| < R, 0 < \operatorname{Arg} z < \frac{2\pi}{n}\}.
- Let p and q have real coefficients, with \deg q \ge \deg p + 2 and no real zeros of q. Without integrating, prove that \displaystyle \sum_{\operatorname{Im} z_k > 0}\operatorname{Res}\left(\frac{p}{q}, z_k\right) is purely imaginary.
Answers
- \displaystyle \frac{\pi}{6}. Residues \displaystyle \frac{2 + i}{16i} at i and \displaystyle -\frac{2 + 3i}{48i} at 3i, with sum \displaystyle \frac{1}{12i}. Check: the odd part \displaystyle \frac{x}{(x^2 + 1)(x^2 + 9)} gives 0, and \displaystyle \frac{2}{(x^2 + 1)(x^2 + 9)} = \frac14\left(\frac{1}{x^2 + 1} - \frac{1}{x^2 + 9}\right) gives \displaystyle \frac14\left(\pi - \frac{\pi}{3}\right).
- \displaystyle \frac{\pi}{4}. A double pole at 2i: \displaystyle \frac{d}{dz}\frac{z^2}{(z + 2i)^2} = \frac{4iz}{(z + 2i)^3}, which at 2i is \displaystyle \frac{-8}{-64i} = \frac{1}{8i}.
- \displaystyle \frac{\pi}{\sqrt3}. The zeros are the sixth roots of unity other than \pm 1 (as (x^2 - 1)(x^4 + x^2 + 1) = x^6 - 1). Those above the axis are e^{i\pi/3} and e^{2i\pi/3}. Result 3 of The residue theorem gives \displaystyle \frac{1}{4z^3 + 2z}, which equals \displaystyle \frac{1}{-3 + i\sqrt3} and \displaystyle \frac{1}{3 + i\sqrt3} there, with sum \displaystyle -\frac{i\sqrt3}{6}.
- \displaystyle -\frac{\pi}{5}. Residues \displaystyle \frac{1 - 2i}{10} at i and \displaystyle \frac{-1 + 3i}{10} at -1 + i, with sum \displaystyle \frac{i}{10}.
- \displaystyle \frac{2\pi}{\sqrt3}. \displaystyle f(z) = \frac{2}{z^2 + 4iz - 1}, with poles \displaystyle i(-2 \pm \sqrt3). Only \displaystyle i(\sqrt3 - 2) is inside, with residue \displaystyle \frac{2}{2i\sqrt3} = \frac{1}{i\sqrt3}.
- \displaystyle \frac{5\pi}{32}. \displaystyle f(z) = \frac{4z}{9i(z - \frac13)^2(z - 3)^2}. At the double pole \displaystyle \frac13 the residue is \displaystyle \frac{4}{9i}\cdot\frac{d}{dz}\frac{z}{(z - 3)^2} = \frac{4}{9i}\cdot\frac{-z - 3}{(z - 3)^3} at \displaystyle \frac13, which is \displaystyle \frac{4}{9i}\cdot\frac{45}{256} = \frac{5}{64i}.
- \displaystyle \frac{2\pi}{9}. \displaystyle \sin^2\theta = \frac{1 - \cos 2\theta}{2}. Example 2 gives \displaystyle \int_0^{2\pi} \frac{d\theta}{5 + 3\cos\theta} = \frac{\pi}{2}. For \displaystyle \int_0^{2\pi} \frac{e^{2i\theta}\,d\theta}{5 + 3\cos\theta}, \displaystyle f(z) = \frac{2z^2}{i(3z + 1)(z + 3)} has residue \displaystyle \frac{1}{36i} at \displaystyle -\frac13, giving \displaystyle \frac{\pi}{18}, which is real. So the integral is \displaystyle \frac12\left(\frac{\pi}{2} - \frac{\pi}{18}\right).
- 2\pi. e^{e^{i\theta}}e^{-i\theta} = e^{\cos\theta}e^{i(\sin\theta - \theta)}, whose real part is the integrand. With z = e^{i\theta} the complex integral is \displaystyle \int_{C(0, 1)} \frac{e^{z}}{iz^2}\,dz = \frac{2\pi i}{i}\cdot 1, as the residue of \displaystyle \frac{e^z}{z^2} at 0 is 1. (Result 5 needs a rational integrand; the computation in its proof works for any f holomorphic near the closed disk except at finitely many points inside.)
- \displaystyle \frac{\pi}{2}e^{-2\pi}. The residue of \displaystyle \frac{e^{i\pi z}}{z^2 + 4} at 2i is \displaystyle \frac{e^{-2\pi}}{4i}.
- \displaystyle \frac{3\pi}{2e^2}. The double pole at i has residue \displaystyle \frac{d}{dz}\frac{e^{2iz}}{(z + i)^2} = e^{2iz}\left(\frac{2i}{(z + i)^2} - \frac{2}{(z + i)^3}\right) at i, which is \displaystyle -\frac{3i}{4e^2}.
- \displaystyle \frac{\pi}{e}(\sin 1 - \cos 1) and \displaystyle \frac{\pi}{e}(\sin 1 + \cos 1). The residue of \displaystyle \frac{ze^{iz}}{z^2 + 2z + 2} at -1 + i is \displaystyle \frac{(-1 + i)e^{-1}e^{-i}}{2i} = \frac{(1 + i)e^{-i}}{2e}. Then 2\pi i times it is \displaystyle \frac{\pi}{e}(i - 1)(\cos 1 - i\sin 1); take real and imaginary parts.
- \displaystyle -\frac{\pi\sin 2}{e}. The residue of \displaystyle \frac{e^{iz}}{z^2 + 4z + 5} at -2 + i is \displaystyle \frac{e^{-1}e^{-2i}}{2i}, so \displaystyle \int_{-\infty}^{\infty} \frac{e^{ix}}{x^2 + 4x + 5}\,dx = \frac{\pi}{e}(\cos 2 - i\sin 2).
- B = 1000\pi \approx 3{,}142 Hz. With f = 1000x, \displaystyle B = 1000\int_0^{\infty} \frac{324\,dx}{(x^2 + 9)(x^2 + 36)}. The residues of \displaystyle \frac{1}{(z^2 + 9)(z^2 + 36)} at 3i and 6i are \displaystyle \frac{1}{162i} and \displaystyle -\frac{1}{324i}. So the integral over \mathbb{R} is \displaystyle 2\pi i\cdot\frac{1}{324i} = \frac{\pi}{162}, the even integrand gives half of it, \displaystyle \frac{\pi}{324}, over [0, \infty), and \displaystyle B = 1000\cdot 324\cdot\frac{\pi}{324}.
- 0. Write \displaystyle \frac{z}{z^2 + 1} = \frac1z - \frac{1}{z(z^2 + 1)}. Then \displaystyle \int_{\Gamma_R} \frac{dz}{z} = \int_0^{\pi} i\,dt = \pi i, and the second term contributes at most \displaystyle \pi R\cdot\frac{1}{R(R^2 - 1)} \to 0. For R > 1 the residue at i is \displaystyle \frac{i}{2i} = \frac12, so \displaystyle \int_{-R}^{R} \frac{x\,dx}{x^2 + 1} = \pi i - \int_{\Gamma_R} \to 0. But \displaystyle \int_0^b \frac{x\,dx}{x^2 + 1} = \frac12\ln(b^2 + 1) \to \infty: the degree gap is 1 with no oscillation.
- The correct value is \displaystyle \frac{\pi}{e^2}, and the arc integral tends to \pi\sinh 2. The residue theorem is still right on \sigma_R: \displaystyle \int_{\sigma_R} \frac{\cos 2z}{z^2 + 1}\,dz = 2\pi i\cdot\frac{\cos 2i}{2i} = \pi\cosh 2. The error is assuming the arc vanishes. At z = iR the integrand has modulus \displaystyle \frac{\cosh 2R}{R^2 - 1}, so no bound makes it small. Result 4 gives the real integral as \displaystyle \operatorname{Re}\left(2\pi i\cdot\frac{e^{-2}}{2i}\right) = \pi e^{-2}, so the arc tends to \pi\cosh 2 - \pi e^{-2} = \pi\sinh 2.
- \pi e^{-2}. For y \le 0, |e^{-2iz}| = e^{2y} \le 1, and Jordan’s lemma holds on the lower half circle by the same proof. The closed path (segment, then lower arc from R to -R) runs clockwise around -i, so the integral is \displaystyle -2\pi i\operatorname{Res} = -2\pi i\cdot\frac{e^{-2}}{-2i} = \pi e^{-2}. This is the conjugate of \displaystyle \int_{-\infty}^{\infty} \frac{e^{2ix}}{x^2 + 1}\,dx = \pi e^{-2}, as it must be.
- The denominator vanishes at \theta = \pi, so the hypothesis fails. There \displaystyle f(z) = \frac{2}{i(z + 1)^2} has a double pole at -1, on the circle. The integral diverges: near \pi, \displaystyle 1 + \cos\theta \le \frac{(\theta - \pi)^2}{2}, so the integrand is at least \displaystyle \frac{2}{(\theta - \pi)^2}, which has infinite integral near \pi. A positive integrand could never give 0.
- Proof. On C(0, 1), (1 - rz)(1 - rz^{-1}) = 1 + r^2 - r(z + z^{-1}), which is 1 - 2r\cos\theta + r^2 \ge (1 - r)^2 > 0. By Result 5 applied to \displaystyle R(x, y) = \frac{(x + iy)^n}{1 - 2rx + r^2}, \displaystyle \int_0^{2\pi} \frac{e^{in\theta}\,d\theta}{1 - 2r\cos\theta + r^2} is the integral over C(0, 1) of \displaystyle \frac{z^n}{iz(1 - rz)(1 - r/z)} = \frac{z^n}{i(1 - rz)(z - r)}. As n \ge 0 there is no pole at 0. The pole \displaystyle \frac1r is outside, and the simple pole r is inside with residue \displaystyle \frac{r^n}{i(1 - r^2)}. So the integral is \displaystyle \frac{2\pi r^n}{1 - r^2}, which is real, and its real part is the stated integral. (Its imaginary part shows the sine version is 0.) \blacksquare
- Proof. The integral converges, as \displaystyle 0 < \frac{1}{1 + x^n} \le \frac{1}{x^2} for x \ge 1. Let \omega = e^{i\pi/n}. The zeros of 1 + z^n are \omega^{2k+1}, with arguments the odd multiples of \displaystyle \frac{\pi}{n}. Only \omega lies in the open sector, and none lies on its edges (arguments 0 and \displaystyle \frac{2\pi}{n}). Its boundary consists of [0, R], the arc Re^{it} with \displaystyle 0 \le t \le \frac{2\pi}{n}, and the ray back from R\omega^2 to 0. It is a positively oriented simple closed path. On the ray, z = x\omega^2 with z^n = x^n, so it contributes \displaystyle -\omega^2\int_0^R \frac{dx}{1 + x^n}. The arc contributes at most \displaystyle \frac{2\pi R}{n}\cdot\frac{1}{R^n - 1} \to 0. The residue at \omega is \displaystyle \frac{1}{n\omega^{n-1}} = \frac{\omega}{n\omega^n} = -\frac{\omega}{n}. Letting R \to \infty, \displaystyle (1 - \omega^2)I = -\frac{2\pi i\omega}{n}. As \displaystyle 1 - \omega^2 = -\omega(\omega - \omega^{-1}) = -2i\omega\sin\frac{\pi}{n}, \displaystyle I = \frac{\pi}{n\sin(\pi/n)}. \blacksquare For n = 6 this is \displaystyle \frac{\pi}{3}, as in Example 6.
- Proof. Let \displaystyle f = \frac{p}{q}. Real coefficients give f(\overline{z}) = \overline{f(z)}, and the nonreal zeros of q come in conjugate pairs. If f(z) = \sum_j c_j (z - z_k)^j near z_k, then near \overline{z_k}, f(w) = \overline{f(\overline{w})} = \sum_j \overline{c_j}\,(w - \overline{z_k})^j, a Laurent series, so \operatorname{Res}(f, \overline{z_k}) = \overline{\operatorname{Res}(f, z_k)}. With S the sum over the upper half-plane, the sum over the lower half-plane is \overline{S}. As zf(z) \to 0 (degree gap at least 2), Result 4 of The residue theorem gives \operatorname{Res}(f, \infty) = 0, and the sum of all residues is 0. So S + \overline{S} = 2\operatorname{Re} S = 0. \blacksquare