A Residue-Theorem Evaluation of \(\int_0^1 \frac{\ln x}{x^2-x-1}\,\mathrm{d}x\)

A residue theorem evaluation of a superhard real integral.

Let

\[I=\int_0^1 \frac{\ln x}{x^2-x-1}\,\mathrm{d}x.\]

Now define the auxiliary function

\[f(z)=\frac{\mathrm{Ln}^2 z}{z^2-z-1}.\]

Its singular points are

\[z_1=\frac{1-\sqrt{5}}{2}, \quad z_2=\frac{1+\sqrt{5}}{2}.\]

Make a branch cut along the segment from $0$ to $1$ and along the ray $1+yi \ (y \in \mathbb{R}_+)$, which is perpendicular to the real axis. Next, choose a contour that encircles the whole plane in the clockwise direction, as shown below.

Complex contour around the branch cut

With this branch cut, the multivalued function $\mathrm{Ln}z=\ln|z|+i\,\mathrm{arg}\,z \ (\mathrm{arg}\,z \in [0,2\pi))$ becomes a single-valued branch. By the Residue Theorem,

\[\left(\int_{L_1}+\int_{L_2}-\int_{L_3}-\int_{L_4}\right)\frac{\mathrm{Ln}^2 z}{z^2-z-1}\,\mathrm{d}z=2\pi i [\mathrm{Rez}(f,z_1)+\mathrm{Rez}(f,z_1)].\]

The right-hand side above evaluates as

\[\begin{aligned} 2\pi i [\mathrm{Rez}(f,z_1)+\mathrm{Rez}(f,z_1)] &= 2 \pi i \left[\frac{\mathrm{Ln}^2z_1}{z_1-z_2}+\frac{\mathrm{Ln}^2z_2}{z_2-z_1}\right]\\ &= \frac{2 \pi i}{\sqrt{5}}\left[\left(\ln\left|\frac{1+\sqrt{5}}{2}\right|+2i\pi\right)^2-\left(\ln\left|\frac{1-\sqrt{5}}{2}\right|+i\pi\right)^2\right]\\ &= -\frac{12\pi^2}{\sqrt{5}}\ln\frac{1+\sqrt{5}}{2}-\frac{6\pi^3}{\sqrt{5}}i. \end{aligned}\]

To streamline the derivation, define the integral on the real axis as $I_1$ and the integrals on the ray as $I_2$:

\[I_1=\left(\int_{L_1}-\int_{L_4}\right)\frac{\mathrm{Ln}^2 z}{z^2-z-1}\,\mathrm{d}z, \quad I_2=\left(\int_{L_2}-\int_{L_3}\right)\frac{\mathrm{Ln}^2 z}{z^2-z-1}\,\mathrm{d}z\]

We first evaluate $I_1$. Note that on edge $L_4$, $\mathrm{Ln}z$ shifts to $\ln z + 2\pi i$:

\[I_1 = \int_0^1 \frac{\ln^2 x}{x^2-x-1}\,\mathrm{d}x-\int_0^1 \frac{(\ln x+2 \pi i)^2}{x^2-x-1}\,\mathrm{d}x= \int_0^1 \frac{\ln^2 x-(\ln x+2 \pi i)^2}{x^2-x-1}\,\mathrm{d}x= -4\pi i\int_0^1 \frac{\ln x+\pi i}{x^2-x-1}\,\mathrm{d}x.\]

Next, for $z$ on the ray $1+yi \ (y \in \mathbb{R}_+)$, we have $|z|=\sqrt{1+y^2}$, $\mathrm{arg}\,z=\arctan y$ and $\mathrm{d}z=i\mathrm{d}y$. On edge $L_3$, $\mathrm{Ln}z$ is $\ln z + 2\pi i$, so

\[\begin{aligned} I_2 &= \int_0^{+\infty} \frac{(\ln\sqrt{1+y^2}+i\arctan y)^2}{-y^2+iy-1}\,i\mathrm{d}y-\int_0^{+\infty} \frac{(\ln\sqrt{1+y^2}+i\arctan y+2\pi i)^2}{-y^2+iy-1}\,i\mathrm{d}y\\ &= i\int_0^{+\infty} \frac{(\ln\sqrt{1+y^2}+i\arctan y)^2-(\ln\sqrt{1+y^2}+i\arctan y+2\pi i)^2}{-y^2+iy-1}\,\mathrm{d}y\\ &= 4\pi\int_0^{+\infty} \frac{\ln\sqrt{1+y^2}+i\arctan y+\pi i}{-y^2+iy-1}\,\mathrm{d}y\\ &= -4\pi\int_0^{+\infty} \frac{(\ln\sqrt{1+y^2}+i\arctan y+\pi i)(y^2+iy+1)}{y^2+(1+y^2)^2}\,\mathrm{d}y \end{aligned}\]

Taking imaginary parts gives the relationship $\mathrm{Im}\,I_1=-4\pi I$ and

\[\mathrm{Im}\,I_2=-4\pi\int_0^{+\infty} \frac{y\ln\sqrt{1+y^2}+(\arctan y+\pi)(1+y^2)}{y^2+(1+y^2)^2}\,\mathrm{d}y.\]

Let

\[J_1=\int_0^{+\infty} \frac{y\ln\sqrt{1+y^2}}{y^2+(1+y^2)^2}\,\mathrm{d}y, \quad J_2=\int_0^{+\infty} \frac{\pi(1+y^2)}{y^2+(1+y^2)^2}\,\mathrm{d}y, \quad J_3=\int_0^{+\infty} \frac{\arctan y(1+y^2)}{y^2+(1+y^2)^2}\,\mathrm{d}y\]

For $J_1$:

\[\begin{aligned} J_1&=\int_0^{+\infty} \frac{y\ln\sqrt{1+y^2}}{y^2+(1+y^2)^2}\,\mathrm{d}y=\frac{1}{4}\int_0^{+\infty} \frac{\ln(1+t)}{t+(1+t)^2}\,\mathrm{d}t=\frac{1}{4}\int_1^{+\infty} \frac{\ln u}{u^2+u-1}\,\mathrm{d}u\\ &=\frac{1}{4}\int_1^{0} \frac{\ln \frac{1}{v}}{\left(\frac{1}{v}\right)^2+\frac{1}{v}-1}\,\left(-\frac{1}{v^2}\right)\mathrm{d}v=\frac{1}{4}\int_0^1 \frac{\ln v}{v^2-v+1}\,\mathrm{d}v=\frac{1}{4}I \end{aligned}\]

For $J_2$:

\[\begin{aligned} J_2&=\int_0^{+\infty} \frac{\pi(1+y^2)}{y^2+(1+y^2)^2}\,\mathrm{d}y=\pi\int_0^{+\infty} \frac{1+\frac{1}{y^2}}{1+(y+\frac{1}{y})^2}\,\mathrm{d}y=\pi\int_0^{+\infty} \frac{1}{1+(y+\frac{1}{y})^2}\,\mathrm{d}\left(y-\frac{1}{y}\right)\\ &=\pi\int_0^{+\infty} \frac{1}{5+(y-\frac{1}{y})^2}\,\mathrm{d}\left(y-\frac{1}{y}\right)=\frac{\pi}{\sqrt{5}}\int_{-\infty}^{+\infty} \frac{1}{1+u^2}\,\mathrm{d}u=\frac{\pi^2}{\sqrt{5}} \end{aligned}\]

For $J_3$:

\[\begin{aligned} J_3&=\int_0^{+\infty} \frac{\arctan y(1+y^2)}{y^2+(1+y^2)^2}\,\mathrm{d}y=\int_{+\infty}^0 \frac{\arctan\frac{1}{t}(1+\frac{1}{t^2})}{\frac{1}{t^2}+(1+\frac{1}{t^2})^2}\left(-\frac{1}{t^2}\right)\mathrm{d}t=\int_0^{+\infty} \frac{\arctan\frac{1}{t}(1+t^2)}{t^2+(1+t^2)^2}\,\mathrm{d}t\\ &=\int_0^{+\infty} \frac{(\frac{\pi}{2}-\arctan t)(1+t^2)}{t^2+(1+t^2)^2}\,\mathrm{d}t=\frac{J_2}{2}-J_3\\ \Rightarrow J_3 & = \frac{1}{4}J_2=\frac{\pi^2}{4\sqrt{5}} \end{aligned}\]

The overall expression from the imaginary part of the Residue Theorem is

\[\mathrm{Im}I_1+\mathrm{Im}I_2=-4\pi\left(I+J_1+J_2+J_3\right)=-4\pi\left(I+\frac{I}{4}+\frac{\pi^2}{\sqrt{5}}+\frac{\pi^2}{4\sqrt{5}}\right)=-\frac{6\pi^3}{\sqrt{5}}\]

Finally, we get

\[I=\int_0^1 \frac{\ln x}{x^2-x-1}\,\mathrm{d}x=\frac{\pi^2}{5\sqrt{5}}\]