# Compute $\int_{0}^{\infty}\frac{x \log(x)}{(1+x^2)^2}dx$

Given $$\int_{0}^{\infty}\frac{x \log(x)}{(1+x^2)^2}dx$$

I couldn't evaluate this integral. My only idea here was evaluating this as integration by parts.

\begin{align} \int\frac{x \log(x)}{(1+x^2)^2}dx & = \frac{1}{2} \int\frac{ \log(x)}{(x^2+1)^2}d(x^2+1)\\ & = \frac{1}{2} \frac{ \log(x)}{x^2+1} - \frac{1}{2}\int \left[(x^2+1)\frac{\frac{(x^2+1)^2}{x} - 4x(x^2+1) \log(x)}{(x^2+1)^4} \right ]dx\\ & = \frac{ \log(x)}{2(x^2+1)}-\frac{1}{2}\int \left [ \frac{x^2+1-4x^2 \log(x)}{x(x^2+1)^2} \right ] dx\\ & = \frac{ \log(x)}{2(x^2+1)} - \frac{1}{2}\int \frac{dx}{x(x^2+1)} + 2\int\frac{x \log(x)}{(x^2+1)^2}dx \end{align}

Or this method doesn't work here, or I have done a mistake somewhere. However, I have also tried doing $u = x^2+1$ substitution, but this also didnt gave me any good results.Thank you.

• The integration by parts wouldn't work here, because $\frac{\ln x}{x^2+1}$ diverges to $-\infty$ as $x\to0$. Commented Apr 17, 2015 at 16:21

We have $$\int_1^{\infty} \dfrac{x\log(x)}{(1+x^2)^2}dx = \int_1^0 \dfrac{1/x\log(1/x)}{(1+1/x^2)^2}\dfrac{-dx}{x^2} = \int_1^0 \dfrac{x\log(x)}{(1+x^2)^2} = -\int_0^1 \dfrac{x\log(x)}{(1+x^2)^2}dx$$ Hence, $$\int_0^{\infty} \dfrac{x\log(x)}{(1+x^2)^2}dx = \int_0^1 \dfrac{x\log(x)}{(1+x^2)^2}dx + \int_1^{\infty} \dfrac{x\log(x)}{(1+x^2)^2}dx = 0$$

In case you are interested in $I = \displaystyle \int_0^1 \dfrac{x\log(x)}{(1+x^2)^2}dx$, we have \begin{align} I & = \int_0^1 \dfrac12\dfrac{\log(x^2)}{(1+x^2)^2} d\left(\dfrac{x^2}2\right) \end{align} This gives us \begin{align} 4I & = \int_0^1 \dfrac{\log(t)}{(1+t)^2} dt = \int_0^1 \sum_{k=0}^{\infty} (-1)^k(k+1)t^k\log(t) dt = \sum_{k=0}^{\infty}(-1)^k(k+1) \int_0^1 t^k \log(t)dt\\ & = \sum_{k=0}^{\infty} \dfrac{(-1)^{k+1}(k+1)}{(k+1)^2} = \sum_{k=0}^{\infty} \dfrac{(-1)^{k+1}}{k+1} = -\log(2) \end{align} This gives us $$I = \displaystyle \int_0^1 \dfrac{x\log(x)}{(1+x^2)^2}dx = -\dfrac{\log(2)}4$$

• Truly elegant, Thank you! Commented Apr 17, 2015 at 16:27

Here is a general technique. Let's consider the integral

$$I = \int_{0}^{\infty} \frac{x^{s-1}}{(1+x^2)^2} dx = -\frac{1}{4}\,{\frac { \left( s-2 \right) \pi }{\sin \left( \pi \,s/2 \right) }},$$

which is the Mellin transform of $\frac{1}{(1+x^2)^2}$. Your integral can be evaluate using $I$ as

$$\int_{0}^{\infty} \frac{x\ln x }{(1+x^2)^2} dx = \lim_{s\to 2}\frac{dI}{ds} = 0.$$

• While this provides a method, the answer neither shows why the first integral is equal to the coreesponding equation; nor it explains why the second line holds. Commented Apr 17, 2015 at 16:31
• These are details left for the OP or who is interested in this technique! Thanks for the comment. Commented Apr 17, 2015 at 16:32
• Like the explanation. Short to the point, and leaves something to be thought about. +1 Commented Apr 17, 2015 at 18:15
• @science sounds quite a lot like Mhenni. Commented Apr 18, 2015 at 13:19

You can evaluate using the residue theorem. In this case, by considering the contour integral

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

where $C$ is a keyhole contour about the positive real axis of outer radius $R$ and inner radius $\epsilon$, and letting $R \to \infty$ and $\epsilon \to 0$, we have

$$-i 4 \pi I_1 + 4 \pi^2 I_0 = i 2 \pi \left [\frac{d}{dz} \left (\frac{z \log^2{z}}{(z+i)^2} \right ) \right ]_{z=e^{i \pi/2}} + i 2 \pi \left [\frac{d}{dz} \left (\frac{z \log^2{z}}{(z-i)^2} \right ) \right ]_{z=e^{i 3 \pi/2}} = 2 \pi^2$$

where

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

Now, for similar reasons,

$$-i 2 \pi I_0 = i 2 \pi \left [\frac{d}{dz} \left (\frac{z \log{z}}{(z+i)^2} \right ) \right ]_{z=e^{i \pi/2}} + i 2 \pi \left [\frac{d}{dz} \left (\frac{z \log{z}}{(z-i)^2} \right ) \right ]_{z=e^{i 3 \pi/2}} = -i \pi$$

or $4 \pi^2 I_0 = 2 \pi^2$.

Therefore

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

• @Dr.MV: where does $I_0$ have a log term? The contour integral used in computing $I_0$ does have a log term, as $I_1$ has a $\log^2$ term. I like to evaluate the integral the same way so that we may establish some patterns and reuse the poles. Commented Apr 17, 2015 at 22:08
• I understand ... but that seems a bit, please forgive me for saying, well, archaic, when considering that $I_0$ is elementary to compute directly ... the integrand is virtually a perfect differential. In any case, I gave an "up vote" to this answer only, because this is the method that I was going to use (except for the $I_0$ thing). And as always, I really enjoy reading your solutions, whether they are along the line that I would take or otherwise!! Commented Apr 17, 2015 at 22:21
• @Dr.MV: you have a right to your opinion, but you completely missed the point. I outlined a means of evaluating the integral using the residue theorem. It would have been a waste to evaluate $I_0$ any other way, given that we already had the poles. Besides, there is more than just the ease of a method - there is elegance and exposition. In for a penny, in for a pound. And these ways of evaluating integrals has beauty and elegance missing from other ways. Commented Apr 18, 2015 at 13:18
• I didn't miss your point at all. In fact, as I stated, I always enjoy reading your creative solutions. And it was because of the beauty and elegance that I "up voted" your answer only. Perhaps you misunderstood my comment. Commented Apr 18, 2015 at 13:43