# Evaluating $\int ^\infty _{0} \frac{x\ln x}{(1+x^2)^2} \,dx$

My first instinct was to evaluate the indefinite form of the integral, which I did by substituting $$x=\tan t$$, therefore yielding

\begin{align} \int \frac{x\ln x}{(1+x^2)^2} \,dx &= \int \frac{\tan t \sec^2 t \ln\tan t}{(1+\tan^2 t)^2} \,dt && \text{by substitution} \\ &= \int \tan t \cos^2 t \ln \tan t \,dt \\ &= \int \sin t \cos t \ln \tan t \,dt \\ &= -\frac{1}{2} \cos^2 t \ln \tan t + \frac{1}{2} \int \cot t \, dt && \text{by parts} \\ &= -\frac{1}{2} \cos^2 t \ln \tan t +\frac{1}{2} \ln \sin t + k \end{align}

I run into a wall when I introduce the limits of the integral, since I get

\begin{align} \int ^\infty _{0} \frac{x\ln x}{(1+x^2)^2} \,dx &= \bigg[ -\frac{1}{2} \cos^2 t \ln \tan t +\frac{1}{2} \ln \sin t \bigg] ^\frac{\pi}{2} _0 \end{align}

I'm not too sure how to evaluate the limit of the final equation as $$t \rightarrow 0$$. I feel like the solution is something very trivial, but I can't quite put my finger on what I'm forgetting.

• @AliShather Sorry, but could you elaborate on how I should be doing that? Aug 2, 2019 at 9:21

\begin{align} I&=\int_0^\infty\frac{x\ln x}{(1+x^2)^2}\ dx\overset{\large x\ \mapsto\frac1x}{=}-I\\ 2I&=0\\ I&=0 \end{align}

Set $$\dfrac1x=y$$

$$\int ^\infty _{0} \frac{x\ln x}{(1+x^2)^2} \,dx=I=\int_\infty^0\dfrac{y^4\ln(y^{-1})}{y(1+y^2)^2}\left(\dfrac{dy}{-y^2}\right)=-\int_0^\infty\dfrac{y\ln y}{(1+y^2)^2}\ dy =-I$$

Another way:

Integrate by parts

$$\int\ln x\cdot\dfrac x{(1+x^2)^2}\ dx=\ln x\int\dfrac x{(1+x^2)^2}\ dx-\int\left(\dfrac{d(\ln x)}{dx}\int\dfrac x{(1+x^2)^2}\ dx\right)dx$$

$$=-\dfrac{\ln x}{2(1+x^2)}+\int\dfrac{dx}{2x(1+x^2)}$$

Again $$\int\dfrac{dx}{x(1+x^2)}=\int\dfrac{(x^2+1-x^2)\ dx}{x(1+x^2)}=\int\dfrac{dx}x-\int\dfrac{x\ dx}{1+x^2}=\dfrac12\ln\dfrac{x^2}{1+x^2}$$

• This is incredible, thanks, but I'm also curious as to how I should be evaluating the limits at the end. Aug 2, 2019 at 9:20

Using $$x\mapsto\frac1x$$ for $$x>1$$,$$\int_{0}^{\infty}\frac{x^{a}\ln^{b}x}{\left(1+x^{2}\right)^{c}}dx=\int_{0}^{1}\left(\frac{x^{a}\ln^{b}x}{\left(1+x^{2}\right)^{c}}+\left(-1\right)^{b}\frac{x^{2c-a-2}\ln^{b}x}{\left(1+x^{2}\right)^{c}}\right)dx$$vanishes provided $$b$$ is odd with $$c=a+1$$, as in your problem viz. $$a=b=1,\,c=2$$.

Different approach:

\begin{align} I&=\int_0^\infty\frac{x\ln x}{(1+x^2)^2}\ dx\overset{x^2=y}{=}\frac14\int_0^\infty\frac{\ln y}{(1+y)^2}\ dy\overset{1+y=z}{=}\frac14\int_1^\infty\frac{\ln(z-1)}{z^2}\ dz\\ &\overset{\large z\ \mapsto\ \frac{1}{z}}{=}\frac14\int_0^1\ln\left(\frac{1-z}{z}\right)\ dz=\frac14\underbrace{\int_0^1\ln(1-z)\ dz}_{\large1-z\ \mapsto\ z}-\frac14\int_0^1\ln z\ dz\\ &=\frac14\int_0^1\ln z\ dz-\frac14\int_0^1\ln z\ dz=0 \end{align}

Others have already provided elegant and short solutions, but I thought that maybe that the user fysh would be interested in another proof showing a more general way of computing this type of integral. First, consider the following integral: $$I(\alpha)\equiv\int_0^\infty \frac{x^\alpha}{(1+x^2)^2}\,dx.$$ We can notice that your integral, $$I$$, is just $$I=I'(1)$$ First, substitute $$z=x^2$$, leading to $$I(\alpha)=\frac{1}{2}\int_0^\infty\frac{z^{\alpha/2-1/2}}{(1+z)^2}\,dz.$$ Using a representation of the Beta function as well as its relationship to the Gamma function, we find that $$I(\alpha)=\frac{1}{2}B(\alpha/2+1/2, -\alpha/2+3/2)=\frac{1}{2}\Gamma(\alpha/2+1/2)\Gamma(3/2-\alpha/2)$$ At this point, we would like to use the reflection formula $$\Gamma(z)\Gamma(1-z)=\frac{\pi}{\sin(\pi z)},$$ but are unable to with the present product. However, if we use the recursive property of the Gamma function, $$x\Gamma(x)=\Gamma(1+x)$$, or $$\Gamma(x)=(x-1)\Gamma(x-1)$$, we can turn our expression into

\begin{align} \frac{1}{2}\Gamma(\alpha/2+1/2)\Gamma(3/2-\alpha/2)&=\frac{1}{2}\Gamma(\alpha/2+1/2)\Gamma(1/2-\alpha/2)(1/2-\alpha/2) \\ &=\left(\frac{1-\alpha}{4}\right)\Gamma(\alpha/2+1/2)\Gamma(1-(\alpha/2+1/2)) \\ &=\left(\frac{1-\alpha}{4}\right)\frac{\pi}{\sin(\pi\alpha/2+\pi/2)} \\ &=\left(\frac{1-\alpha}{4}\right)\frac{\pi}{\cos(\pi\alpha/2)} \end{align} Differentiating this last expression yields $$I'(\alpha)=\frac{\pi}{4}\left[\frac{(1-\alpha)\sin(\pi\alpha/2)\pi/2-\cos(\pi\alpha/2)}{\cos^2(\pi\alpha/2)}\right]$$ After applying l'Hopital's rule in trying to take the $$\alpha\to 1$$ limit, the following limit is reached: $$\lim_{\alpha\to 1}I'(\alpha)=-\frac{\pi}{8}\lim_{\alpha \to 1}\frac{(1-\alpha)\cos(\pi\alpha/2)}{\sin(\pi\alpha/2)\cos(\pi\alpha/2)}=0$$ Thus, \begin{align} \int_0^\infty \frac{x\log(x)}{(1+x^2)^2}\,dx=0 \end{align}

Notice that this approach can be used to calculate any integral of the form

$$\int_0^\infty \frac{x^\alpha\log^m(x)}{(\beta^\gamma + x^\chi)^\mu}\,dx$$ with $$\text{Re}\,\alpha>-1$$, $$\text{Re}\,\chi, \text{Re}\,\mu>0$$, $$\text{Re}\left(\chi\mu - \alpha\right)>1$$, $$m\in\mathbb{N}$$ and $$\beta, \gamma\in\mathbb{C}$$.

First consider substitution $$t = 1 + x^2$$ which gives $$dt = 2x\,dx$$ and thus

$$I:=\int_0^\infty\frac{x\ln x}{(1+x^2)^2}\,dx = \int_1^\infty \frac{\ln(t-1)^{1/2}}{t^2}\frac 12\,dt = \frac 14\int_1^\infty\frac{\ln(t-1)}{t^2}\, dt.$$

Now, notice that we can convert the last integrand to some rational function by partial integration, since derivative of $$\ln(t-1)$$ is $$\frac 1{t-1}$$, and antiderivative of $$\frac 1{t^2}$$ is $$-\frac 1t$$, so for $$t>1$$:

\begin{align} \int\frac{\ln(t-1)}{t^2}\, dt &= -\frac{\ln(t-1)}{t} + \int\frac{dt}{t(t-1)} \\ &= -\frac{\ln(t-1)}{t} + \int\frac{dt}{t-1} - \int\frac{dt}t \\ &= -\frac{\ln(t-1)}{t} + \ln(t-1) - \ln t + C \\ &= \frac{(t-1)\ln(t-1)}{t}-\ln t + C \end{align}

and thus $$4I = \lim_{t\to\infty}\left( \frac{(t-1)\ln(t-1)}{t}-\ln t \right) - \lim_{t\to 1^+} \left( \frac{(t-1)\ln(t-1)}{t}-\ln t \right).$$

Both limits evaluate to $$0$$:

$$\lim_{t\to 1^+} \left( \frac{(t-1)\ln(t-1)}{t}-\ln t \right) = \lim_{t\to 1^+} \frac{(t-1)\ln(t-1)}{t} = \lim_{t\to 1^+} \frac{\ln(t-1)}{1+\frac 1{t-1}} = \lim_{t\to 1^+} \frac{\frac 1{t-1}}{-\frac 1{(t-1)^2}} = 0,$$

and

$$\lim_{t\to \infty} \left( \frac{(t-1)\ln(t-1)}{t}-\ln t \right) = \lim_{t\to \infty} \frac{(t-1)\ln(t-1)-t\ln t}{t} = \lim_{t\to \infty} ((t-1)\ln(t-1)-t\ln t)' = \lim_{t\to\infty}((\ln(t-1)+1)-(\ln t+1)) = \lim_{t\to\infty}\ln\frac{t-1}{t} = \ln 1 = 0,$$

where we used L'Hôpital's rule in both limits. So, $$I = 0$$.