# How to compute$\int_{0}^{1}\dfrac{x\ln(x)}{(x^2+1)^2}dx$

How to compute $$\int_{0}^{1}\dfrac{x\ln(x)}{(x^2+1)^2}dx$$ I'm interested in more ways of computing this integral.

My Thoughts

\begin{align} \int_{0}^{1}\dfrac{x\ln(x)}{(x^2+1)^2}dx&=\int_{0}^{1} \:\ln \left(x\right)\frac{x}{\left(x^2+1\right)^2}dx\\ &=\int_{0}^{1} \:\ln \left(x\right)\frac{x}{\left(x^2+1\right)^2}dx\\ \mathrm{Apply\:Integration\:By\:Parts}: \end{align}

$$\fbox{u=\ln \left(x\right),\:\:u'=\frac{1}{x},\:\:v'=\frac{1}{\left(x^2+1\right)^2}x,\:\:v=-\frac{1}{2\left(x^2+1\right)} }$$

\begin{align} \int_{0}^{1}\dfrac{x\ln(x)}{(x^2+1)^2}dx& =\ln \left(x\right)\left(-\frac{1}{2\left(x^2+1\right)}\right)\biggl|_{0}^{1}-\int_{0}^{1} \frac{1}{x}\left(-\frac{1}{2\left(x^2+1\right)}\right)dx\\ &=-\frac{\ln \left(x\right)}{2\left(x^2+1\right)}\biggl|_{0}^{1}+\int_{0}^{1} \:\frac{1}{2x\left(x^2+1\right)}dx\\ &=-\frac{\ln \left(x\right)}{2\left(x^2+1\right)}\biggl|_{0}^{1}+\dfrac{1}{2}\int_{0}^{1} \:\frac{1}{x\left(x^2+1\right)}dx\\ \end{align}

• now let's calculate:

\begin{align} \int_{0}^{1} \frac{1}{x\left(x^2+1\right)}dx&=\int_{0}^{1} \frac{1}{x\left(x^2+1\right)}dx\\ &=\int_{0}^{1} \frac{1}{x}-\frac{x}{x^2+1}dx\\ &=\ln \left(x\right)\biggl|_{0}^{1}-\dfrac{1}{2}\int_{0}^{1} \frac{2x}{x^2+1}dx\\ &=\ln \left(x\right)\biggl|_{0}^{1}-\dfrac{1}{2}\int_{0}^{1} \frac{(x^2+1)'}{x^2+1}dx\\ &=\ln \left(x\right)\biggl|_{0}^{1}-\frac{1}{2}\ln \left(x^2+1\right)\biggl|_{0}^{1}\\ \int_{0}^{1} \frac{1}{x\left(x^2+1\right)}dx&=\left(\ln \left(x\right)-\frac{1}{2}\ln \left(x^2+1\right)\right)\biggl|_{0}^{1}\\ \end{align} then $$\fbox{\int_{0}^{1}\dfrac{x\ln(x)}{(x^2+1)^2}dx=-\frac{\ln \left(x\right)}{2\left(x^2+1\right)}\biggl|_{0}^{1}+\dfrac{1}{2}\left(\ln \left(x\right)-\frac{1}{2}\ln \left(x^2+1\right)\right)\biggl|_{0}^{1}}$$

\begin{align} \int_{0}^{1}\dfrac{x\ln(x)}{(x^2+1)^2}dx&=-\frac{\ln \left(x\right)}{2\left(x^2+1\right)}\biggl|_{0}^{1}+\dfrac{1}{2}\left(\ln \left(x\right)-\frac{1}{2}\ln \left(x^2+1\right)\right)\biggl|_{0}^{1} \\ &=\frac{1}{2}\left(\ln \left(x\right)-\frac{1}{2}\ln \left(x^2+1\right)\right)-\frac{\ln \left(x\right)}{2\left(x^2+1\right)}\biggl|_{0}^{1} \\ \end{align}

or the limit of \begin{align} \lim _{x\to \:0+}\left(\frac{1}{2}\left(\ln \left(x\right)-\frac{1}{2}\ln \left(x^2+1\right)\right)-\frac{\ln \left(x\right)}{2\left(x^2+1\right)}\right)&=\lim _{x\to \:0+}\left(\frac{2x^2\ln \left(x\right)-x^2\ln \left(x^2+1\right)-\ln \left(x^2+1\right)}{4\left(x^2+1\right)}\right)\\ &=\dfrac{0}{4}=0 \end{align} and $$\frac{1}{2}\left(\ln \left(1\right)-\frac{1}{2}\ln \left(1^2+1\right)\right)-\frac{\ln \left(1\right)}{2\left(1^2+1\right)}=\dfrac{-\ln(2)}{4}$$

Finaly

$$\fbox{\int_{0}^{1}\dfrac{x\ln(x)}{(x^2+1)^2}dx=\dfrac{-\ln(2)}{4} }$$

• your result is right – Dr. Sonnhard Graubner Sep 23 '15 at 16:29
• Thank u but I'm interested in more ways of computing this integral. – Educ Sep 23 '15 at 16:36

Using $$\sum_{k\geq0}\left(-1\right)^{k}x^{2k}=\frac{1}{1+x^{2}},\,\left|x\right|<1$$ we have, taking the derivative, $$\sum_{k\geq1}\left(-1\right)^{k}kx^{2k-1}=-\frac{x}{\left(1+x^{2}\right)^{2}}$$ hence $$\int_{0}^{1}\frac{x\log\left(x\right)}{\left(x^{2}+1\right)^{2}}dx=\sum_{k\geq1}\left(-1\right)^{k+1}k\int_{0}^{1}x^{2k-1}\log\left(x\right)dx=-\sum_{k\geq1}\frac{\left(-1\right)^{k+1}k}{4k^{2}}=-\frac{1}{4}\sum_{k\geq1}\frac{\left(-1\right)^{k+1}}{k}=-\frac{\log\left(2\right)}{4}.$$

• Nice solution. +1 – Mark Viola Sep 23 '15 at 22:22

The substitution $x=e^{-u}$ gives

$$\int_0^1{x\ln x\over(x^2+1)^2}dx=-{1\over4}\int_0^\infty u\,\text{sech}^2u\,du$$

Integration by parts tells us the indefinite integral is

$$\int u\,\text{sech}^2u\,du=u\tanh u-\int\tanh u\,du=u\tanh u-\ln\cosh u+C$$

so, on noting that $0\tanh0-\ln\cosh0=0$, it remains to evaluate the limit

\begin{align} \lim_{u\to\infty}(u\tanh u-\ln\cosh u)&=\lim_{u\to\infty}\left(u{e^u-e^{-u}\over e^u+e^{-u}}-\ln\left(e^u+e^{-u}\over2 \right) \right)\\ &=\lim_{u\to\infty}\left(u\left(1-{2\over1+e^{2u}} \right)- u-\ln(1+e^{-2u})+\ln2\right)\\ &=\ln2 \end{align}

A side remark on the OP's solution: Technically it's not correct to write something like

$$\int_{0}^{1}\dfrac{x\ln(x)}{(x^2+1)^2}dx=-\frac{\ln \left(x\right)}{2\left(x^2+1\right)}\biggl|_{0}^{1}+\dfrac{1}{2}\left(\ln \left(x\right)-\frac{1}{2}\ln \left(x^2+1\right)\right)\biggl|_{0}^{1}$$

because the two separate evaluations at the lower limit $x=0$ give a result of the form $\infty-\infty$. The OP, of course, combines things here before evaluating. But it's really better (in my opinion) not to write things down (or up) in a way that requires you to keep track of what the formulas "actually" mean.

• Thanks i will take your advice in future – Educ Sep 23 '15 at 18:38

It looks fine to me. We may notice that it is possible to save a step by taking $\frac{1}{2}\left(1-\frac{1}{(x^2+1)}\right)$ as a primitive for $\frac{x}{(x^2+1)^2}$. In such a way, the original integral equals:

$$-\frac{1}{2}\int_{0}^{1}\left(1-\frac{1}{1+x^2}\right)\frac{dx}{x}=-\frac{1}{4}\int_{0}^{1}\frac{2x}{x^2+1}\,dx=-\frac{1}{4}\left.\log(x^2+1)\right|_{0}^{1}=\color{red}{-\frac{\log 2}{4}},$$

fast & clean.

As an alternative, we just need to show that: $$\int_{0}^{+\infty}\frac{t}{\cosh^2(t)}\,dt = \log 2$$ that is the same as proving that: $$\int_{0}^{+\infty}\left(1-\tanh(t)\right)\,dt = \log 2,$$ straightforward, since $\tanh(t)=\frac{d}{dt}\log\cosh t$.

• it's not easy to notice that $\frac{1}{2}\left(1-\frac{1}{(x^2+1)}\right)$ is primitive for $\frac{x}{(x^2+1)^2}$ especially in math Contest – Educ Sep 23 '15 at 17:06
• @Educ: well, you just took $-\frac{1}{2(x^2+1)}$ and had to fight with convergence issues soon after. To introduce an extra additive constant in the primitive is just the usual way for avoiding such issues. – Jack D'Aurizio Sep 23 '15 at 17:09
• by Apply Integral Substitution $$u=\left(x^2+1\right):\quad \quad du=2xdx,\:\quad \:dx=\frac{1}{2x}du$$ $$\int \frac{x}{\left(x^2+1\right)^2}dx=\int \frac{x}{u^2}\frac{1}{2x}du=\int \frac{1}{2u^2}du=-\frac{1}{2\left(x^2+1\right)}+C$$ – Educ Sep 23 '15 at 17:36
• @Educ: Integration by parts in the following form: $$\int_{a}^{b}f(x)g(x)\,dx = \left. F(x)g(x)\right|_{a}^{b}-\int_{a}^{b}F(x)g'(x)\,dx$$ works if $F(x)$ is any primitive of $f(x)$. – Jack D'Aurizio Sep 23 '15 at 17:41
• yes i know that, that's what i used in my solution to my question – Educ Sep 23 '15 at 17:43