Math · Complex analysis

A one-variable integral

Solve the following one-variable integral (and show it's zero!):

\[ I = \int_0^{\infty} \frac{\ln x}{(x+1)^2}\,dx \]
Show my solutionHide my solution

We will make use of the beautiful tools of complex analysis. The integrand is many-valued due to the logarithm, the origin being a branch point. We will define the positive real axis as a branch cut, which defines our complex plane as one of the infinitely many possible Riemann sheets of our complex integrand.

First, let's define the following contour:

 

The second step is to define \(\ln z = \ln x\) just above the cut, and \(\ln z = \ln x + 2\pi i\) just below the cut. The discontinuity is due to the branch cut.

Third, and this is the tricky part, calculate an ancillary integral:

\[ \tilde I = \oint_{\mathcal C} \frac{(\ln z)^2}{(z+1)^2}\,dz = I_1 + I_2 + I_3 + I_4 \]

where the four pieces of \(\mathcal C\) are

\[ \begin{aligned} I_1 &= \int_{\varepsilon}^{R} \frac{(\ln x)^2}{(x+1)^2}\,dx \\ I_2 &= \int_{\circlearrowleft_R} \frac{(\ln z)^2}{(z+1)^2}\,dz \\ I_3 &= \int_{R}^{\varepsilon} \frac{(\ln x + 2\pi i)^2}{(x+1)^2}\,dx \\ I_4 &= \int_{\circlearrowright_\varepsilon} \frac{(\ln z)^2}{(z+1)^2}\,dz \end{aligned} \]

According to the residue theorem,

\[ \tilde I = 2\pi i \sum_i \operatorname{Res}\big(f(z),\, z = p_i\big) \]

where \(p_i\) are the poles of \(f(z)\) (the integrand of \(\tilde I\)) enclosed by \(\mathcal C\). The only pole to consider is the double pole at \(z = -1\), where \(\ln(-1) = \pi i\) on our sheet, so

\[ \tilde I = 2\pi i \cdot \left.\frac{2\ln z}{z}\right|_{z=-1} = 2\pi i \cdot \frac{2\pi i}{-1} = 4\pi^2 \]

First, let's justify that \(I_2\) and \(I_4\) tend to zero as \(R\) and \(\varepsilon\) tend to \(\infty\) and \(0\) respectively. To calculate \(I_2\), let's parameterize the curve \(\circlearrowleft_R\) in terms of the angle \(\theta\):

\[ I_2 = \int_0^{2\pi} \frac{(\ln R + i\theta)^2}{(Re^{i\theta}+1)^2}\, iRe^{i\theta}\,d\theta \]

Since \(|\ln R + i\theta|^2 = (\ln R)^2 + \theta^2\) and \(|Re^{i\theta} + 1| \ge R - 1\),

\[ |I_2| \le \int_0^{2\pi} \frac{\big((\ln R)^2 + \theta^2\big)\,R}{(R-1)^2}\,d\theta \;\xrightarrow[R\to\infty]{}\; 0 \]

So \(I_2 \to 0\). Similarly, to calculate \(I_4\), we parameterize the curve \(\circlearrowright_\varepsilon\) in terms of the angle \(\theta\):

\[ I_4 = \int_{2\pi}^{0} \frac{(\ln\varepsilon + i\theta)^2}{(\varepsilon e^{i\theta}+1)^2}\, i\varepsilon e^{i\theta}\,d\theta \]

and since \(|\varepsilon e^{i\theta} + 1| \ge 1 - \varepsilon\) and \(\varepsilon(\ln\varepsilon)^2 \to 0\),

\[ |I_4| \le \int_0^{2\pi} \frac{\big((\ln\varepsilon)^2 + \theta^2\big)\,\varepsilon}{(1-\varepsilon)^2}\,d\theta \;\xrightarrow[\varepsilon\to 0]{}\; 0 \]

So \(I_4 \to 0\). Concluding, as \(R \to \infty\) and \(\varepsilon \to 0\), we see that

\[ \tilde I = 4\pi^2 = I_1 + I_3 \]

Expanding the integrand in \(I_3\), the first term cancels \(I_1\), so we obtain

\[ 4\pi^2 = -4\pi i \underbrace{\int_0^{\infty} \frac{\ln x}{(x+1)^2}\,dx}_{I} \;+\; 4\pi^2 \underbrace{\int_0^{\infty} \frac{dx}{(x+1)^2}}_{1} \] \[ \Rightarrow\quad 4\pi^2 = -4\pi i\, I + 4\pi^2 \quad\Rightarrow\quad \boxed{I = 0} \]

Here is what that zero looks like: the negative area between 0 and 1 is cancelled exactly by the long positive tail beyond 1. Each one is \(\ln 2\).

 
The running total dips to \(-\ln 2\) at \(x = 1\); the tail pays it back only as \(x \to \infty\).

I solved this integral during my Mathematical Methods of Physics class (it is proposed in the textbook by Mathews & Walker). My solution seems tricky (I couldn't think of any other), but it is useful to obtain the beautiful result.