Improper integral of a high power of log

I feel like I’ve developed something new in evaluating this integral. Previously, when confronted with an integral of log to the n times a function, I considered the integral of log to the n+1 times the function over a keyhole contour. This gave me the original integral, but also all of the other integrals of log to the j times the function, for j between 0 and n-1. I would then spend time evaluating all of the other integrals and obtaining the one I wanted.

The following problem made me realize that this is simply not the way to go. Rather, we can express the integral we want in terms of the residues of the poles of the function times a polynomial of logs. We find the coefficients of the polynomial by solving a system of equations we get from applying the residue theorem to the integrals of lower powers of log. The following example makes this clear.

The integral to evaluate is

$$I=\int_{0}^{\infty} dx \dfrac{\ln^3{x}}{(1+x^2)(1+x)^2}$$

To evaluate, consider the integral

$$\oint_C dz \frac{\log^4{z}}{(1+z^2)(1+z)^2}$$

where $C$ is a keyhole contour about the positive real axis, so that $\arg{z} \in [0,2 \pi)$. $C$ has an outer radius of $R$, and an inner radius of $\epsilon$. The magnitude of the integral vanishes along the outer arc as $2 \pi \log^4{R}/R^3$ as $R \to \infty$ and along the inner arc as $\epsilon \log^4{\epsilon}$ as $\epsilon \to 0$. Thus the contour integral is equal to, in these limits

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

which, when expanded, is equal to

$$-i 8 \pi \int_0^{\infty} dx \frac{\log^3{x}}{(1+x^2)(1+x)^2}+ 24 \pi^2 \int_0^{\infty} dx \frac{\log^2{x}}{(1+x^2)(1+x)^2}\\+i 32 \pi^3 \int_0^{\infty} dx \frac{\log{x}}{(1+x^2)(1+x)^2}-16 \pi^4 \int_0^{\infty} dx \frac{1}{(1+x^2)(1+x)^2}$$

The contour integral is equal to $i 2 \pi$ times the sum of the residues at the poles $z_{1,2}=\pm i$ and $z_3=-1$. Note that we would then have to evaluate the integrals with lower powers of log. We may circumvent this by expressing the above equation as a system of equations for the unknown integrals. Let

$$R_j = \sum_{k=1}^3 \operatorname*{Res}_{z=z_k} \frac{\log^j{z}}{(1+z^2)(1+z)^2}$$

$$I_j = \int_0^{\infty} dx \frac{\log^j{x}}{(1+x^2)(1+x)^2}$$

Thus, by considering similar contour integrals in the complex plane, we have the following system of equations:

$$\begin{align}-i 8 \pi I_3+24 \pi^2 I_2+i 32 \pi^3 I_1-16 \pi^4 I_0 &= i 2 \pi R_4\\ -i 6 \pi I_2+12 \pi^2 I_1+i 8 \pi^3 I_0&=i 2 \pi R_3\\-i 4 \pi I_1+4 \pi^2 I_0 &= i 2 \pi R_2\\-i 2 \pi I_0 &= i 2 \pi R_1\end{align} $$

We may now solve this upper-diagonal system for the integrals in terms of the residues; we are only interested in $I_3$. Solving for $I_3$ and reexpressing in terms of the original notation, we find that our integral is

$$\int_0^{\infty} dx \frac{\log^3{x}}{(1+x^2)(1+x)^2} = \sum_{k=1}^3 \operatorname*{Res}_{z=z_k} \left [\frac{-\frac14 \log^4{z}+i \pi \log^3{z}+\pi^2 \log^2{z}}{(1+z^2)(1+z)^2} \right ]$$

Now we must evaluate the residues. At the poles $z_1=e^{i \pi/2}$ and $z_2=e^{i 3 \pi/2}$, the computation is straightforward:

$$\operatorname*{Res}_{z=e^{i \pi/2}} \left [\frac{-\frac14 \log^4{z}+i \pi \log^3{z}+\pi^2 \log^2{z}}{(1+z^2)(1+z)^2} \right ] = \\ \frac{-\frac14 (i \pi/2)^4+i \pi (i \pi/2)^3+\pi^2 (i \pi/2)^2}{2 i (1+i)^2}=\frac{9\pi^4}{256}$$


$$\operatorname*{Res}_{z=e^{i 3\pi/2}} \left [\frac{-\frac14 \log^4{z}+i \pi \log^3{z}+\pi^2 \log^2{z}}{(1+z^2)(1+z)^2} \right ] = \frac{9\pi^4}{256}$$

For the pole at $z=e^{i \pi}$, we must differentiate to evaluate the residue (double pole). Thus,

$$\operatorname*{Res}_{z=e^{i \pi}} \left [\frac{-\frac14 \log^4{z}+i \pi \log^3{z}+\pi^2 \log^2{z}}{(1+z^2)(1+z)^2} \right ] = \left [\frac{d}{dz} \frac{-\frac14 \log^4{z}+i \pi \log^3{z}+\pi^2 \log^2{z}}{1+z^2} \right ]_{z=e^{i \pi}}$$

which calculation I will spare you at this point, except to say that it is straightforward, and has remarkable cancellation of the imaginary part. The result of this calculation informs us that the residue is $-\pi^4/8$.

Finally, putting this all together, we have

$$\int_0^{\infty} dx \frac{\log^3{x}}{(1+x^2)(1+x)^2} = \frac{9 \pi^4}{256} + \frac{9\pi^4}{256}-\frac{\pi^4}{8} = -\frac{7 \pi^4}{128}$$


It should be understood that the expression for the integral in terms of residues is not specific to this particular integral and applies to any integral of the form

$$\int_0^{\infty} dx \, f(x) \, \log^3{x} = \sum_{k=1}^N \operatorname*{Res}_{z=z_k} \left [\left (-\frac14 \log^4{z}+i \pi \log^3{z}+\pi^2 \log^2{z}\right ) f(z) \right ]$$

where $f$ is sufficiently well behaved that the integral exists, and the $z_k$ are the poles of $f$ in the complex plane away from the positive real axis. In fact, the general procedure works for any integer power of log, and it would be interesting to generate a polynomial-type expression in log for arbitrary powers.


Leave a Reply