Worked evaluations and exercises, grouped by the contour cases on Which contour do I close?.
Rational, superlinear decay
Upper semicircle; the arc integral tends to \(0\) by the ML estimate.
$\int_\RR\frac{dx}{x^4+1}$ by a semicircle (Tag E-IZKCV)
\[ \int_\RR {1 \over x^4 + 1} = {\pi \sqrt{2} \over 2} = {\pi \over \sqrt 2} .\]
Solution
The integrand \(f\in \bigo\qty{1\over z^4} \subseteq \bigo\qty{1\over z^{1+\eps}}\), so a semicircular contour works. Factoring the denominator: find a principal root \[ \omega^4 = -1 = e^{i\pi} \implies \omega = e^{i\pi\over 4} ,\] so \[ z^4 + 1 = (z-\omega)(z-\omega\zeta_4)(z-\omega\zeta_4^2)(z-\omega\zeta_4^3) \leadsto {\pi \over 4}, {3\pi \over 4}, {5\pi \over 4}, {7\pi \over 4} .\] So there are two simple poles in \(\HH\):
Write them as \(z_1 = e^{i\pi \over 4}\) and \(z_2 = e^{3 i \pi \over 4}\). Computing the residues: \[ \Res_{z=z_k} f(z) &= \lim_{z\to z_k} {z-z_k \over z^4 + 1} \\ &\eqLH \lim_{z\to z_k} {1\over 4z^3} \\ &= {z^{-3}\over 4 }\evalfrom_{z=z_k} ,\] so \[ 2\pi i \sum \Res_{z=z_k} &= {2\pi i \over 4}\qty{z_1^{-3} + z_2^{-3}} \\ &= {\pi i \over 2}\qty{e^{-3 i \pi \over 4} + e^{-9 i \pi \over 4}} \\ &= {\pi i \over 2}\qty{e^{-3 i \pi \over 4} + e^{-i \pi \over 4}} \\ &= {\pi i \over 2}\cdot e^{-2i\pi \over 4}\qty{e^{- i \pi \over 4} + e^{i \pi \over 4}} \\ &= \pi i\, {1\over i} \cos\qty{\pi \over 4} \\ &= {\pi \sqrt 2 \over 2} .\]
$1/x^4+1$, half-line (Tag E-UDYDX)
\[ I \da \int_0^\infty {1\over x^4 + 1 }\dx = {\pi \over 2\sqrt 2} .\]
Solution: Integrand symmetry
Note that the function is even, so \[ \int_{0^\infty} f(x) \dx = {1\over 2} \int_\RR f(x)\dx = {1\over 2} {\pi \over \sqrt 2} = {\pi \over 2 \sqrt 2} ,\] using the solution from a previous problem.
Solution: Sector
A sector will work, since there is a symmetry under \(z\to \zeta_4 z\) and \(f(z) \sim z^{-4}\), so the semicircular piece will vanish. Take the contour \(\Gamma\) comprised of
\(\gamma_1: \ts{t + 0i \st t\in [0, R]}\),
\(C_R: \ts{Re^{it}\st t\in [0, \pi/2]}\),
\(\gamma_2: \ts{0 + it \st t\in [0, R]}\),
oriented counter-clockwise. Note that \(z^4+1 = \prod_{k=0}^3 (z-\omega \zeta_4)\) where \(\omega = e^{i\pi \over 4}\) and \(\zeta_4 = e^{2\pi i\over 4} = i\), so there is only one pole at \(z_0 \da e^{i\pi\over 4}\) within this contour.
Computing the symmetry: \[ \int_{\gamma_2} f(z) \dz &= \int_R^0 {i \over (ti)^4 + 1}\dt \qquad z=ti,\, \dz = i\dt \\ &= -i \int_0^R {1\over t^4 + 1}\dt \\ &= -i \int_{\gamma_1} f(z) \dz ,\] so applying the residue theorem and noting that \(\int_{C_R}f\to 0\), \[ 2\pi \Res_{z=z_0} f(z) = \int_\Gamma f(z) \dz = \qty{\int_{\gamma_1} + \int_{C_R} + \int_{\gamma_2}}f \too (1-i) I .\] Computing the residue: \[ \Res_{z=z_0}f(z) &= {1\over 4z^3}\evalfrom_{z= e^{i\pi \over 4}} \\ &= {1\over 4}e^{-3i\pi \over 4} \\ &= {1\over 4}e^{5i\pi \over 4} .\]
Thus \[ I &= \inverseof{(1-i)} 2\pi i \Res_{z=z_0} f(z) \\ &= \qty{\bar{1-i} \over \abs{1-i}^2} 2\pi i \cdot {1\over 4}e^{5i\pi \over 4} \\ &= {1+i \over 2} {\pi i \over 2}e^{5i\pi \over 4} \\ &= {e^{i\pi \over 4} \over \sqrt{2} } {\pi i \over 2}e^{5i\pi \over 4} \\ &= {\pi i \over 2\sqrt{2}}e^{6i\pi \over 4} \\ &= {\pi i \over 2\sqrt{2}}(-i) \\ &= {\pi \over 2\sqrt{2}} .\]
Solution: The log trick
Consider the auxiliary function \(g(z) \da \log(z) f(z)\), and take a keyhole contour:
Let \(\Gamma\) be the counterclockwise contour consisting of
\(C_\eps = \ts{\eps e^{it}\st t\in [0+\eps, 2\pi - \eps]}\)
\(\gamma_+ = \ts{x+i\eps \st x\in [\eps, R]}\)
\(C_R= \ts{R e^{it}\st t\in [0+\eps, 2\pi - \eps]}\)
\(\gamma_- = \ts{x-i\eps \st x\in [\eps, R]}\)
Computing the symmetry: \[ \int_{\gamma_-}{\log(z) \over z^{4} + 1} \dz &= \int_{R}^\eps {\log(x-i\eps) \over (x-i\eps)^4 + 1} \dx \qquad z=x-i\eps, \dz = \dx \\ &\to - \int_{\eps}^R {\log(x) + 2\pi i\over x^4 + 1}\dz \\ &= -\int_{\gamma_+} {\log(z) \over z^4+1}\dz - 2\pi i\int_{\gamma_+} {1\over z^4+1} \dz ,\] so \[ \int_{\gamma_+} f + \int_{\gamma_-}f \too -2\pi i I .\] By the ML estimate, since \(\log(z)/z^4\to 0\) as \(\abs{z}\to \infty\), \(\int_{C_R}g(z) \to 0\). Similarly, since \(\log(z) / (z^4+1)\to 0\) as \(\abs{z}\to 0\), \(\int_{C_\eps}\to 0\). We’re then left with the sum of residues at \(e^{k i \pi \over 4}\) for \(k = 1,3,5,7\). We have \[ \Res_{z=z_k} f(z) &= {1\over 4z^3}\evalfrom_{z=z_k} \\ &= {z\over 4z^4}\evalfrom_{z=z_k} \\ &= - {z\over 4}\evalfrom_{z=z_k} \qquad \text{ since } z_k^4 = -1 \\ &= -{z_k \over 4} ,\] so \[ \Res_{z=z_k}g(z) = -{z_k \over 4}\log(z_k) .\]
Now use that in the limit, \[ 2\pi i \sum_k \Res_{z=z_k}g(z) &= \int_\Gamma g(z) \dz \\ &= \qty{\int_{\gamma_+} + \int_{\gamma_i}} f \\ &= -2\pi i I ,\] so \(I = -\sum_k \Res_{z=z_k} g(z)\).
Being very careful to note that we’ve chosen a branch of \(\log\) where \(\Arg(z) \in (0, 2\pi)\) in order to get the signs right, \[ -\sum_k \Res(z=z_k) g(z) &= {1\over 4}\qty{ z_1\log(z_1) + z_2\log(z_2)+z_3\log(z_3)+z_4\log(z_4) } \\ &= {1\over 4}\qty{ z_1 {i\pi \over 4} + z_2 {3i\pi \over 4} + z_3 {5i\pi \over 4}+ z_4 {7i\pi \over 4} } \\ &= {i\pi \over 16}\qty{ z_1 + 3z_2 + 5z_3+ 7z_4 } \\ &= {i\pi \over 16}\qty{ \omega \zeta_4^0 + 3\omega\zeta_4^1 + 5\omega\zeta_4^2+ 7\omega \zeta_4^3 } \\ &= {i\pi \omega \over 16}\qty{ 1 + 3i + -5 + -7i } \\ &= {i\pi \omega \over 16}(-4-4i) \\ &= -{i\pi \omega \over 4}(1+i) \\ &= -{i\pi \omega \over 2}{ \omega \over \sqrt{2} } \\ &= -i\omega^2 {\pi \over 2 \sqrt 2} \\ &= {\pi \over 2\sqrt{2} } ,\] using that \({\sqrt 2\over 2}(1+i) = e^{i\pi \over 4} = \omega\) and \(\omega^2 = i\).
$\int_\RR\frac{dx}{(1+x^2)^2}$ (Tag E-AKNDW)
\[ \int_\RR {1 \over (1+x^2)^2}\dx = {\pi \over 2} .\]
Solution
Let \[ f(z)=\frac{1}{(1+z^2)^2}. \] Integrate over the positively oriented upper semicircle of radius \(R>1\). The only enclosed pole is the double pole at \(z=i\), with residue \[ \Res_{z=i}f(z) =\left.\dd{}{z}\frac{1}{(z+i)^2}\right|_{z=i} =-\frac{2}{(2i)^3} =\frac{1}{4i}. \] Hence \[ \int_{-R}^R f(x)\,dx+\int_{C_R}f(z)\,dz =2\pi i\Res_{z=i}f(z) =\frac{\pi}{2}. \] On \(C_R\), \[ |1+z^2|\ge R^2-1, \] so the ML estimate gives \[ \abs{\int_{C_R}f(z)\,dz} \le \pi R\frac{1}{(R^2-1)^2}\to0. \] Letting \(R\to\infty\) yields \[ \int_{\RR}\frac{dx}{(1+x^2)^2}=\frac{\pi}{2}. \]
$\int_\RR\frac{dx}{(1+x^2)^{n+1}}$ (Tag E-AKF2O)
\[ I \da \int_{-\infty}^{\infty} \frac{d x}{\left(1+x^{2}\right)^{n+1}}=\frac{(2 n) !}{4^{n}(n !)^{2}} \pi . \]
Note that this solution can be written many ways: \[ I = {2n \choose n} {\pi \over 4^n} = {\falling{2n}{n} \over n!} {\pi \over 4^n} = {(2n)(2n-1)\cdots(n+1)\over n!} {\pi \over 4^n} .\]
Solution
The integrand is \(f\in \bigo\qty{1\over z^{2n+2}} \subseteq \bigo\qty{1\over z^{1+\eps}}\), so a semicircular contour will work:
Thus \[ I &= 2\pi i \sum_{z_k \in \HH} \Res_{z=z_k} {1\over (1+z^2)^{n+1}} \\ &= 2\pi i \Res_{z=i} {1\over (z+i)^{n+1}(z-i)^{n+1} } \\ &= 2\pi i \lim_{z\to i}{1\over n!}\qty{\dd{}{z}}^n (z+i)^{-(n+1)} \\ &= 2\pi i \lim_{z\to i}{1\over n!}\qty{\dd{}{z}}^{n-1} -(n+1)(z+i)^{-(n+2)} \\ &= 2\pi i \lim_{z\to i}{1\over n!}\qty{\dd{}{z}}^{n-2} -(n+1) \cdot -(n+2) (z+i)^{-(n+3)} \\ &= \qquad \vdots \\ &= 2\pi i \lim_{z\to i}{1\over n!}\qty{\dd{}{z}}^{n-k} (-1)^k (n+1)(n+2)\cdots(n+k) (z+i)^{-(n+k+1)} \\ &= \qquad \vdots \\ &= 2\pi i \lim_{z\to i} {1 \over n!}(-1)^n (n+1)(n+2)\cdots(2n)(z+i)^{-(2n+1)} \\ &= { \falling{2n}{n} \over n!} 2\pi i (-1)^n (2i)^{-(2n+1)} \\ &= { \falling{2n}{n} \over n!} 2\pi i (-1)^n {1\over 2^{2n+1} i^{2n+1}} \\ &= { \falling{2n}{n} \over n!} \pi (-1)^n {1\over 4^n i^{2n}} \\ &= { \falling{2n}{n} \over n!} \pi (-1)^n {1\over 4^n (-1)^n } \\ &= { \falling{2n}{n} \over n!} {\pi \over 4^n } .\]
$x/(x^2+4x+13)^2$ (Tag E-JZNWV)
\[ I\da \int_\RR {x\over (x^2 + 4x+13)^2}\dx .\]
Solution
Write the integrand as \(f\).
\(f\in \bigo\qty{1\over z^{3}} \subseteq \bigo\qty{1\over z^{1+\eps}}\) means that a semicircular contour will work:
(Of integrand decay)
A quick justification: for \(R>1\), if \(n>k\) then \(\abs{z}^n > \abs{z}^k\), so using the reverse triangle inequality, \[ \abs{z\over (z^2 + 4z + 13)^2} &= \abs{z\over z^4 + 8z^3 + 42z^2 + 104z + 169}\\ &\leq \abs{z\over \abs{z}^4 - 8\abs{z}^3 - 42\abs{z}^2 - 104\abs{z} - 169}\\ &\leq \abs{z\over \abs{z}^4 - 8\abs{z}^4 - 42\abs{z}^4 - 104\abs{z}^4 - 169\abs{z}^4}\\ &= \abs{z\over \abs{z}^4( 1 - 8 - 42 - 104 - 169)}\\ &= 322 {\abs{z} \over \abs{z}^4} \\ &= 322 \abs{z}^{-3} \\ &= 322 R^{-3} \to 0 \text{ as } R\to\infty .\]
Factor the denominator: \[ x^2 + 4x + 13 = 0 &\implies x^2 + 4x + \qty{4\over 2}^2 = -13 + \qty{4\over 2}^2 \\ &\implies (x+2)^2 = -9 \\ &\implies x = -2 \pm 3i ,\] one of which is in \(\HH\). Write these as \[ z_1 \da -2+3i && z_2 \da -2 - 3i .\]
So let \(\Gamma\) be comprised of
- \(C_1 = [-R,R]\),
- \(C_2 = \ts{Re^{it} \st t\in [0, \pi]}\),
- \(\Gamma = C_1 + C_2\), then \[ 2\pi i \sum_{z_k\in \HH} \Res_{z=z_k}f(z) = \int_\Gamma f = \qty{\int_{C_1} + \int_{C_2}}f ,\] where \(\int_{C_2} f\to 0\) and \(\int_{C_1} f\to I\). So in the limit, \(I = 2\pi i \Res_{z=z_1} f(z)\). Computing this residue: note \(z_1\) is a pole of order 2, so \[ \Res_{z=z_1} &= \lim_{z\to z_1} \dd{}{z} (z-z_1)^2f(z) &= \lim_{z\to z_1} \dd{}{z} {z \over (z-z_2)^2} \\ &= \lim_{z\to z_1} { (z-z_2)^2 - 2z(z-z_2 ) \over (z-z_2)^4} \\ &= \lim_{z\to z_1} { (z-z_2) - 2z \over (z-z_2)^3} \\ &= \lim_{z\to z_1} -{ z+z_2 \over (z-z_2)^3} \\ &= - {z_1 + z_2 \over (z_1 - z_2)^2}\\ &= - {z_1 + \bar{z_1} \over (z_1 - \bar{z_1} )^2}\\ &= - {2\Re(z_1) \over (2i\Im(z_1))^3} \\ &= - {2\cdot (-2) \over (2i\cdot 3) ^3} \\ &= {4\over 2^3 \cdot 3^3 \cdot i^3} \\ &= {-i \over 2 \cdot 3^3 i^2} \\ &= {i\over 54} ,\] so \[ I = 2\pi i \cdot {i\over 54} = -{\pi \over 27} .\]
$\cos(x) / x^2 + b^2$ (Tag E-SPIVX)
\[ I \da \int_{0}^{\infty} \frac{\cos (x)}{x^{2}+b^{2}} d x=\frac{\pi \mathrm{e}^{-b}}{2 b} .\]
Solution
The integrand is even, so \[ I = \Re{1\over 2} \tilde I \da {1\over 2} \int_\RR {e^{iz} \over (z+ib)(z-ib)} \]
Since \(f \sim 1/x^2\), the ML estimate on a semicircular contour works:
Then \(\int_{C_R} f\to 0\) and \(\int_{C_1} f\to \tilde I\). Thus \[ \tilde I &= 2\pi i \Res_{z=ib} \\ &= 2\pi i \lim_{z\to ib}{e^{iz}\over (z+ib)} \\ &= 2\pi i {e^{-b} \over 2i b} \\ &= {\pi e^{-b} \over b} \] and \[ I = \Re {1\over 2} \tilde I = {\pi e^{-b} \over 2b} .\]
The integral of $1/(x^4+1)$ over $\mathbb{R}$ (Tag E-JK5PG)
\[ \int_\RR {1 \over x^4 + 1} = {\pi \sqrt{2} \over 2} .\]
Solution
Rational against \(e^{iz}\)
Upper semicircle applied to \(f(z)e^{iz}\); the arc integral tends to \(0\) by Jordan’s lemma.
For \(f(z) \coloneqq {e^{iz} \over 1 + z^2}\) on the upper semicircle \(\gamma_R\), \(z = Re^{it}\) with \(R>1\), the factor \(1/(1+z^2)\) satisfies \[ \begin{aligned} \sup_{z\in \gamma_R} \abs{1 \over 1 + z^2} &= \max_{t\in [0, \pi]} \abs{1 \over 1 + (Re^{it})^2 } \\ &= {1\over R^2 - 1} \end{aligned},\] so Jordan’s lemma bounds the arc integral by \(\pi/(R^2-1)\).
$\int_\RR\frac{x\sin x}{1+x^2}\,dx$ by Jordan's lemma (Tag E-AXBZQ)
\[ I = \int_\RR {x\sin(x) \over 1 + x^2}\dx .\]
Solution
Write \(f(z) = {ze^{iz} \over 1+z^2}\). Since \(f\in \bigo\qty{1\over z}\) on the semicircle of radius \(R\), whose length is \(\pi R\), the ML estimate bounds the arc integral only by a constant; Jordan’s lemma gives decay:
Write \(f(z) = e^{iz}g(z)\) where \(g(z) \da {z\over 1 + z^2}\). Write \(C_1 = [-R, R]\) and \(C_R = \ts{Re^{it} \st t\in [0, \pi]}\). By Jordan’s lemma, \[ \abs{\int_{C_R} e^{iz} g(z)\dz }\leq \pi M_R,\, \qquad M_R \da \sup_{z\in C_R}\abs{z\over 1+z^2}\leq {R\over R^2-1} ,\] so the arc integral tends to zero. By the residue theorem, \[ 2\pi i \sum_{z_k\in \HH}\Res_{z=z_k}f(z) = \qty{\int_{C_1} + \int_{C_R}}f \converges{R\to\infty} \int_\RR {xe^{ix}\over 1+x^2}\dx ,\] and \(I\) is the imaginary part of the right side. Since \(1+z^2 = (z+i)(z-i)\), the only pole in \(\HH\) is the simple pole \(z = i\), and \[ 2\pi i \Res_{z=i} f(z) &= 2\pi i \lim_{z\to i} {ze^{iz} \over z+i} \\ &= 2\pi i {ie^{-1}\over 2i} = {\pi i \over e} ,\] so \[ I = \Im{\pi i\over e} = {\pi \over e} .\]
$\int_0^{\infty}\frac{\cos x}{x^2+b^2}\,dx=\frac{\pi e^{-b}}{2b}$ (Tag E-FRWVZ)
\[ \int_{0}^{\infty} \frac{\cos (x)}{x^{2}+b^{2}} d x=\frac{\pi \mathrm{e}^{-b}}{2 b} . .\]
Solution
The integrand \(\frac{\cos x}{x^2+b^2}\) is even, so the integral is half of \(\int_\RR\frac{\cos x}{x^2+b^2}\,dx\).
$\int_0^{2\pi}\frac{d\theta}{1+a^2-2a\cos\theta}$ (Tag E-2RKYE)
\[ \int_{0}^{2 \pi} \frac{d \theta}{1+a^{2}-2 a \cos (\theta)} = \begin{cases}\frac{2 \pi}{a^{2}-1} & \text { if }|a|>1 \\ \frac{2 \pi}{1-a^{2}} & \text { if }|a|<1\end{cases} .\]
Solution
Assume \(\abs a\ne1\). For \(a=0\) both sides equal \(2\pi\), so assume also \(a\ne0\).
<1>1. \(\displaystyle\int_{0}^{2 \pi} \frac{d \theta}{1+a^{2}-2 a \cos \theta}=\frac{i}{a}\int_{\abs z=1}\frac{dz}{(z-a)(z-1/a)}\).
Put \(z=e^{i\theta}\), so \(2\cos\theta=z+\inverseof{z}\) and \(d\theta=dz/(iz)\). Then \[ \frac{d\theta}{1+a^2-2a\cos\theta} =\frac{dz}{i\left(\left(1+a^{2}\right) z-a\left(z^{2}+1\right)\right)} =\frac{dz}{-ia(z-a)(z-1/a)} =\frac{i}{a}\,\frac{dz}{(z-a)(z-1/a)}. \]
<1>2. Q.E.D.
Exactly one of \(a\), \(1/a\) lies in the unit disk. If \(\abs a<1\), the residue theorem at \(z=a\) gives \(2\pi i\cdot\frac ia\cdot\frac{1}{a-1/a}=\frac{2\pi}{1-a^2}\). If \(\abs a>1\), the residue at \(z=1/a\) gives \(2\pi i\cdot\frac ia\cdot\frac{1}{1/a-a}=\frac{2\pi}{a^2-1}\). Step <1>1 converts these into the two cases of the formula.
No clear decay
Sectors and rectangles, determined by a rotation or translation symmetry of the integrand.
$e^{x/2} / 1+e^x,$ replication (Tag E-YYRZX)
\[ I \da \int_\RR {e^{x\over 2}\over 1+e^x}\dx .\]
Solution
Replication: find \(b\) such that \(f(z) = f(z+ib)\) and use a rectangle. \[ f(z+ib) = {e^{z\over 2}e^{ib\over 2} \over 1 + e^{ib}e^z} = e^{ib\over 2} {e^{z\over 2} \over 1 + e^{ib}e^z } = f(z) \impliedby e^{ib} = 1 \impliedby b=2\pi ,\] in which case \[ f(z + 2\pi i) = e^{ib\over 2}f(z) = e^{2\pi i \over 2}f(z) = -f(z) .\]
So take the following rectangle where \(H_-\) is at \(2\pi i\) and \(H_+\) is at 0, with sides at \(\pm R\):
Write \(\Gamma\) for the entire contour. Note that integrating left-to-right on \(H_-\) yields \(-I\), since \(w = z+2\pi i\) for \(w\in H_-\) and \(f(w) = -f(z)\). Then reversing the orientation, going right-to-left yields \(\int_{H_i} f = I\).
Claim: the integrals over the sides \(V_{\pm}\) vanish. For the right, \[ \abs{\int_{V_+} f(z) \dz} &\leq 2\pi \sup_{t\in [0, 2\pi]} \abs{e^{R + it\over 2} \over 1 + e^{R + it} } \\ &\leq 2\pi \sup_t {\abs{ e^{R\over 2} e^{it \over 2} } \over \abs{e^{R}e^{it}} - 1} \\ &\leq 2\pi \sup_t {\abs{ e^{R\over 2} } \over \abs{e^{R}} - 1} \\ &\in \bigo(e^{- {R\over 2} }) \to 0 .\]
For the left: \[ \abs{\int_{V_-} f(z) \dz} &\leq \sup_{t\in [0, 2\pi] } \abs{ e^{-R-it\over 2} \over 1 + e^{-R- it}} \\ &\leq \sup_{t\in [0, 2\pi]}\abs{e^{-R\over 2} e^{-it\over 2}} \\ &\leq \sup_{t\in [0, 2\pi]}\abs{e^{-R\over 2}} \\ &\in \bigo(e^{- {R\over 2} }) \to 0 ,\] where we’ve thrown away positive terms in the denominator, which only makes this quantity larger.
Finding the poles within \(\Gamma\): the poles occur when the denominator vanishes, i.e. when \(e^z = -1\); writing \(z = x + iy\), \(e^z = e^x e^{iy} = -1\) forces \(e^x = 1\) (so \(x = 0\)) and \(e^{iy} = -1\) (so \(y = (2k+1)\pi\)), giving \(z = (2k+1)\pi i\) for \(k \in \ZZ\). Exactly one falls into this contour, \(z_k = i\pi\). By the residue theorem, \[ 2\pi i \Res_{z=i\pi} f(z) = \int_\Gamma f(z) \dz = \qty{\int_{H_-} + \int_{H_+}} f = 2I \implies I = \pi i \Res_{z=i\pi } f .\] Computing this residue: \[ \pi i \Res_{z=i\pi }f(z) &= \pi i \lim_{z\to i\pi} { (z-i\pi) e^{z\over 2}\over e^z + 1} \\ &\eqLH \pi i \lim_{z\to i\pi} {e^{z\over 2} \over e^z} \\ &= \pi i e^{-i\pi \over 2} \\ &= \pi .\]
$\int_{\mathbb R} e^{ax}\operatorname{sech}(x)\,dx$ (Tag E-AIQEU)
\[ I \da \int_\RR {e^{ax} \over \cosh(x) }\dx, \qquad \abs{\Re(a)}<1. \] Show that \[ I=\pi\sec\qty{a\pi\over2}. \]
Solution
Set \[ f(z)=\frac{e^{az}}{\cosh z}. \] The poles of \(f\) occur at \[ z=\qty{k+\frac12}\pi i, \qquad k\in\ZZ. \] Integrate around the positively oriented rectangle with vertices \(-R,R,R+i\pi,-R+i\pi\).
Since \[ \cosh(z+i\pi)=-\cosh z, \qquad e^{a(z+i\pi)}=e^{i\pi a}e^{az}, \] the upper horizontal edge, oriented from \(R+i\pi\) to \(-R+i\pi\), contributes \[ \int_R^{-R}f(x+i\pi)\,dx =e^{i\pi a}\int_{-R}^R f(x)\,dx. \] Therefore the two horizontal edges contribute \[ \qty{1+e^{i\pi a}}I_R, \qquad I_R=\int_{-R}^R\frac{e^{ax}}{\cosh x}\,dx. \]
For \(0\leq y\leq\pi\), \[ \abs{\cosh(R+iy)}^2=\sinh^2R+\cos^2y\geq\sinh^2R. \] Thus, with a constant \(C_a\) independent of \(R\) and \(y\), \[ \abs{f(R+iy)}\leq C_a\frac{e^{R\Re a}}{\sinh R}, \qquad \abs{f(-R+iy)}\leq C_a\frac{e^{-R\Re a}}{\sinh R}. \] The vertical-edge integrals therefore tend to zero when \(-1<\Re a<1\).
The rectangle contains only the pole \(z_0=i\pi/2\). It is simple, and \[ \Res_{z=z_0}f(z) =\frac{e^{az_0}}{\sinh z_0} =\frac{e^{i\pi a/2}}{i} =-i e^{i\pi a/2}. \] Letting \(R\to\infty\) in the residue theorem gives \[ \qty{1+e^{i\pi a}}I =2\pi e^{i\pi a/2}. \] Since \[ 1+e^{i\pi a}=2e^{i\pi a/2}\cos\qty{\pi a\over2}, \] we obtain \[ I=\pi\sec\qty{\pi a\over2}. \]
Singularities on the line: principal values
Semicircles indented above each real simple pole, each of which contributes \(i\pi\) times its residue.
$\sin(x)/x$ and $\cos(x)/x$ (Tag E-ZGZYQ)
Compute \[ I_1 \da \operatorname{PV}\int_\RR {\sin(x) \over x}\dx = \pi \\ I_2 \da \operatorname{PV}\int_\RR {\cos(x) \over x}\dx = 0 .\]
Solution
Take \(\Gamma\) an upper-half-plane semicircular contour indented at the origin; considering \(f(z) = e^{iz}\), by Jordan’s lemma \(\int_{C_R}f \to 0\) and the pieces along \(\RR\) converge to \(\PV \int f\). The singularity at \(z_0 = 0\) contributes a fractional residue: \[ \int_{C_\eps}f(z)\dz \to i\pi \Res_{z=z_0} f(z) = i\pi \lim_{z\to 0} {(z-0) e^{iz}\over z} = i\pi \cdot 1 .\] Thus \[ I \da \PV \int_\RR f(z)\dz = 0 + i\pi \implies I_1 = \Im(I) = \pi, \quad I_2 = \Re(I) = 0 .\]
$\int_\RR\frac{xe^{2ix}}{x^2-1}\,dx$ (Tag E-DUK6M)
\[ I \da \int_\RR {xe^{2ix} \over x^2-1}\dx = i\pi \cos(2) .\]
Solution
Let \(f(z)={ze^{2iz}\over z^2-1}\). The denominator is \((z-1)(z+1)\), so \(f\) has simple poles at \(\pm1\) on \(\RR\), and \(I\) is a principal value there. For \(0<\eps<1<R\), define the contour
- \(C_1: [-R, -1-\eps]\), \([-1+\eps, 1-\eps]\) and \([1+\eps, R]\) on the real axis
- \(C_2: -1 + \eps e^{it}\), \(t\) from \(\pi\) to \(0\) (clockwise, above \(-1\))
- \(C_4: 1 + \eps e^{it}\), \(t\) from \(\pi\) to \(0\) (clockwise, above \(1\))
- \(C_R: Re^{it}, t\in [0, \pi]\)
- \(\Gamma = C_1 + C_2 + C_4 + C_R\)
The figure shows the same indentations on a rectangular contour; here the outer arc is the semicircle \(C_R\):
\(\int_\Gamma f = 0\) since \(\Gamma\) encloses no singularities. By Jordan’s lemma, \(\int_{C_R}f\to 0\), since \(\abs{z/(z^2-1)}\le R/(R^2-1)\) on \(C_R\). A clockwise half-circle about a simple pole contributes \(-\pi i\) times the residue in the limit \(\eps\to0\). With \[ \Res_{z=-1} f(z) = \lim_{z\to -1} {ze^{2iz} \over z-1} = {e^{-2i} \over 2}, \qquad \Res_{z=1} f(z) = \lim_{z\to 1} {ze^{2iz} \over z+1} = {e^{2i} \over 2} ,\] letting \(\eps\to0\) and \(R\to\infty\) gives \[ 0 = I - \pi i\qty{{e^{-2i} \over 2} + {e^{2i}\over 2}} ,\] so \[ I = \pi i \cos(2) .\]
Rational functions of \(\cos\) and \(\sin\)
The unit circle, through \(z = e^{i\theta}\).
For real \(a\) with \(\abs a<1\), the only pole of the integrand inside \(S^1\) is \(z=a\): \[ \int_{0}^{2 \pi} \frac{\dtheta}{1+a^{2}-2 a \cos \theta}=\int_{S^{1}} \frac{i \dz}{(z-a)(a z-1)}=2 \pi i\left(i /\left(a^{2}-1\right)\right)=\frac{2 \pi}{1-a^{2}} .\]
$\int_{-\pi}^{\pi}\frac{d\theta}{1+\sin^2\theta}$ (Tag E-BEIHP)
\[ \int_{[-\pi, \pi]} {1\over 1 + \sin^2(\theta)} \dtheta .\]
Solution
Set \(z=e^{i\theta}\), so \(\sin(\theta) = {z-\inverseof{z}\over 2i}\) and \(\sin^2(\theta) = -{1\over 4}(z^{-2}-2+z^2)\). Then \[ I\da \int_{[-\pi, \pi]} {1\over 1 + \sin^2(\theta)} \dtheta &= \int_{S^1} {1\over 1 - {1\over 4}(z^{-2} -2 + z^2) } {1\over iz}\dz \\ &= \int_{S^1} {-4i \over z(4-(z^{-2} -2 + z^2))}\dz \\ &= \int_{S^1} {-4iz \over z^2(6-z^{-2} - z^2)}\dz \\ &= \int_{S^1} {4iz \over z^4-6z^2+1}\dz \\ &= 2\pi i \sum_{z_k\in \DD} \Res_{z=z_k} {4iz\over z^4-6z^2+1} .\]
Factoring the denominator, with \(w=z^2\): \[ w^2 - 6w + 1 =0 &\implies w^2 - 6w + \qty{-6\over 2}^2 - \qty{-6\over 2}^2 + 1 =0 \\ &\implies (w - 3)^2 = -1 + 9 = 8 \\ &\implies w-3 = \zeta_2^k \sqrt{8},\, k=0, 1 \\ &\implies w = 3 \pm \sqrt{8} \\ &\implies z= \pm\sqrt{3\pm \sqrt 8} .\] Write these roots as
\(z_1 \da \sqrt{3-\sqrt 8}\)
\(z_2 \da -\sqrt{3-\sqrt 8}\)
\(z_3 \da \sqrt{3+\sqrt 8}\)
\(z_4 \da -\sqrt{3 + \sqrt 8}\)
Their moduli:
\(3 + \sqrt{8} > 1\), so \(\abs{ \pm \sqrt{3+\sqrt 8}}>1\).
\(0<3-\sqrt{8} < 1\) since \(2<\sqrt 8<3\), so \(\abs{ \pm \sqrt{3-\sqrt 8} } < 1\).
So it suffices to compute the residues at \(z_1, z_2 = \pm \sqrt{3-\sqrt 8}\): At \(z_1\): \[ \Res_{z = z_1} &= \lim_{z\to z_1} {(z-z_1) 4i z \over z^4-6z^2+1 } \\ &\equalsbecause{\text{LH}} \lim_{z\to z_1} { 4iz + 4i(z-z_1) \over 4z^3 -12z} \\ &= {4iz_1 \over 4z_1^3 - 12z_1} \\ &= {i\over z_1^2 - 3} \\ &= {i\over (3-\sqrt 8) - 3} \\ &= -{i\over \sqrt 8} .\] At \(z_2\): \[ \Res_{z=z_2} &= \lim_{z\to z_2} {(z-z_2) 4i z \over z^4-6z^2+1 } \\ &= {4iz_2\over 4z_2^3 - 12z_2}\\ &= {i \over z_2^2 - 3} \\ &= -{i\over \sqrt 8} .\]
Thus \[ I = 2\pi i \cdot -{2i\over \sqrt 8} = {4\pi \over \sqrt{8}} .\]
$1/1+a^2+2a\cos(\theta)$, Poisson kernels (Tag E-Z4JCZ)
\[ \int_{0}^{2 \pi} \frac{d \theta}{1+a^{2}-2 a \cos (\theta)} = \begin{cases}\frac{2 \pi}{a^{2}-1} & \text { if }|a|>1 \\ \frac{2 \pi}{1-a^{2}} & \text { if }|a|<1\end{cases} .\]
Solution
The usual substitution: \(z=e^{i\theta}, \dz = (iz)\dtheta\). \[ I\da \int_{[0, 2\pi]} \inverseof{\qty{a^2 - 2a\cos(\theta) + 1}} \dtheta &= \oint \inverseof{\qty{a^2-2(z+\inverseof{z}) + 1}} \inverseof{(iz)} \dz \\ &= -i\oint \inverseof{\qty{za^2 - a(z^2+1) +z}} \dz \\ &= -i \oint\inverseof{\qty{-az^2 + (a^2+1)z - a}}\dz \\ &= {i\over a}\oint \inverseof{\qty{z^2 - \qty{a^2+a\over a}z + 1}} \dz \\ &= {i\over a}\oint \inverseof{(z-a)} \inverseof{(z-\inverseof{a})} \dz ,\] noting that \({a^2+a\over a} = a+\inverseof{a}\). Now there are two cases:
\(\abs{a} < 1\): then \(a\in \DD,\inverseof{a}\in \DD^c\), so there is a simple pole at \(a\). Then \[ I &= {i\over a}\, 2\pi i \Res_{z=a} \inverseof{(z-a)}\inverseof{(z-\inverseof{a})} \\ &= -{2\pi \over a} \inverseof{(z-\inverseof{a})} \evalfrom_{z=a} \\ &= -{2\pi \over a(a-\inverseof{a})} \\ &= {2\pi \over 1 - a^2} .\]
\(\abs{a}> 1\): then \(\inverseof{a} \in \DD, a\in \DD^c\) so there is a simple pole at \(\inverseof{a}\). Then \[ I &= {i\over a}\, 2\pi i \Res_{z=\inverseof{a} } \inverseof{(z-a)}\inverseof{(z-\inverseof{a})} \\ &= -{2\pi \over a} \inverseof{(z-a)} \evalfrom_{z=\inverseof{a}} \\ &= -{2\pi \over a(\inverseof{a} - a)} \\ &= {2\pi \over a^2 - 1} .\]
$\int_0^{2\pi}\frac{d\theta}{a+b\cos\theta}$ (Tag E-JKROF)
\[ \int_{0}^{2 \pi} \frac{d \theta}{a+b \cos \theta}=\frac{2 \pi}{\sqrt{a^{2}-b^{2}}} .\]
Solution
The usual substitution: \(z=e^{i\theta}, \dtheta = \inverseof{(iz)} \dz\). \[ \int_{[0, 2\pi]} \inverseof{(a +b\cos(\theta))} \dtheta &= \oint \inverseof{\qty{ a + {b\over 2}(z+\inverseof{z})}} \inverseof{(iz)} \dz \\ &= -i\oint \inverseof{\qty{ za + {b\over 2}(z^2 + 1)}} \dz \\ &= -i \oint \inverseof{\qty{{b\over 2}z^2 + az + {b\over 2} }} \dz \\ &= -{2i\over b} \oint \inverseof{\qty{z^2 + {2a\over b}z + 1}} \dz \\ &= -{2i\over b}\oint \inverseof{(z-r_1)} \inverseof{(z-r_2)} \dz ,\] where by the quadratic formula the roots are \[ z_k &= {1\over 2} \qty{-{2a\over b} \pm \sqrt{\qty{2a\over b}^2 - 4}} \\ &= -{a\over b}\pm {1\over 2}\sqrt{{4a^2 \over b^2} - 4} \\ &= -{a\over b}\pm \sqrt{{a^2 \over b^2} - 1} \\ &= -{a\over b}\pm \sqrt{{a^2 - b^2 \over b^2}} \\ &= -{a\over b}\pm {1\over b } \sqrt{{a^2 - b^2}} .\] Thus \[ r_1 &\da \inverseof{b}\qty{-a + \sqrt{a^2-b^2}} \\ r_2 &\da \inverseof{b}\qty{-a - \sqrt{a^2-b^2}} .\]
Assume \(a>\abs b>0\), so that the integrand is continuous and the roots are real and distinct (for \(b=0\) the integral is \(2\pi/a\) directly). Since \(r_1 r_2 = 1\), exactly one root lies in \(\DD\), giving one simple pole there. If \(b>0\), then \(r_2=-(a+\sqrt{a^2-b^2})/b<-a/b<-1\); if \(b<0\), then \(r_2>a/\abs b>1\). In either case \(\abs{r_2}>1\), so \(r_1\in \DD\). Computing the residue here: \[ \Res_{z=r_1} \inverseof{(z-r_1)} \inverseof{(z-r_2)} &= \inverseof{(z-r_2)} \evalfrom_{z=r_1} \\ &= \inverseof{(r_1 - r_2)} \\ &= \inverseof{\qty{2\inverseof{b} \sqrt{a^2-b^2} }} ,\] so \[ I &= 2\pi i \cdot -{2 i \over b}{b\over 2\sqrt{a^2-b^2}} \\ &= {2\pi \over \sqrt{a^2-b^2} } .\]
Branch cuts: logarithms
$\int_0^\infty\frac{\log x}{1+x^2}\,dx$ (Tag E-FJJA6)
\[ I \da \int_0^\infty {\log(x) \over 1+x^2}\dx = 0 .\]
Solution
The integrand \(1/(1+x^2)\) is even, so the negative real axis contributes \(I\) plus a multiple of \(\int_0^\infty dx/(1+x^2)\). Take a branch cut for \(\log\) along \(\theta = -\pi/2\) and the upper semicircle of radius \(R\) indented at \(0\) by a semicircle of radius \(\eps\):
For \(f(z) \da {\log(z) \over z^2 + 1}\), the large arc contributes \(O\qty{(\log R)/R}\) and the small arc \(O\qty{\eps\abs{\log\eps}}\), so only the horizontal contours contribute as \(R\to \infty\) and \(\eps\to 0\). Parameterize, oriented counterclockwise:
- \(\gamma_1 \da \ts{t+0i \st t\in [\eps, R]}\)
- \(\gamma_2 \da \ts{t+0i \st t\in [-\eps, -R]}\)
Then \(\int_{\gamma_1} f(z)\dz \to I\). Computing the contribution from \(\gamma_2\): \[ \int_{\gamma_2} f(z) \dz &= \int_{-R}^{-\eps} f(t) \dt \qquad z=t+0i, \dz=\dt \\ &= \int_{-R}^{-\eps} {\log(t) \over t^2 + 1}\dt \\ &= -\int_{R}^{\eps} {\log(-x) \over (-x)^2 + 1 }\dx \qquad t=-x, \dt = -\dx \\ &= \int_{\eps}^{R} {\log(x) + i\pi \over x^2 + 1 }\dx \\ &= I + i\pi \cdot {\pi \over 2} \\ &= I + {i\pi^2\over 2} ,\] using the known antiderivative \(\arctan\).
Note that there are two simple poles at \(\pm i\), so only the residue at \(z_0=i\) contributes: \[ \Res_{z=i} = \lim_{z\to i} {\log(z) \over (z+i)} = {\log(i) \over 2i} = {i\pi/2 \over 2i} = {\pi \over 4} ,\] so by the residue theorem, \[ 2\pi i \Res_{z=i}f(z) = \lim\int_{\Gamma}f(z) \dz = \lim\qty{ \int_{\gamma_1} + \int_{\gamma_2}}f = 2I + {i\pi^2 \over 2} \\ \implies 2\pi i \cdot {\pi \over 4} = 2I + {i\pi^2\over 2} \\ \implies {i\pi^2\over 2} = 2I + {i\pi^2\over 2} \\ \implies I = 0 .\]
$\int_0^\infty\frac{\log x}{(1+x^2)^2}\,dx$ by a keyhole contour (Tag E-ENWYG)
Evaluate \[ I\da \int_0^\infty {\log x\over(1+x^2)^2}\,dx. \]
Solution
Let \(\log\) be the branch with \(0<\arg z<2\pi\) on \(\CC\setminus[0,\infty)\), and let \[ f(z)={\log^2 z\over(1+z^2)^2},\qquad (1+z^2)^2 = (z+i)^2(z-i)^2 .\] Integrate \(f\) over a keyhole contour with outer radius \(R\) and inner radius \(\rho\), slit along \([0,\infty)\):
Write \(I\) for the requested integral and \(A\coloneqq\int_0^\infty{dx\over(1+x^2)^2}={\pi\over4}\).
<1>1. The circles of radii \(R\) and \(\rho\) contribute \(0\) in the limit.
By the ML estimate, the outer circle contributes \(O\qty{R(\log R+2\pi)^2/R^4}\to0\) and the inner circle contributes \(O\qty{\rho(\abs{\log\rho}+2\pi)^2}\to0\).
<1>2. The two edges of the slit contribute \(-4\pi i I+4\pi^2A\).
On the upper edge \(\log z=\log x\), and on the lower edge, traversed from \(\infty\) to \(0\), \(\log z=\log x+2\pi i\). So the edges contribute \[ \int_0^\infty{\log^2x-(\log x+2\pi i)^2\over(1+x^2)^2}\,dx=-4\pi i I+4\pi^2A .\]
<1>3. \(\Res_{z=i}f=-{\pi\over4}+{i\pi^2\over16}\) and \(\Res_{z=-i}f={3\pi\over4}-{9i\pi^2\over16}\).
With \(h(z)=\log^2z\), \(h'(z)=2\log z/z\), and on this branch \(\log i=i\pi/2\), \(\log(-i)=3\pi i/2\). At the double poles, \[ \Res_{z=i}f=\dd{}{z}{h(z)\over(z+i)^2}\bigg|_{z=i}={h'(i)\over(2i)^2}-{2h(i)\over(2i)^3}={\pi\over-4}-{-\pi^2/2\over-8i}=-{\pi\over4}+{i\pi^2\over16} ,\] \[ \Res_{z=-i}f=\dd{}{z}{h(z)\over(z-i)^2}\bigg|_{z=-i}={h'(-i)\over(-2i)^2}-{2h(-i)\over(-2i)^3}={-3\pi\over-4}-{-9\pi^2/2\over8i}={3\pi\over4}-{9i\pi^2\over16} .\]
<1>4. \(I=\boxed{-\pi/4}\).
By steps <1>1 to <1>3 and the residue theorem, \[ -4\pi iI+4\pi^2A=2\pi i\qty{{\pi\over2}-{i\pi^2\over2}}=\pi^3+i\pi^2 .\] The real parts agree since \(A=\pi/4\), and the imaginary parts give \(-4\pi I=\pi^2\).
A contour with one logarithm also works: with the branch \(-\pi/2<\arg z<3\pi/2\), integrate \(\log z/(1+z^2)^2\) over the upper semicircle indented at \(0\). The negative real axis contributes \(I+i\pi A\), and the residue at the double pole \(i\) is \(\frac i4+\frac\pi8\), so \(2I+i\pi A=-\frac\pi2+\frac{i\pi^2}4\) and again \(I=-\pi/4\).
$\log(x) / x^2+a^2$ (Tag E-KC6DS)
\[ \int_0^\infty {\log(x) \over x^2+a^2}\dx &= {\pi\log(a)\over 2a} && a>0 .\]
Solution
Note that the poles are at \(z=\pm ia\), and since \(\lim_{\abs{z}\to\infty}f(z) = 0\) and \(\lim{R\to 0} {R\log(R)\over R^2 + a^2} = 0\), an indented semicircular contour will work.Semicircle monodromy.
Computing the contribution from the residues: \[ \Res_{z=ia}f(z) &= \lim_{z\to ia }{\log(z) \over (z+ia)} \\ &= {\log(ia) \over 2ia} \\ &= {\log(a) + i\pi/2 \over 2ia} \\ &= {\pi \over 4a} + {\log(a) \over 2ia} \\ \\ \implies 2\pi i \Res_{z=ia}f(z) &= {i\pi^2 \over 2a} + {\pi\log(a) \over a} .\] The contribution from the integrals will come from \(\qty{\int_{\gamma_1} + \int_{\gamma_2}}f\) where
- \(\gamma_1 \da \ts{tR + (1-t)\eps \st t\in [\eps, R] }\)
- \(\gamma_2 \da \ts{t(-\eps) + (1-t)(-R) \st t\in [\eps, R] }\),
so that the overall contour is oriented counterclockwise. Noting that \(\int_{\gamma_1}f(z)\dz \to I\) the desired integral, the other contribution is \[ \int_{\gamma_2}f(z)\dz &= \int_{-R}^{-\eps} {\log(t)\over t^2 + a^2}\dt \\ &= - \int_{-\eps}^{-R} {\log(t) \over t^2+a^2} \dt \\ &= \int_{\eps}^{R} {\log(-x) \over x^2+a^2} \dt \qquad x=-t,\, \dx = -\dt\\ &= \int_\eps^R {\log(x) \over x^2 + a^2}\dx + i\pi \int_\eps^R {1\over x^2 +a^2}\dx \\ &= I + i\pi\qty{\pi \over 2a} .\] In the limit, by the residue theorem we have \[ {i\pi^2 \over 2a} + {\pi\log(a) \over a} &= 2I + i\pi\qty{\pi \over 2a} \\ \implies I &= {\pi \log(a) \over 2a} .\]
The integral of $\log x/(1+x^a)$ over $[0,\infty)$ (Tag E-HHSCS)
\[ I\da \int_0^\infty {\log(x) \over 1+x^a}\dx &= - \qty{\pi \over a}^2\cos\qty{\pi\over a}\csc^2\qty{\pi \over a} \\ &= - {\pi^2\over a^2} {\cos\qty{\pi\over a} \over \sin^2\qty{\pi\over a}} .\]
Solution
Assume \(a>1\), so that the integral converges. The pole of \(f(z)\da{\log(z)\over1+z^a}\) nearest the positive axis is \(\omega_a \da e^{i\pi\over a}\). Take the sector \(0\le\arg z\le 2\pi/a\) indented at \(0\), which contains only this pole. By the ML estimate, the integrals over its arcs of radius \(R\) and \(\eps\) are \(O\qty{R\log R/R^a}\) and \(O\qty{\eps\abs{\log\eps}}\), so both tend to zero:
Set \(\zeta_a \da e^{2\pi i \over a}\). Contributions from the contours: let \(\gamma_1\) be the contour along \(\RR\) and \(\gamma_2\) along \(\zeta_a \RR\), oriented so the overall contour is counterclockwise. Then \(\int_{\gamma_1}f(z)\dz \to I\) for \(f(z) \da {\log(z) \over 1+z^a}\), so compute the monodromy term: parameterize \(\gamma_2 \da \ts{\zeta_a t \st t\in [\eps, R]}\), so \[ \int_{\gamma_2}f(z) \dz &=\int_R^\eps f(\zeta_a t) \zeta_a \dt \\ &= -\zeta_a \int_\eps^R {\log(\zeta_a t) \over (\zeta_a t)^a + 1}\dt \\ &= -\zeta_a \int_{\eps}^R {\log(t) + {2\pi i \over a} \over t^a+1}\dt \\ &\to -\zeta_a I - \zeta_a {2\pi i \over a} \int_0^\infty {1\over t^a + 1 }\dt \\ &\da -\zeta_a I - {2\pi i\over a}\zeta_a I' .\]
\[ I' = {\pi\over a}\csc\qty{\pi\over a} .\]
Computing the auxiliary integral \(I'\): the integrand has the same pole at \(\omega_a\), so apply the same technique. Write \(g(z) \da {1\over z^a+1}\).
The contributions from the contours: \[ \qty{ \int_{\gamma_1} + \int_{\gamma_2}} g(z) \to (1-\zeta_a)I' = -2i\sin\qty{\pi\over a}e^{i\pi\over a}I' ,\] using \(1-e^{2i\theta}=-2i\sin(\theta)e^{i\theta}\).
Computing the residue: \[ \Res_{z=e^{i\pi\over a}}g(z) &= {1\over az^{a-1}}\evalfrom_{z=e^{i\pi\over a}} = {1\over ae^{i\pi\qty{a-1\over a}}} = {1\over a e^{i\pi} e^{-i\pi\over a}} \\ \implies 2\pi i \Res_{z=e^{i\pi\over a}}g(z) &= -{2\pi i \over a}e^{i \pi \over a} .\]
Combining and solving: \[ I' = { - {2\pi i\over a} e^{i\pi \over a} \over -2i\sin\qty{\pi\over a}e^{i\pi\over a}} = {\pi \over a}\csc\qty{\pi \over a} .\]
Given this, the RHS of the residue theorem limits to \[ (1-\zeta_a) I - {2\pi i\over a}\zeta_a \qty{ {\pi \over a}\csc\qty{\pi\over a} } = (1-\zeta_a) I - {2\pi^2\over a^2}i\zeta_a \csc\qty{\pi\over a} .\]
For the LHS, we compute the residue at \(\omega_a\): \[ \Res_{z=\omega_a} f(z) &= \lim_{z\to \omega_a} {(z-\omega_a) \log(z) \over z^a + 1} \\ &\eqLH \lim_{z\to \omega_k} {\log(z) \over az^{a-1}}\\ &= {\log\qty{e^{i\pi \over a}} \over ae^{i\pi \qty{a-1\over a}} } \\ &= -{i\pi /a \over ae^{- i\pi \over a} } \\ &= -{i\pi \over a^2} e^{i\pi\over a} ,\] so \[ 2\pi i \Res_{z=\omega_a} f(z) = -2\pi i \qty{i\pi\over a^2}e^{i\pi \over a} = {2\pi^2\over a^2}e^{i\pi\over a} .\]
Combining the residue and contour contributions gives: \[ {2\pi^2\over a^2}e^{i\pi\over a} &= (1-\zeta_a) I - {2\pi^2\over a^2}i\zeta_a \csc\qty{\pi\over a} \\ \\ \implies {2\pi^2\over a^2}e^{i\pi\over a} &= (1-e^{2\pi i\over a}) I - {2\pi^2\over a^2}ie^{2\pi i \over a} \csc\qty{\pi\over a} \\ \\ \implies {2\pi^2\over a^2} &= (e^{-{i\pi\over a}}-e^{\pi i\over a}) I - {2\pi^2\over a^2}ie^{\pi i \over a} \csc\qty{\pi\over a} \\ \\ &= -2i\sin\qty{\pi\over a}I - {2\pi^2\over a^2}ie^{\pi i \over a} \csc\qty{\pi\over a} \\ \\ \implies I &= { {2\pi^2\over a^2} + {2\pi^2\over a^2}ie^{\pi i \over a} \csc\qty{\pi\over a} \over -2i\sin\qty{\pi \over a} } \\\\ &= {2\pi^2\over a^2} \qty{ 1 + ie^{\pi i \over a} \csc\qty{\pi\over a} \over -2i\sin\qty{\pi \over a} } \\ \\ &= -{\pi^2\over a^2}\csc\qty{\pi\over a} \cdot (-i)\qty{1 + ie^{i\pi\over a}\csc\qty{\pi\over a}} \\ \\ &= -{\pi^2\over a^2}\csc\qty{\pi\over a} \qty{ -i + \qty{\cos\qty{\pi\over a} +i\sin\qty{\pi\over a}}\csc\qty{\pi\over a}} \\ \\ &= -{\pi^2\over a^2}\csc\qty{\pi\over a} \qty{-i + \cot\qty{\pi\over a} + i } \\ \\ &= -{\pi^2\over a^2}\csc\qty{\pi\over a} \cot\qty{\pi\over a} \\ &= -{\pi^2\over a^2}\cos\qty{\pi\over a} \csc^2\qty{\pi\over a} \\ .\]
The integral of $1/(x\sqrt{x^2-1})$ over $[1,\infty)$ (Tag E-Z66NC)
\[ \int_{1}^{\infty} \frac{d x}{x \sqrt{x^{2}-1}} = {\pi \over 2} .\]
Solution
Branch cuts: powers
For \(-1<a<1\), with the branch \(\arg z\in(0,2\pi)\) on the keyhole contour, the poles \(i\) and \(-i\) have \(z^a = e^{\pi i a/2}\) and \(e^{3\pi i a/2}\). Setting \(\omega \coloneqq e^{\pi i a \over 2}\), \[ \int_{0}^{\infty} \frac{x^{a}}{1+x^{2}} \dx = \frac{2\pi i}{1-e^{2\pi i a}}\left(\frac{\omega}{2i}-\frac{\omega^{3}}{2i}\right)=\pi \frac{\omega-\omega^{3}}{1-\omega^{4}}=\frac{\pi}{\omega+\omega^{-1}}=\frac{\pi}{2 \cos (\pi a / 2)} ,\] which for \(a = 1/3\) is \(\pi/\sqrt 3\).
$x^\alpha/(x+1)^2$ (Tag E-YAMX6)
\[ I \da \int_0^\infty {x^\alpha \over (1+x)^2}\dx, \qquad 0<\alpha<1. \]
Solution
Set \[ f(z)=\frac{z^\alpha}{(1+z)^2}, \] using the branch \(z^\alpha=e^{\alpha\Log z}\) with \(0<\Arg z<2\pi\). Take a positively oriented keyhole contour around the positive real axis.
On the upper bank, \(z^\alpha=x^\alpha\); on the lower bank, \(z^\alpha=e^{2\pi i\alpha}x^\alpha\), and the lower bank is traversed from \(R\) to \(\varepsilon\). Hence the two straight segments contribute \[ \qty{1-e^{2\pi i\alpha}} \int_\varepsilon^R\frac{x^\alpha}{(1+x)^2}\,dx. \]
The small circular contribution is \(O(\varepsilon^{\alpha+1})\), while the large circular contribution is \(O(R^{\alpha-1})\). Both tend to zero because \(0<\alpha<1\).
The only pole inside the contour is the double pole at \(z=-1\). Since \(\Arg(-1)=\pi\) on this branch, \[ \Res_{z=-1}f(z) =\left.\dd{}{z}z^\alpha\right|_{z=-1} =\alpha e^{i\pi(\alpha-1)} =-\alpha e^{i\pi\alpha}. \] Letting \(\varepsilon\to0\) and \(R\to\infty\) and applying the residue theorem gives \[ \qty{1-e^{2\pi i\alpha}}I=-2\pi i\alpha e^{i\pi\alpha}. \] Since \[ 1-e^{2\pi i\alpha}=-2i e^{i\pi\alpha}\sin(\pi\alpha), \] we obtain \[ I=\pi\alpha\csc(\pi\alpha). \]
$\int_0^\infty x^{1/3}/(1+x^2)\,dx$ (Tag E-2HIKG)
\[ I\da \int_0^\infty {x^{1\over 3} \over 1 + x^2} \dx = {\pi \over \sqrt 3}. \]
Solution
Let \[ f(z)=\frac{z^{1/3}}{1+z^2}, \] using the branch \(0<\Arg z<\pi\) on the upper half-plane. Integrate over the upper semicircle of radius \(R\), indented by a semicircle of radius \(\varepsilon\) around the branch point \(0\).
On the large arc, \[ \abs{\int_{C_R}f(z)\,dz} \le \pi R\frac{R^{1/3}}{R^2-1} =O(R^{-2/3})\to0, \] and similarly the small arc is \(O(\varepsilon^{4/3})\to0\).
Along the positive real axis, \(z^{1/3}=x^{1/3}\). Along the negative real axis approached from above, \((-x)^{1/3}=e^{i\pi/3}x^{1/3}\) for \(x>0\). Taking account of the orientation, the two straight pieces therefore tend to \[ \qty{1+e^{i\pi/3}}I. \]
The only enclosed pole is \(z=i\), and on the chosen branch \[ \Res_{z=i}f(z) =\frac{i^{1/3}}{2i} =\frac{e^{i\pi/6}}{2i}. \] Hence the residue theorem gives \[ \qty{1+e^{i\pi/3}}I =2\pi i\frac{e^{i\pi/6}}{2i} =\pi e^{i\pi/6}. \] Since \[ 1+e^{i\pi/3}=2e^{i\pi/6}\cos\qty{\pi\over6} =\sqrt3\,e^{i\pi/6}, \] we obtain \[ I={\pi\over\sqrt3}. \]
Square roots and slits
For \(f(z) = \sqrt{(z-z_1)(z-z_2)\cdots(z-z_n)}\), a branch exists on the complement of slits that prevent closed curves from winding around an odd number of the branch points \(z_k\); for \(n\) odd, \(z=\infty\) is also a branch point.
Continuation once around a branch point multiplies \(\sqrt{\cdot}\) by \(-1\): for \(f(z) = \sqrt z\) and \(\gamma(t) = e^{2\pi i t}\) on \([0,1]\), \(f(\gamma(0)) = \sqrt z\) while \(f(\gamma(1)) = \sqrt{e^{2\pi i}z} = e^{i\pi}\sqrt z = -\sqrt z\).
$\sqrt{x^2-1}$ (Tag E-L3MG4)
\[ I\da \int_{-1}^1 \sqrt{1-x^2} \dx = {\pi \over 2} .\]
Solution: Dogbone and residue at $\infty$
Take a branch cut \([-1, 1]\) and \(\Gamma\) the standard dogbone contour:
Orient \(\Gamma\) positively about infinity, i.e. counterclockwise.
Contribution from \(\gamma_1 \da\ts{t+i\eps \st t\in [-1, 1]}\), the upper horizontal piece: \[ \int_{\gamma_1}f(z)\dz \to \int_{-1}^1 \sqrt{1-t^2} \dt = I .\]
Contribution from \(\gamma_2\da\ts{t-i\eps \st t\in [-1, 1]}\), the lower horizontal piece: note that following \(e^{2\pi i t}z\) to \(t=1\) sends \(\sqrt{z}\) to \(-\sqrt{z}\), so \[ \int_{\gamma_2}f(z)\dz \to \int_{1}^{-1} - \sqrt{1-t^2} \dt = I .\]
Contributions from the circles: use that \(f(z) \da \sqrt{z^2-1}\) is a continuous function and these arcs are compact, so they are uniformly bounded. Thus \(\int f\to 0\) by the ML estimate on these arcs.
The total contribution: \[ \qty{\int_{\gamma_1} + \int_{\gamma_2}} f = 2I .\]
The residue at infinity: \[ \Res_{z=\infty}f(z) &= \Res_{z=0} - {1\over z^2}\sqrt{1 - {1\over z^2}} \\ &= \Res_{z=0} - {1\over z^2}\sqrt{z^2-1 \over z^2} \\ &= \Res_{z=0} - {i\over z^3}\sqrt{1-z^2} \\ &= \Res_{z=0} - {i\over z^3}\sum_{k\geq 0} {1/2\choose k}z^{2k} \\ &= \Res_{z=0} - {i\over z^3} \qty{1 - {1\over 2}z^2 - \bigo(z^3) } \\ &= {i\over 2} ,\] thus \[ 2\pi i \cdot -{i\over 2} = 2I \implies I = {\pi \over 2} .\]
$\int_0^1\frac{dx}{\sqrt{x^2-1}}$ by a dogbone contour (Tag E-EBRU5)
\[ I \da \int_0^1 {1\over \sqrt{x^2-1}}\dx = {i\pi \over 2} .\]
Solution
On \((0,1)\) the radicand is negative, so \(\sqrt{x^2-1}=\pm i\sqrt{1-x^2}\) and the value of \(I\) depends on the branch. The stated value holds for \(\sqrt{x^2-1}=-i\sqrt{1-x^2}\); the other branch gives \(-i\pi/2\). Put \(J\da\int_{-1}^1{dx\over\sqrt{1-x^2}}\).
<1>1. Let \(g(z)\da\sqrt{z-1}\,\sqrt{z+1}\) with principal square roots. Then \(g\) is holomorphic on \(\CC\setminus[-1,1]\), and for \(-1<x<1\) its boundary values are \(g(x+i0)=i\sqrt{1-x^2}\) from above and \(g(x-i0)=-i\sqrt{1-x^2}\) from below.
Each factor is holomorphic off its cut, \((-\infty,1]\) and \((-\infty,-1]\) respectively. On \((-\infty,-1)\) both factors change sign across the real axis, so their product is continuous there and extends holomorphically across it. For \(-1<x<1\), \(\sqrt{x+1}\) is continuous and positive, while \(\sqrt{x-1\pm i0}=\pm i\sqrt{1-x}\).
<1>2. \(\oint_{\abs z=2}{dz\over g(z)}=2\pi i\).
For \(\abs z>1\), \(g(z)=z\sqrt{1-z^{-2}}\) with the principal branch, since both sides are holomorphic there, square to \(z^2-1\), and are asymptotic to \(z\) as \(z\to+\infty\) along the real axis. So \(1/g(z)=z^{-1}\qty{1+\tfrac12z^{-2}+\cdots}\) on \(\abs z>1\), and only the term \(z^{-1}\) contributes to the integral.
<1>3. \(\oint_{\abs z=2}{dz\over g(z)}=2iJ\).
Let \(\Gamma_\eps\) be the dogbone contour around the slit, oriented counterclockwise: the upper edge from \(1\) to \(-1\), the lower edge from \(-1\) to \(1\), and circles of radius \(\eps\) about \(\pm1\).
By Cauchy’s theorem on the region between them, \(\Gamma_\eps\) and \(\abs z=2\) give the same integral. On the circle about \(\pm1\), \(\abs{z^2-1}=\eps\abs{z\pm1}\ge\eps(2-\eps)\ge\eps\) for \(\eps<1\), so that circle contributes at most \(2\pi\eps\cdot\eps^{-1/2}\to0\). By step <1>1 the edges contribute, as \(\eps\to0\), \[ \int_1^{-1}{dx\over i\sqrt{1-x^2}}+\int_{-1}^1{dx\over -i\sqrt{1-x^2}} =\qty{-{1\over i}-{1\over i}}J=2iJ .\]
<1>4. Q.E.D.
Steps <1>2 and <1>3 give \(J=\pi\). The integrand \(1/\sqrt{1-x^2}\) is even, so with \(\sqrt{x^2-1}=-i\sqrt{1-x^2}\), \[ I=\int_0^1{dx\over -i\sqrt{1-x^2}}=i\cdot{J\over2}={i\pi\over2} .\]
$\int_{-1}^1 ((x-a)\sqrt{1-x^2})^{-1}\,dx$ (Tag E-GPCW2)
For \(a\in\RR\) with \(|a|>1\), evaluate \[ I(a)\da \int_{-1}^1 {dx\over (x-a)\sqrt{1-x^2}}. \]
Solution
Put \(x=\cos\theta\). Since \(\sqrt{1-x^2}=\sin\theta\) for \(0<\theta<\pi\), \[ I(a)=\int_0^\pi {d\theta\over \cos\theta-a}. \] Now set \(t=\tan(\theta/2)\), so \[ \cos\theta={1-t^2\over1+t^2}, \qquad d\theta={2\,dt\over1+t^2}. \] Therefore \[ I(a)=2\int_0^\infty {dt\over (1-a)-(1+a)t^2}. \]
If \(a>1\), then \[ I(a)=-2\int_0^\infty {dt\over (a-1)+(a+1)t^2} =-{\pi\over\sqrt{a^2-1}}. \] If \(a<-1\), both coefficients in the denominator are positive and the same calculation gives \[ I(a)={\pi\over\sqrt{a^2-1}}. \] Thus \[ I(a)=-\operatorname{sgn}(a){\pi\over\sqrt{a^2-1}}, \qquad |a|>1. \]
$1/x\sqrt{x^2-1}$ (Tag E-XYEP4)
\[ \int_{1}^{\infty} \frac{d x}{x \sqrt{x^{2}-1}} = {\pi \over 2} .\]
Solution
Write \(f(z) \da (z^2-1)^{-{1\over 2}}/z\). In order for \((z^2-1)^{-{1\over 2}}\) to be well-defined, one needs to introduce a branch cut. Note that \(f\) has a simple pole at \(z=0\) and is holomorphic away from \(z=0\) if \(z^2-1\) is not on the positive real axis, where we’ve chosen the branch cut \(\theta = 0\) for \(\Log(z)\) and define \(z^{1\over 2} = e^{{1\over 2}\Log(z)}\). But \(z^2-1 \in \RR_{\geq 0} \iff z\in [-1, 1]^c\), which is what we’ve cut.
So take the branch cut \((-\infty, 1] \union [1, \infty)\) and use the following indented double-keyhole contour:
Contributions along \(C_8\) and \(C_6\): note that \(\int_{C_8}f \to I\), the desired integral. For reference, note that \(z^2-1 = (z+1)(z-1)\), and we can parameterize \[ C_8 = \ts{t+1+ i\eps \st t\in [\eps, R] } \implies \\ \int_{C_8}f(z)\dz \to \int_0^\infty \inverseof{t} (t+2)^{-{1\over 2}} t^{-{1\over 2}} \dt ,\] where on \(C_8\) we choose a branch of the square root so that \(\arg(z+1) \in [-\pi, \pi)\) and \(\arg(z-1)\in [-\pi, \pi)\). Now consider \(C_6\). Write \(\zeta_0 \da e^{2\pi i}\), then \[ C_6 = \ts{\zeta_0 t + 1 - i\eps \st t\in [\eps, R]} \implies \\ \int_{C_6} f(z)\dz &\to \int_R^{\eps} \inverseof{(\zeta_0 t)}(\zeta_0 t + 2)^{-{1\over 2}}(\zeta_0 t)^{-{1\over 2}}\dt \\ &\to -\zeta_0^{-{3 \over 2}} \int_0^\infty \inverseof{t} (t+2)^{-{1\over 2}} t^{-{1\over 2}}\dt \\ &= I ,\] since \(-\zeta_0^{-{3\over 2}} \da -e^{-3\pi i} = 1\). So in the limit \(\eps\to 0, R\to\infty\), \[ \qty{ \int_{C_8} + \int_{C_6}}f \too 2I .\]
The contribution from \(C_2\): parameterize \[ C_2 = \ts{s + i\eps \st x\in [-R, -1-\eps]} ,\] which implies \[ \int_{C_2}f(z)\dz &= \int_{-\infty}^{-1} {1\over s\sqrt{s^2-1}}\,ds \\ &= - \int_{\infty}^{1} {1\over (-x) \sqrt{(-x)^2-1}}\dx,\qquad x=-s,\, \dx = -\,ds \\ &= \int_\infty^1 {1\over (-x) \sqrt{ (-x)^2 - 1} }\dx \\ &= - \int_\infty^1 {1\over x \sqrt{ x^2 - 1} }\dx \\ &= \int_1^\infty {1\over x \sqrt{ x^2 - 1} }\dx \\ &= I ,\] so the same argument as above shows \[ \qty{ \int_{C_2} + \int_{C_4}}f \too 2I .\]
Computing the residues: the full contour encloses a simple pole at \(z=0\), so \[ 2\pi i \Res_{z=0} f(z) = 2\pi i \lim_{z\to 0} {1\over \sqrt{z^2-1}} = 2\pi \cdot (-i) = 2\pi .\]
So by the residue theorem, \[ 2\pi = 2I + 2I \implies I = {\pi \over 2} .\]
$1/x^2+3x+2$ (Tag E-KZV2Z)
\[ I\da \int_\RR {1\over x^2 + 3x+ 2 }\dx .\]
Solution
Note that \(f(x) = (x+2)(x+1)\), so the singularities on on \(\RR_{< 0}\).Phantom log trick. The function isn’t even, so a semicircular contour won’t work. Attempting to find a ray-like symmetry only yields one option: \[ f(z) = f(e^{i\theta } z) \implies \theta = 2k\pi ,\] which suggests a keyhole. But since there’s no \(\log\) in \(f\), there’s no monodromy, and the contributions cancel out. So introduce a log with a branch cut along \(\theta = 0\), and consider \[ \int f(z) \log(z) .\]
Let \(\gamma_+ = \ts{t + i\eps \st t\geq 0}\) (right-to left) and \(\gamma_0 = \ts{t-i\eps \st t\geq 0}\) (left-to-right). Now use the general fact \[ \int_{\gamma_+}f(z)\log(z) \dz &= \int_\eps^R f(t+i\eps)\log(t+i\eps) \dt \too \int_\RR f(t)\log(t)\dt \\ \int_{\gamma_-}f(z)\log(z) \dz &= \int_R^\eps f(t-i\eps)\log(t-i\eps) \dt \too -\int_\RR f(t)\qty{ \log(t) + 2\pi i} \dt \\ ,\] thus \[ \int_{\gamma_+}f(z)\log(z)\dz + \int_{\gamma_-}f(z)\log(z) &\too \int_0^\infty f(t)\log(t)\dt - \int_0^\infty f(t)(\log(t) + 2\pi i) \dt \\ &= -2\pi i \int_0^\infty f(t) \dt .\]
By the ML estimate, the semicircular piece vanishes. Since \(\lim_{x\to 0}{ x\log(x) \over x^n+c} = 0\) for any \(c>0\) and \(n\geq 1\), the inner indented pieces goes to zero. Parameterize by \(z= \eps e^{it}\) \[ \int_{C_\eps} f(z)\log(z)\dz &\approx \int_{\eps}^{2\pi - \eps} {\log(\eps e^{it}) \over \eps^2 + 3\eps + 2} \eps e^{it}\dt \\ &= \int_{\eps}^{2\pi - \eps} {\log(\eps) + it \over \eps^2 + 3\eps + 2} \eps e^{it}\dt \\ &\approx \int_\eps^{2\pi - \eps} {\eps \log(\eps) + c_1 \over \eps^2 + c_2}\dt \\ &\convergesto{\eps\to 0} 0 ,\] where the displayed approximations omit factors \(e^{it}\) of modulus one. By the residue theorem, \[ 2\pi i \sum_{z_k\in \CC} \Res_{z=z_k} f(z)\log(z) = \int_\Gamma f(z)\log(z)\dz = -2\pi i\int_\RR f(z)\dz .\] There are just two simple poles at \(z_1 = -1, z_2 = -2\), so For \(z_1\): \[ \Res_{z=-1}{\log(z) \over (z+1)(z+2)} = \lim_{z\to -1} {\log(z) \over z+2} = \log(-1) ,\] and for \(z_2\), \[ \Res_{z=-2}{\log(z) \over (z+1)(z+2)} = \lim_{z\to -2} {\log(z) \over z+1} = -\log(-2) .\]
Thus \[ I &= -(\log(-1) - \log(-2)) \\ &= - (\ln(1) + i\pi) + (\ln(2) + i\pi) \\ &= \ln(2) ,\] noting that we’ve chosen a branch of \(\log(z) \da \ln\qty{\abs{z}} + i\Arg(z)\) where \(\Arg(z) \in (0, 2\pi)\).