I am trying to solve the following integral using a contour (large semi-circle connected to smaller semi-circle in the upper-half plane): $$\int_0^{\infty} \frac{\log^4(x)}{1+x^2} dx.$$

I have split the contour into 4 parts - the large semi-circle, the small semi-circle, the part on the negative real axis and the part on the positive real axis.

The integral of the function over the contour is $2\pi i \sum Res(f)$, which is $\pi^5$. The function has poles: $i$ and $-i$, each of order $1$, but $i$ is the only pole contained in the contour.

The integral over the large semi-circle is $0$ as the large radius approaches infinity and the integral over the small semi-circle is $0$ as the small radius approaches $0$.

I take the real part of both sides and the following is left:

$$ \pi^5 = 2\int_0^{\infty} \frac{\log^4(x)}{1+x^2} dx + \int_{-\infty}^0 \frac{-6\pi^2\log^2(x) + \pi^4}{1+x^2} dx $$

My final answer is $5\pi^5/8$, but the correct answer is $5\pi^5/32$.

Any suggestions? Thank you!

  • 1
    $\begingroup$ In you argument how is $\log\, x$ defined for $x<0$? $\endgroup$ Nov 21, 2018 at 4:56
  • $\begingroup$ for $ log(z)$, I have chosen the branch $\frac{-\pi}{2}$ $\leq$ arg(z) $\leq$ $\frac{3\pi}{2}$. $\endgroup$
    – math_b
    Nov 21, 2018 at 13:10
  • $\begingroup$ On the contour, when x $\lt$ 0, it is just the line on the negative real axis (from $- R$ to $- r$), where $R$ is the radius of the larger semi-circle and $r$ is the radius of smaller semi-circle. $\endgroup$
    – math_b
    Nov 21, 2018 at 13:12
  • $\begingroup$ The following MSE link presents a procedure for higher powers of the logarithm. $\endgroup$ Nov 21, 2018 at 13:50

1 Answer 1


Feynman isn't necessarily antangonistic to contour integration. They sometimes work together well.


where $$I(a)=\int^\infty_{0}\frac{x^{a}}{1+x^2}dx$$ with $-1<a<1$.

Take $C$ as a keyhole contour, centered at the origin, avoiding the positive real axis.

Let $f(z)=z^a(1+z^2)^{-1}$ with branch cut on the positive real axis, implying $z^a\equiv \exp(a(\ln|z|+i\arg z))$ where $\arg z\in[0,2\pi)$.

Firstly, by residue theorem, $$\oint_C f(z)dz=2\pi i\bigg(\operatorname*{Res}_{z=i}f(z)+\operatorname*{Res}_{z=-i}f(z)\bigg)$$

We have $$\operatorname*{Res}_{z=i}f(z)=\frac{\exp(a(\ln|i|+i\arg i))}{i+i}=\frac{e^{\pi ia/2}}{2i}$$ $$\operatorname*{Res}_{z=-i}f(z)=\frac{\exp(a(\ln|-i|+i\arg -i))}{-i-i}=-\frac{e^{3\pi ia/2}}{2i}$$

Thus, $$\oint_C f(z)dz=\pi(e^{\pi ia/2}-e^{3\pi ia/2})$$

On the other hand, $$\oint f(z)dz=K_1+K_2+K_3+K_4$$


$$ K_1=\lim_{R\to\infty}\int^{2\pi}_0 f(Re^{it})iRe^{it}dt =\lim_{R\to\infty}2\pi f(Re^{ic})iRe^{ic}=0 \qquad{c\in[0,2\pi]}$$

$$K_2=\lim_{r\to0^+}\int_{2\pi}^0 f(re^{it})ire^{it}dt =\lim_{r\to0^+}2\pi f(re^{ic})ire^{ic}=0 \qquad{c\in[0,2\pi]}$$

$$K_3=\int^\infty_0 f(te^{i0})dt=\int^\infty_0\frac{e^{i0}t^a}{t^2+1}dt=I$$

$$K_4=\int_\infty^0 f(te^{i2\pi})dt=-\int^\infty_0\frac{e^{2\pi ia}t^a}{t^2+1}dt=-e^{2\pi ia}I$$

For $K_1,K_2$, please respectively note the asymptotics $f(z)\sim z^{a}$ for small $|z|$ and $f(z)=O(z^{a-2})$ for large $|z|$.

Therefore, $$I-e^{2\pi ia}I=\pi(e^{\pi ia/2}-e^{3\pi ia/2})$$ $$\implies I=\pi\frac{e^{\pi ia/2}-e^{3\pi ia/2}}{1-e^{2\pi ia}} =\pi\frac{e^{-\pi ia/2}-e^{\pi ia/2}}{e^{-\pi i a}-e^{\pi ia}} =\pi\frac{\sin(\pi a/2)}{\sin(\pi a)} =\frac{\pi}2\sec\left(\frac{\pi a}2\right) $$

Let $T=\tan(\pi a/2)$, $S=\sec(\pi a/2)$. $$I^{(4)}(a)=\frac{\pi}2\frac{\pi^4(T^4+18S^2T^2+5S^4)}{16}$$

Hence, $$J=I^{(4)}(0)=\frac{\pi}2\frac{\pi^4(0+0+5\cdot 1)}{16}=\color{red}{\frac{5\pi^5}{32}}$$ The tedious differentiation is done by calculator. :)


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .