Notes - Complex Analysis MT23, Integration and residue calculation
The hope here is that going over these a few times will help remember some of the techniques used to solve integrals in general – the idea is not to memorise the derivations.
Flashcards
Quickly calculate the integral
\[\int^\infty_0 \frac{\ln^2 x}{1 + x^2} \text dx\]
General steps:
- Think of a contour
- Define a holomorphic branch of $\ln z$ there
- Use the residue theorem to get an overall answer
- Consider each integral from the arc seperately
- Equate these two answers
Think of a contour: We have a singularity at $0$ from $\ln z$, and also have issues since $\ln z$ has multiple holomorphic branches. The contour of choice is a semicircle with a small bump in the origin (why not a keyhole contour)?
\[\Gamma = \Gamma_2 \star C_\varepsilon^- \star \Gamma_3 \star C_R\]where
- $\Gamma$ is the overall contour
- $\Gamma _ 2$ is the line from $-R$ to $-\varepsilon$
- $C _ \varepsilon^-$ is the clockwise bump over origin
- $\Gamma _ 3$ is the line from $\epsilon$ to $R$
- $C _ R$ is the anticlockwise semicircle over origin
Define a holomorphic branch of $\ln z$ there: We can take
\[\ln z := \ln |z| + i\arg z\]where
\[\arg z \in \left(-\frac \pi 2, \frac{3\pi}{2}\right)\](so we miss out the negative imaginary axis).
Use the residue theorem to get overall answer:
\[f(z) = \frac{(\ln z)^2}{1 + z^2}\]has a simple pole at $i$, with residue
\[\begin{aligned} \text{Res}(f; i) &= \frac{(\ln z)^2}{(1 + z^2)'} \Bigg|_{z = i} \\\\ \text{Res}(f; i) &= \frac{(\ln z)^2}{2z} \Bigg|_{z = i} \\\\ &= \frac{(\ln i)^2}{2i} \\\\ &= \frac{1}{2i} \left(\frac \pi 2 i\right)^2 \\\\ &= - \frac 1 {2\pi i} \frac{\pi^3}{4} \end{aligned}\]Then by the Residue theorem
\[\int_ \Gamma f(z) \text dz = 2\pi i \cdot \text{Res}(f; i) = -\frac{\pi^3}{4}\]Consider each integral from the arc seperately: But we also have
\[\begin{aligned} \int_ \Gamma f(z) \text dz &= \int_ {\Gamma_2} f(z) \text dz + \int_ {\Gamma_3} f(z) \text dz + \int_ {C_R} f(z) \text dz + \int_ {C^-_ \varepsilon} f(z) \text dz \\\\ &= \int^{-\varepsilon}_ {-R} \frac{(\ln x)^2}{1 + x^2} \text dx + \int^{R}_ {\varepsilon} \frac{(\ln x)^2}{1 + x^2} \text dx + \int_ {C_R} f(z) \text dz + \int_ {C^-_ \varepsilon} f(z) \text dz \\\\ &= \int^{-\varepsilon}_ {-R} \frac{(\ln |x| + i\pi)^2}{1 + x^2} \text dx + \int^{R}_ {\varepsilon} \frac{(\ln x)^2}{1 + x^2} \text dx + \int_ {C_R} f(z) \text dz + \int_ {C^-_ \varepsilon} f(z) \text dz \\\\ &= \int^{-\varepsilon}_ {-R} \frac{(\ln |x|)^2 + 2\pi i \ln|x| - \pi^2}{1 + x^2} \text dx + \int^{R}_ {\varepsilon} \frac{(\ln x)^2}{1 + x^2} \text dx + \int_ {C_R} f(z) \text dz + \int_ {C^-_ \varepsilon} f(z) \text dz \\\\ &= 2\pi i \int^R_ \varepsilon \frac{\ln x}{1 + x^2} \text dx - \pi^2 \int^R_ \varepsilon \frac{1}{1 + x^2} \text dx + 2 \int^R_ {\varepsilon} \frac{(\ln x)^2}{1 + x^2} \text dx + \int_ {C_R} f(z) \text dz + \int_ {C^-_ \varepsilon} f(z) \text dz \end{aligned}\]but also
\[\begin{aligned} \left|\int_{C_R} f(z) \text dz\right| = \pi \sup_{z \in C_R} |f(z)| \to 0 \end{aligned}\]as $R \to \infty$ and
\[\begin{aligned} \left|\int_{C^-_\varepsilon} f(z) \text dz\right| &= \pi \sup_{z \in C_\varepsilon} |f(z)| \\\\ &= \pi \frac{\sqrt \varepsilon \ln z + \pi \sqrt \varepsilon}{1 - \varepsilon^2} \\\\ & \to 0 \end{aligned}\]as $\varepsilon \to 0$. Then by comparing real and imaginary parts
\[-\pi^2 \int^\infty_0 \frac{1}{1 + x^2} \text dx + 2\int^\infty_0 \frac{(\ln x)^2}{1 + x^2} \text dx = -\frac{\pi^3}{4}\]Equate these two answers: Then
\[\begin{aligned} 2 \int^\infty_0 \frac{(\ln x)^2}{1 + x^2} \text dx &= \pi^2 \int^\infty_0 \frac{1}{1+x^2} \text dx - \frac{\pi^3}{4} \\\\ &= \pi^2\frac{\pi}{2} - \frac{\pi^3}{4} \\\\ &= \frac{\pi^3}{4} \end{aligned}\]So
\[\int^\infty_0 \frac{(\ln x)^2}{1+x^2} \text dx = \frac{\pi^3}{8}\]What is
\[\int^\infty_0 \frac{1}{1+x^2} \text dx\]
and why?
This comes from considering the derivative of $\arctan$.
Suppose we wish to evaluate an integral of the form
\[\int^\infty_{-\infty} f(x) \text d x\]
This can often be done by considering
\[\int_\gamma f(z) \text d z\]
for some closed contour $\gamma$ and using the residue theorem. What contour is often used to do this, and why?
An expanding semicircular integral along the real axis and upper half-plane, since the contribution from the upper half-plane often tends to $0$.
Why is trying to calculate
\[\int^\infty_{-\infty} \frac{\cos x}{x^2 + 1} \text d x\]
by considering
\[\int_C \frac 1 2 \frac{e^{iz} + e^{-iz}\\,}{z^2 + 1} \text d z\]
on an expanding semicircular contour a bad idea, and what approach should you use instead?
The $e^{-iz}$ term blows up on the upper half-plane, so it’s better to consider the real part of just
\[\int_C \frac 1 2 \frac{e^{iz}\\,}{z^2 + 1} \text d z\]Suppose we are trying to calculate
\[\int^\infty_{-\infty} \frac{\sin x}{x} \text d x\]
via a semicircular contour placed at the real axis. This doesn’t quite work since the integrand is not defined at $x = 0$. What’s the solution?
Use a contour with a small circular bump around the singularity.
There’s a trick that lets you use the residue theorem to evaluate interesting infinte sums, which involves a trigonometric function and a sequence of contours. What are these, and how does this trick work in the case of $\sum^\infty _ {k=1} \frac{1}{k^2}$?
The function
\[f(z) = \cot(\pi z)\]and the contours:
\[\gamma_N = \text{square with vertices } (N+1/2) \times {(\pm 1} {\pm i})\]This function has simple poles at each integer of residue $\frac 1 \pi$ and is bounded on each of these contours. The trick is then that
\[\int_{\gamma_N} \frac{\cot(\pi z)}{z^2} \text d z \to 0\]But also, by the residue theorem,
\[\int_{\gamma_N} \frac{\cot (\pi z)}{z^2} \text d z = -\frac{\pi}{3} + \sum_{n \ne 0, -N \le n \le N} \frac{1}{\pi n^2}\]Justify, via the $\frac 1 z (1 - zh(z))^{-1}$ trick and the fact that
\[\begin{aligned}
\sin(z) &= z - \frac{z^3}{3!} + \frac{z^5}{5!} + O(z^7) \\\\
\cos(z) &= 1 - \frac{z^2}{2!} + O(z^4)
\end{aligned}\]
that $\cot(z)$ has Laurent series
\[\cot(z) = \frac 1 z - \frac z 3 + O(z^3)\]
Note that
\[\begin{aligned} \frac{1}{\sin(z)} &= \frac 1 z \frac{1}{1 - z\left(\frac{z}{3!} - \frac{z^5}{5!} + O(z^5)\right)} \\\\ &= \frac 1 z \left( 1 + \sum_{n \ge 1} z^n h(z)^n \right) \\\\ &= \frac 1 z + h(z) + O(z^2) \end{aligned}\]So, multiplying by the the Taylor series for $\cos(z)$,
\[\cot(z) = \left(\frac 1 z + \frac{z}{3!} - \frac{z^3}{5!} + O(z^5)\right) \cdot \left( 1 - \frac{z^2}{2} + O(z^4) \right) = \frac 1 z - \frac z 3 + O(z^3)\]What contour would you use when evaluating an integral like
\[\int^\infty_{0} \frac{\sqrt x}{1 + x^2} \text dx\]
where the $\sqrt x$ is multivalued when considered as a complex function?
A keyhole contour.
Say you’re evaluating the integral
\[\int^\infty_0 \frac{\sqrt x \log x}{(1+x)^2} \text d x\]
with a keyhole contour $\Gamma _ {R, \epsilon}$ which doesn’t include the positive reals. Once you’ve shown that $f(z)$ tends to $0$ both on the big circle and the small circle, you might be tempted to conclude that
\[\int^\infty_0 \frac{\sqrt x \log x}{(1+x)^2} \text d x = \frac 1 2 \lim_{R\to \infty, \epsilon \to 0} \int_{\Gamma_{R, \epsilon}\\,} f(z) \text d z\]
Why is this wrong?
It’s not automatic that the integral along the “slit” both equal the real integral, you need to consider that in the branch you’re using, the bottom integral will actually be over values $x e^{2\pi i}$ and might be in the opposite direction.
Quickly justify that the residue of
\[f(z) = \frac{\cot z \coth z}{z^3}\]
at $z = 0$ is $-7/45$.
so the coefficient of $-7/45$.
Given that the residue of
\[z \mapsto \frac{\cot z \coth z}{z^3}\]
at $z = 0$ is $-7/45$, and by assuming that $\cot z \coth z$ is uniformly bounded the square contours with vertices $(\pm N \pm 1/2) \cdot (1 + i)$, quickly prove that
\[\sum^\infty_{n = 1} \frac{\coth n\pi}{n^3} = \frac{7\pi^3}{180}\]
Consider
\[f(z) = \frac{\pi \cot \pi z \coth \pi z}{z^3}\]Since $\coth(iz) = -i\cot(z)$, and by the results in the question, we have the poles:
- $z = 0$ of order $5$
- $z = \pm n$ of order 1
- $z = \pm ni$ of order 1
The residue at $z = 0$ is
\[-\frac{7}{45} \pi^3\]The residue at $z = \pm n$ is
\[\lim_{z \to n} \left(\frac{z-n}{\sin \pi z} \cdot \frac{\pi \cos \pi z \coth \pi z}{z^3}\right) = \frac{\coth n\pi}{n^3}\]and the residue at $z = \pm ni$ is
\[\lim_{z \to ni} \left(\frac{z-n}{\sinh \pi z} \cdot \frac{\pi \cot \pi z \cosh \pi z}{z^3}\right) = \frac{\coth n\pi}{n^3}\]Hence
\[\frac{1}{2\pi i} \int_{c_N} f(z) \text dz = -\frac{7\pi^3}{45} + 4 \sum^N_{n=1} \frac{\coth n\pi}{n^3}\]Since
\[\int_{c_N} f(z) \to 0\]as $N \to \infty$, we see
\[\sum^\infty_{n = 1} \frac{\coth n\pi}{n^3} = \frac{7\pi^3}{180}\]Find the residue and principal parts of
\[f(z) = \frac 1 {z^2 \sinh (z)^3}\]
Do this two different ways:
- Using the $\frac 1 {z(1-zh(z))}$ trick
- Using the binomial theorem for an arbitrary exponent
Other proof:
Quickly calculate the integral
\[\int^\infty_0 \frac{x^t}{1 + x^2} \text dx\]
for each $t \in (-1, 1)$.
General steps:
- Think of a contour
- Define a holomorphic branch of $\text{Log}$ on this contour (to give a holomorphic branch of $z^t$)
- Use residue theorem to calculate the integral on this contour
- Consider each path making up the contour seperately to find an expression for the original integral
- Equate and rearrange to get the result
Think of a contour: The natural choice of a contour here is a keyhole contour which misses out the positive real axis, since this is what the integral is over. Consider the integral
\[\int_\Gamma f(z) \text dz = \int_\Gamma \frac{z^t}{1 + z^2} \text dz\]where $\Gamma$ is the following contour:
where $\rho$ is almost a circle of radius $R$, $\gamma _ \varepsilon$ is almost a circle of radius $\varepsilon$, and $\gamma _ \pm$ lie just above and below the axis. It’s possible to define these explicitly, but this isn’t actually necessary.
Define a holomorphic branch of $\text{Log}$ on this contour: Let $\text{Log} : \mathbb C\setminus[0, \infty) \to \mathbb C$ be defined by
\[\text{Log}(z) := \log |z| + i\arg (z)\]where $\arg(z) \in (0, 2\pi)$. This induces the definition of $z^t$ as $z^t = \exp(t \text{Log}(z))$.
Use residue theorem to calculate the integral on this contour: To use the residue theorem, we need to know the residues of the singularities inside the contour. $f(z)$ has simple poles at $\pm i$ with residues
\[\begin{aligned} \frac{z^t}{2z} \Bigg|_{z = i} &= \frac{1}{2i} \exp(i\pi t / 2) \\\\ \frac{z^t}{2z} \Bigg|_{z = -i} &= -\frac{1}{2i} \exp(3 i\pi t / 2) \\\\ \end{aligned}\]So
\[\int_\gamma f(z) \text dz = 2\pi i\left(\frac{1}{2i} \exp(i\pi t / 2) -\frac{1}{2i} \exp(3 i\pi t / 2)\right)\]Consider each path making up the contour seperately to find an expression for the original integral: Since the integral above and below the positive real axis is the bit we are interested in, we hope that the integral on $\rho$ and $\gamma _ \varepsilon$ tends to zero. This is indeed the case.
On $\rho$, $ \vert f(z) \vert \le R^t / (R^2 - 1)$, so by the estimation theorem
\[\left| \int_\rho f(z) \text dz \right| \le 2\pi R \frac{R^t}{R^2 - 1} \to 0\]as $R \to \infty$, since $t \in (-1, 1)$.
On $\gamma _ \varepsilon$ for small $\varepsilon$, $ \vert f(z) \vert \le 2\varepsilon^t$. Then
\[\left| \int_{\gamma_\varepsilon} f(z) \text dz \right| = 2\pi \varepsilon \cdot 2\varepsilon^t = 4\pi \varepsilon^{1 + t} \to 0\]as $\varepsilon \to 0$.
Then we need to consider the paths just above and below the positive real axis:
\[\begin{aligned} \int_{\gamma_+} f(z) \text dz + \int_{\gamma_-} f(z) \text dz &= \int_{\gamma_+} \frac{\exp(t \text{Log}(z))}{1 + z^2} \text dz + \int_{\gamma_-} \frac{\exp(t \text{Log}(z))}{1 + z^2} \text dz \\\\ &= \int_{\gamma_+} \frac{\exp(t \text{Log}(z))}{1 + z^2} \text dz - \int_{\gamma_+} \frac{\exp(2\pi i t)\exp(t \text{Log}(z))}{1 + z^2} \text dz &&(1\star) \\\\ &= (1 - e^{2\pi i t}) \int^R_\varepsilon f(x) \text dx \end{aligned}\]I can’t fully explain $(1\star)$: it is clear that both paths tend to the same thing, and that we can an extra factor of $2\pi i$ in the logarithm since we are on the opposite side of the cut, but haven’t seen a rigourous justification for this.
Equate and rearrange to get the result: Taking $\varepsilon \to 0$ and $R \to \infty$, we obtain
\[(1 - e^{2\pi i t}) \int^\infty_0 f(x) \text dx = \pi (e^{i \pi t/2} - e^{3i\pi t / 2})\]so
\[\begin{aligned} \int_{0}^{\infty} f(x) \, dx &= \frac{\pi \left( e^{i \pi t / 2} - e^{3i \pi t / 2} \right)}{1 - e^{2 \pi i t} } \\\\ &= \pi e^{i \pi t / 2} \frac{1 - e^{i \pi t} }{1 - e^{2 \pi i t} } \\\\ &= \pi e^{i \pi t / 2} \frac{1 - e^{\pi i t}}{(1 + e^{\pi i t})(1 - e^{\pi i t}) } \\\\ &= \pi e^{i \pi t / 2} \frac{1}{1 + e^{\pi i t} } \\\\ &= \frac{\pi}{e^{-\pi i t / 2} + e^{\pi i t / 2} } \\\\ &= \frac{\pi}{2 \cos (\pi t / 2)} \end{aligned}\]is the result.