How do you integrate $\int_{0}^\infty \frac{\log(x)^2}{(1-x^2)^2}$ using contour integration

cauchy-principal-valuecomplex-analysiscontour-integrationdefinite integralsimproper-integrals

I have tried using the standard keyhole integral, and looking at $\log^{3}\left(x\right)$, but because the poles lie on the real axis, when I expand the integrand
$$
\frac{\left[\ \log\left(x\right) + 2\pi{\rm i}\,\right]^{3}}
{\left(1 – x^{2}\right)^{2}}
$$

I get integrals which do not converge.
Am I approaching this problem wrong $?$.

When the poles are first order on the real axis, or the poles do not lie on the axis at all, contour integration seems much simpler.

Best Answer

This integral may be evaluated using the residue theorem. That said, the evaluation is very subtle and requires a bit of carrying around diverging quantities that cancel. Also, the contour of integration in this case should have a detour around the removable singularity. We proceed as follows.

Consider the contour integral

$$\oint_C dz \frac{\log^3{z}}{(z^2-1)^2} $$

where $C$ is the following contour:

enter image description here

where the bumps about the removable singularity at $z=1$ are semicircles of radius $\epsilon$ and the outer circle has a radius $R$. We parametrize the contour to evaluate the contour integral; accordingly, the contour integral is equal to

$$\int_{\epsilon}^{1-\epsilon} dx \frac{\log^3{x}}{(1-x^2)^2} + i \epsilon \int_{\pi}^0 d\phi \, e^{i \phi} \frac{\log^3{\left (1+\epsilon e^{i \phi} \right )}}{\left ( \left (1+\epsilon e^{i \phi} \right )^2-1 \right )^2} \\ + \int_{1+\epsilon}^{R} dx \frac{\log^3{x}}{(x^2-1)^2} + i R \int_0^{2 \pi} d\theta \, e^{i \theta} \frac{\log^3{\left ( R e^{i \theta} \right )}}{\left ( R^2 e^{i 2 \theta} \right )}\\ + \int_R^{1+\epsilon} dx \frac{\left (\log{x}+i 2 \pi \right)^3}{(x^2-1)^2}+ i \epsilon \int_{2 \pi}^{\pi} d\phi \, e^{i \phi} \frac{\left (\log{\left (1+\epsilon e^{i \phi} \right )}+i 2 \pi \right )^3}{\left ( \left (1+\epsilon e^{i \phi} \right )^2-1 \right )^2} \\+ \int_{1-\epsilon}^{\epsilon} dx \frac{(\log{x}+i 2 \pi)^3}{(1-x^2)^2} + i \epsilon \int_{2 \pi}^0 d\phi\, e^{i \phi} \frac{\log^3{\left ( \epsilon e^{i \phi} \right )}}{\left ( \epsilon^2 e^{i 2 \phi} \right )}$$

As $R \to \infty$, the fourth integral vanishes. As $\epsilon \to 0$, the second and eighth integrals vanish. In this limit, however, note that the second integrals opposite number, the sixth integral, does not vanish in this limit. Rather, the logs on the branch below the positive real axis have an $i 2 \pi$ added to them. This includes the log attached to the bump below the positive real axis, i.e., the sixth integral. This integral evaluates as follows for small $\epsilon$:

$$i \epsilon \int_{2 \pi}^{\pi} d\phi \, e^{i \phi} \frac{\left (\log{\left (1+\epsilon e^{i \phi} \right )}+i 2 \pi \right )^3}{\left ( \left (1+\epsilon e^{i \phi} \right )^2-1 \right )^2} = -i \frac{4 \pi^3}{\epsilon} + (2 \pi^4 + i 3 \pi^3 ) + O(\epsilon)$$

Note that in the limit as $\epsilon \to 0$, the integral leave us with a diverging term and a constant term. We will need these.

The first, third, fifth, and seventh integrals (those integrals above and below the real axis) combine to form the following:

$$-i 6 \pi \int_0^{\infty} dx \frac{\log^2{x}}{(1-x^2)^2} + 12 \pi^2 PV \int_0^{\infty} dx \frac{\log{x}}{(1-x^2)^2} \\ + i 8 \pi^3 \left [\int_0^{1-\epsilon} \frac{dx}{(1-x^2)^2} + \int_{1+\epsilon}^{\infty} \frac{dx}{(x^2-1)^2} \right ]$$

In the second integral above, the $PV$ denotes a Cauchy principal value of the integral, which has a simple pole in its integrand. For the last pair of integrals, we arrange them as we would a Cauchy principal value while acknowledging that the Cauchy P.V. does not exist because of the double pole at $x=1$. We will evaluate this pair of integrals in the limit as $\epsilon \to 0$ and will produce another singularity.

$$\begin{align} \int_0^{1-\epsilon} \frac{dx}{(1-x^2)^2} &= \int_0^{\arcsin{(1-\epsilon)}} d\theta \, \sec^3{\theta} \\ &= \left [ \frac12 \sec{\theta} \tan{\theta} + \frac12 \log{(\sec{\theta} + \tan{\theta})} \right ]_0^{\arcsin{(1-\epsilon)}} \\ &= \frac12 \frac{1-\epsilon}{\epsilon (2-\epsilon)} + \frac14 \log{\left ( \frac{2-\epsilon}{\epsilon} \right )} \end{align} $$

Similarly, the reader should be able to show that

$$\int_{1+\epsilon}^{\infty} \frac{dx}{(x^2-1)^2} = \frac12 \frac{1+\epsilon}{\epsilon (2+\epsilon)} - \frac14 \log{\left ( \frac{2+\epsilon}{\epsilon} \right )}$$

Adding these two pieces and expanding about $\epsilon = 0$, we get an asymptotic expression for the pair of integrals that is not quite a Cauchy principal value:

$$\int_0^{1-\epsilon} \frac{dx}{(1-x^2)^2} + \int_{1+\epsilon}^{\infty} \frac{dx}{(x^2-1)^2} = \frac1{2 \epsilon} + O(\epsilon) $$

That is, there is no constant term in the above expression; rather, there is only a divergent term and vanishing terms.

Putting this all together, we get an expression for the contour integral as $\epsilon \to 0$ and $R \to \infty$:

$$\oint_C dz \frac{\log^3{z}}{(z^2-1)^2} = -i 6 \pi \int_0^{\infty} dx \frac{\log^2{x}}{(1-x^2)^2} + 12 \pi^2 PV \int_0^{\infty} dx \frac{\log{x}}{(1-x^2)^2} \\ + i \frac{4 \pi^3}{\epsilon} -i \frac{4 \pi^3}{\epsilon} + (2 \pi^4 + i 3 \pi^3 ) + O(\epsilon)$$

The divergent terms cancel and we finally get, for the contour integral,

$$\oint_C dz \frac{\log^3{z}}{(z^2-1)^2} = -i 6 \pi \int_0^{\infty} dx \frac{\log^2{x}}{(1-x^2)^2} + 12 \pi^2 PV \int_0^{\infty} dx \frac{\log{x}}{(1-x^2)^2} + (2 \pi^4 + i 3 \pi^3 )$$

Now, by the residue theorem, the contour integral is also equal to $i 2 \pi$ times the residue at the pole $z=-1=e^{i \pi}$. I will leave the evaluation of this residue to the reader; keep in mind that there is a double pole at $z=e^{i \pi}$. Thus, by the residue theorem,

$$-i 6 \pi \int_0^{\infty} dx \frac{\log^2{x}}{(1-x^2)^2} + 12 \pi^2 PV \int_0^{\infty} dx \frac{\log{x}}{(1-x^2)^2} + (2 \pi^4 + i 3 \pi^3 ) = \frac{\pi^4}{2} + i \frac{3 \pi^3}{2}$$

Equating real and imaginary parts, we finally get the result for the integral we seek, plus a bonus:

$$\int_0^{\infty} dx \frac{\log^2{x}}{(1-x^2)^2} = \frac{\pi^2}{4}$$ $$PV \int_0^{\infty} dx \frac{\log{x}}{(1-x^2)^2} = -\frac{\pi^2}{8}$$

So while this was a bit involved, I hope the reader gets all of the subtleties in evaluating integrals with removable singularities and higher powers of log.