# Prove $\int_0^1\frac{\ln2-\ln\left(1+x^2\right)}{1-x}\,dx=\frac{5\pi^2}{48}-\frac{\ln^22}{4}$

How does one prove the following integral

$$\int_0^1\frac{\ln2-\ln\left(1+x^2\right)}{1-x}\,dx=\frac{5\pi^2}{48}-\frac{\ln^22}{4}$$

Wolfram Alpha and Mathematica can easily evaluate this integral. This integral came up in the process of finding the solution this question: Evaluating $\displaystyle\sum_{n=1}^{\infty} (-1)^{n-1}\frac{H_{2n}}{n}$. There are some good answers there but avoiding this approach. I have been waiting for a day hoping an answers would be posted using this approach, but nothing shows up. The integral cannot be evaluated separately since each terms doesn't converge. I tried integration by parts but the problem arises when substituting the bounds of integration.

I would appreciate if anyone here could provide an answer where its approach using integral only preferably with elementary ways.

• Integrating by parts once yields $\displaystyle -\int^1_0\frac{2x\ln(1-x)}{1+x^2}{\rm d}x$, which should not be much of a problem for you. – M.N.C.E. Nov 1 '14 at 15:49

I will share two other possible methods that I happen to know of to compute this integral.

Differentiation under the Integral Sign:

Denote $$\mathcal{I}(a)=\int^1_0\frac{-2x\ln(1-ax)}{1+x^2}{\rm d}x$$ Differentiating yields \begin{align} \mathcal{I}'(a) =&\int^1_0\frac{2x^2}{(1+x^2)(1-ax)}{\rm d}x\\ =&-\frac{2}{1+a^2}\int^1_0\left(\frac{ax}{1+x^2}+\frac{1}{1+x^2}-\frac{1}{1-ax}\right) {\rm d}x\\ =&-\frac{a\ln{2}}{1+a^2}-\frac{\pi}{2}\frac{1}{1+a^2}-\frac{2\ln(1-a)}{a(1+a^2)} \end{align} Integrating back, \begin{align} \mathcal{I}(1) =&\int^1_0\left(-\frac{a\ln{2}}{1+a^2}-\frac{\pi}{2}\frac{1}{1+a^2}-\frac{2\ln(1-a)}{a(1+a^2)}\right){\rm d}a\\ =&-\frac{1}{2}\ln^2{2}-\frac{\pi}{2}\arctan{1}+2{\rm Li}_2(1)-\int^1_0\frac{-2a\ln(1-a)}{1+a^2}{\rm d}a\\ =&\frac{5\pi^2}{24}-\frac{1}{2}\ln^2{2}-\mathcal{I}(1) \end{align} and a simple rearrangement yields $$\color{red}{\mathcal{I}(1)=\frac{5\pi^2}{48}-\frac{1}{4}\ln^2{2}}$$

Contour Integration:

Contour integration is, admittedly, an extremely inefficient method to tackle this integral. Nevertheless, I will post this approach purely for the fun of it.

Integrate $\displaystyle f(z)=\frac{\ln{2}-\ln(1+z^2)}{1-z}$ along a unit quarter circle in the first quadrant with indents at the pole $z=1$ and the branch point $z=i$. Both of the contributions from the indents tend to zero. Since the contour encloses no poles, $$\int^1_0\frac{\ln{2}-\ln(1+x^2)}{1-x}{\rm d}x+\left(\int_{\text{arc}}+\int_{\text{line}}\right)\frac{\ln{2}-\ln(1+z^2)}{1-z}{\rm d}z=0$$ Around the arc, \begin{align} \Re\int_{\text{arc}}\frac{\ln{2}-\ln(1+z^2)}{1-z}{\rm d}z =&\Re\int^\frac{\pi}{2}_0\frac{\ln{2}-\ln(1+e^{i2\theta})}{1-e^{i\theta}}ie^{i\theta}{\rm d}\theta\\ =&\frac{1}{2}\int^\frac{\pi}{2}_0\ln(\cos{\theta})\cot{\tfrac\theta 2}\ {\rm d}\theta-\frac{1}{2}\int^\frac{\pi}{2}_0\theta\ {\rm d}\theta\\ =&-\int^1_0\frac{2{\rm artanh}\ {t^2}}{t(1+t^2)}{\rm d}t-\frac{\pi^2}{16}\\ =&-\chi_2(1)+\frac{1}{4}\ln^2(1+t^2)\Bigg{|}^1_0-\int^1_0\frac{t\ln(1-t^2)}{1+t^2}-\frac{\pi^2}{16}\\ =&-\frac{3\pi^2}{16}+\frac{1}{4}\ln^2{2}-\frac{1}{2}\int^1_0\frac{\ln(1-t)}{1+t}{\rm d}t \end{align} Along the line segment on the imaginary axis, \begin{align} \Re\int_{\text{line}}\frac{\ln{2}-\ln(1+z^2)}{1-z}{\rm d}z =&\Re\int^0_1i\frac{\ln{2}-\ln(1-y^2)}{1-iy}{\rm d}y\\ =&\int^1_0\frac{y\ln{2}}{1+y^2}{\rm d}y-\int^1_0\frac{y\ln(1-y^2)}{1+y^2}{\rm d}y\\ =&\frac{1}{2}\ln^2{2}-\frac{1}{2}\int^1_0\frac{\ln(1-y)}{1+y}{\rm d}y \end{align} Hence we have $$\int^1_0\frac{\ln{2}-\ln(1+x^2)}{1-x}{\rm d}x=\frac{3\pi^2}{16}-\frac{3}{4}\ln^2{2}+\int^1_0\frac{\ln(1-x)}{1+x}{\rm d}x$$ For the sake of consistency only, I will use contour integration once again to evaluate the remaining integral though it can be computed easily with real methods. This time, integrate $\displaystyle g(z)=\frac{\ln(1-z)}{1+z}$ along a unit quarter circle with an indent at $z=1$. The contribution from the indent vanishes, hence leaving us with $$\int^1_0\frac{\ln(1-x)}{1+x}{\rm d}x+\left(\int_{\text{arc}}+\int_{\text{line}}\right)\frac{\ln(1-z)}{1+z}{\rm d}z=0$$ Around the arc, \begin{align} \Re\int_{\text{arc}}\frac{\ln(1-z)}{1+z}{\rm d}z =&\Re\int^\frac{\pi}{2}_0\frac{\ln(1-e^{i\theta})}{1+e^{i\theta}}ie^{i\theta}\ {\rm d}\theta\\ =&-\int^\frac{\pi}{4}_0\ln(2\sin{x})\tan{x}\ {\rm d}x-\frac{1}{4}\int^\frac{\pi}{2}_0\left(x-\pi\right)\ {\rm d}x\\ =&\frac{3\pi^2}{32}-\frac{1}{2}\ln^2{2}-\frac{1}{4}\underbrace{\int^1_0\frac{\ln{t}}{1+t}{\rm d}t}_{{\rm Li}_2(-1)}+\frac{1}{4}\int^1_0\frac{\ln(1+t)}{1+t}{\rm d}t\\ =&\frac{11\pi^2}{96}-\frac{3}{8}\ln^2{2}\\ \end{align} Along the line segment on the imaginary axis, \begin{align} \Re\int_{\text{line}}\frac{\ln(1-z)}{1+z}{\rm d}z =&\Re\int^0_1\frac{i\ln(1-iy)}{1+iy}{\rm d}y\\ =&-\int^1_0\frac{\arctan{y}}{1+y^2}{\rm d}y-\frac{1}{4}\int^1_0\frac{\ln(1+y)}{1+y}{\rm d}y\\ =&\left[-\frac{1}{2}\arctan^2{y}-\frac{1}{8}\ln^2(1+y)\right]^1_0\\ =&-\frac{\pi^2}{32}-\frac{1}{8}\ln^2{2} \end{align} Thus we have $$\int^1_0\frac{\ln(1-x)}{1+x}{\rm d}x=-\frac{\pi^2}{12}+\frac{1}{2}\ln^2{2}$$ and consequently, $$\color{red}{\int^1_0\frac{\ln{2}-\ln(1+x^2)}{1-x}{\rm d}x=\frac{5\pi^2}{48}-\frac{1}{4}\ln^2{2}}$$

• I decide to comment for this time. Hey, you're a high-schooler & you're from Asia too, just like me. Do you have an email or accounts on Quora, Brilliant.org, or I&S that I can contact? I am interested in knowing more about you. – Anastasiya-Romanova 秀 Nov 2 '14 at 14:32
• @Anastasiya-Romanova I am a relatively new user at I&S. However, I would prefer to keep the more personal details of my life such as my email private if you don't mind. Thanks. – M.N.C.E. Nov 2 '14 at 14:50

We have: $$\begin{eqnarray*} I &=& -\int_{0}^{1}\frac{2x \log(1-x)}{1+x^2}=\sum_{k=1}^{+\infty}\frac{1}{k}\int_{0}^{1}\frac{2x^{k+1}}{1+x^2}\,dx=\sum_{k=1}^{+\infty}\frac{2}{k}\sum_{j=1}^{+\infty}\frac{(-1)^{j+1}}{k+2j}\\&=&\sum_{j=1}^{+\infty}\frac{(-1)^{j+1}H_{2j}}{j}.\end{eqnarray*}\tag{1}$$ Since $$\sum_{j=1}^{+\infty}\left(\frac{1}{2j-1}+\frac{1}{2j}\right)x^{j-1} = \frac{\operatorname{arctanh}\sqrt{x}}{\sqrt{x}}-\frac{\log(1-x)}{2x}$$ we have: $$\sum_{j=1}^{+\infty} H_{2j}\, x^{j-1} = \frac{\operatorname{arctanh}\sqrt{x}}{(1-x)\sqrt{x}}-\frac{\log(1-x)}{2x(1-x)},$$ $$\sum_{j=1}^{+\infty} (-1)^{j+1}H_{2j}\, x^{j-1} = \frac{\arctan\sqrt{x}}{(1+x)\sqrt{x}}+\frac{\log(1+x)}{2x(1+x)},\tag{2}$$ hence: $$I = \int_{0}^{1}\frac{\arctan\sqrt{x}}{(1+x)\sqrt{x}}+\frac{\log(1+x)}{2x(1+x)}\,dx=\int_{0}^{1}\frac{2\arctan x}{1+x^2}\,dx+\int_{0}^{1}\frac{\log(1+x)}{2x(1+x)}\,dx,$$ $$I = \frac{\pi^2}{16}+\int_{0}^{1}\frac{\log(1+x)}{2x}\,dx-\int_{0}^{1}\frac{\log(1+x)}{2(1+x)}\,dx\tag{3}$$ and finally:

$$I = \frac{\pi^2}{16}+\frac{\pi^2}{24}-\frac{\log^2 2}{4}.$$

• I think thats what the OP wanted to avoid, to bring it back to this harmonic sum. – Redundant Aunt Nov 1 '14 at 22:33

As M.N.C.E. stated in the comments, integrating by parts shows that \begin{align} \int_{0}^{1} \frac{\log(2) - \log(1+x^{2}) }{1-x} \ dx&= - 2 \int_{0}^{1} \frac{x \log(1-x)}{x^{2}+1} \ dx \\ &= - 2 \ \text{Re} \int_{0}^{1} \frac{\log(1-x)}{x+i} \ dx . \end{align}

Letting $\displaystyle t = \frac{x+i}{1+i}$,

\begin{align} \int \frac{\log(1-x)}{x+i} \ dx &= \int \frac{\log [(1+i)(1-t)]}{t} \ dt \\ &= \log(1+i) \int \frac{dt}{t} + \int\frac{\log(1-t)}{t} \ dt \ \ \left(- \pi < \frac{\pi}{4} + \text{Arg} (1-t) \le \pi \right) \\ &= \log(1+i) \log(t) - \text{Li}_{2} (t) + C \\ &= \log(1+i) \log \left(\frac{x+i}{1+i} \right) - \text{Li}_{2} \left(\frac{x+i}{1+i} \right) + C . \end{align}

Therefore,

\begin{align} &\int_{0}^{1} \frac{\log(2) - \log(1+x^{2}) }{1-x} \\ &= - 2 \ \text{Re} \left[- \text{Li}_{2} (1) - \log(1+i) \log \left(\frac{1+i}{2} \right) + \text{Li}_{2} \left(\frac{1+i}{2} \right) \right] \\ &= - 2 \ \text{Re} \left[- \frac{\pi^{2}}{6} - \left(\frac{\log 2}{2} + \frac{i \pi}{4} \right) \left(- \frac{\log 2}{2} + \frac{i \pi}{4} \right) \right] -2 \ \text{Re} \ \text{Li}_{2} \left(\frac{1+i}{2} \right) \\ & = - 2 \left(\frac{\log^{2}(2)}{4} - \frac{5 \pi^{2}}{48} \right) - 2 \left(\frac{5 \pi^{2}}{96} - \frac{\log^{2} (2)}{8} \right) \\ &= \frac{5 \pi^{2}}{48} - \frac{\log^{2}(2)}{4} . \end{align}

To show that $$\text{Re} \ \text{Li}_{2} \left(\frac{1+i}{2} \right) = \frac{5 \pi^{2}}{96} - \frac{\log^{2} (2)}{8}$$ combine the reflection formula for the dilogarithm (5) with the property $\text{Li}_{n}(\bar{z}) = \overline{\text{Li}_{n}(z)}$.

Start with subbing $$x=\frac{1-y}{1+y}$$

$$\mathcal{I}=\int_0^1\frac{\ln(2)-\ln(1+x^2)}{1-x}dx=\int_0^1\frac{2\ln(1+y)-\ln(1+y^2)}{y(1+y)}dy$$

$$=2\int_0^1\frac{\ln(1+y)}{y}dy-2\int_0^1\frac{\ln(1+y)}{1+y}dy-\int_0^1\frac{\ln(1+y^2)}{y(1+y)}dy$$

$$=-2\operatorname{Li}_2(-y)|_0^1-\ln^2(1+y)|_0^1-\mathcal{J}$$

$$=\frac{\pi^2}{6}-\ln^2(2)-\left(\frac{\pi^2}{16}-\frac34\ln^2(2)\right)=\boxed{\frac{5\pi^2}{48}-\frac14\ln^2(2)}$$

Where the last integral $$\mathcal{J}=\int_0^1\frac{\ln(1+y^2)}{y(1+y)}dy$$ can be proved using the common Feynman's method:

Let $$I(a)=\int_0^1\frac{\ln(1+a^2y^2)}{y(1+y)}dy, \quad I(0)=0, \quad I(1)=\mathcal{J}$$

$$I'(a)=\int_0^1\frac{2ay}{(1+y)(1+a^2y^2)}dy=2\frac{\tan^{-1}(a)}{1+a^2}+\frac{a\ln(1+a^2)}{1+a^2}-\ln(2)\frac{2a}{1+a^2}$$ $$\Longrightarrow \mathcal{J}=2\int_0^1\frac{\tan^{-1}(a)}{1+a^2}da+\int_0^1\frac{a\ln(1+a^2)}{1+a^2}da-\ln(2)\int_0^1\frac{2a}{1+a^2}da\\=\left(\frac{\pi}{4}\right)^2+\frac14\ln^2(2)-\ln^2(2)=\boxed{\frac{\pi^2}{16}-\frac34\ln^2(2)}$$


Then, \begin{align} &\bbox[10px,#ffd]{\int_{0}^{1}{\ln\pars{2} - \ln\pars{1 + x^{2}} \over 1 - x}\,\dd x} = {\pi^{2} \over 6} - \verts{-\,{1 \over 2}\,\ln\pars{2} - {1 \over 4}\,\pi\ic}^{\, 2} \\[5mm] = &\ \bbx{{5\pi^{2} \over 48} - {1 \over 4}\,\ln^{2}\pars{2}} \approx 0.9080 \end{align}

In case the OP is curious about the harmonic series, here is an easy approach:

Using the classical identity

$$\sum_{n=1}^\infty (-1)^{n-1} f(2n)=-\Re\sum_{n=1}^\infty i^n f(n)$$

then

$$S=\sum_{n-1}^\infty (-1)^{n-1}\frac{H_{2n}}{n}=2\sum_{n-1}^\infty (-1)^{n-1}\frac{H_{2n}}{2n}=-2\Re\sum_{n=1}^\infty i^n\frac{H_n}{n}$$

Using the generating function

$$\sum_{n=1}^\infty x^n\frac{H_n}{n}=\frac12\ln^2(1-x)+\operatorname{Li}_2(x)$$

Set $$x=i$$ we get

$$S=-2\Re\left(\frac12\ln^2(1-i)+\operatorname{Li}_2(i)\right)$$

$$=-2\Re\left(-\frac{5\pi^2}{96}-\frac18\ln^2(2)\right)=\frac{5\pi^2}{48}-\frac14\ln^2(2)$$

\begin{align}J&=\int_0^1\frac{\ln\left(\frac{2}{1+x^2}\right)}{1-x}\,dx\\ &\overset{y=\frac{1-x}{1+x}}=\int_0^1\frac{\ln\left(\frac{(1+x)^2}{1+x^2}\right)}{x(1+x)}\,dx\\ &=2\int_0^1\frac{\ln\left(1+x\right)}{x}\,dx-\ln^2 2+\int_0^1\frac{\ln\left(1+x^2\right)}{1+x}\,dx-\int_0^1\frac{\ln\left(1+x^2\right)}{x}\,dx \end{align}In the last integral perform the change of variable $$y=x^2$$, \begin{align}J&=\frac{3}{2}\int_0^1\frac{\ln\left(1+x\right)}{x}\,dx-\ln^2 2+\int_0^1\frac{\ln\left(1+x^2\right)}{1+x}\,dx\\ &=\frac{3}{2}\Big[\ln x\ln(1+x)\Big]_0^1-\frac{3}{2}\int_0^1 \frac{\ln x}{1+x}\,dx-\ln^2 2+\Big[\ln(1+x)\ln\left(1+x^2\right)\Big]_0^1 -\int_0^1 \frac{2x\ln(1+x)}{1+x^2}\,dx\\ &=-\frac{3}{2}\int_0^1 \frac{\ln x}{1+x}\,dx-\int_0^1 \frac{2x\ln(1+x)}{1+x^2}\,dx\\ A&=\int_0^1 \frac{2x\ln(1+x)}{1+x^2}\,dx\\ B&=\int_0^1 \frac{2x\ln(1-x)}{1+x^2}\,dx\\ A+B&=\int_0^1 \frac{2x\ln(1-x^2)}{1+x^2}\,dx\\ &\overset{y=x^2}=\int_0^1 \frac{\ln(1-x)}{1+x}\,dx\\ &=\int_0^1 \frac{\ln\left(\frac{1-x}{1+x}\right)}{1+x}\,dx+\int_0^1 \frac{\ln(1+x)}{1+x}\,dx\\ &=\int_0^1 \frac{\ln\left(\frac{1-x}{1+x}\right)}{1+x}\,dx+\frac{1}{2}\ln^2 2\\ &\overset{y=\frac{1-x}{1+x}}=\int_0^1 \frac{\ln x}{1+x}\,dx+\frac{1}{2}\ln^2 2\\ B-A&=\int_0^1 \frac{2x\ln\left(\frac{1-x}{1+x}\right)}{1+x^2}\,dx\\ &\overset{y=\frac{1-x}{1+x}}=\int_0^1 \frac{2(1-x)\ln x}{(1+x^2)(1+x)}\,dx\\ &=2\int_0^1 \frac{\ln x}{1+x}\,dx-\int_0^1 \frac{2x\ln x}{1+x^2}\,dx \end{align}In the last integral perform the change of variable $$y=x^2$$, \begin{align}B-A&=\frac{3}{2}\int_0^1 \frac{\ln x}{1+x}\,dx\\\end{align}Therefore, \begin{align}A&=\frac{1}{2}\Big((A+B)-(B-A)\Big)\\ &=-\frac{1}{4}\int_0^1 \frac{\ln x}{1+x}\,dx+\frac{1}{4}\ln^2 2\\ J&=-\frac{5}{4}\int_0^1 \frac{\ln x}{1+x}\,dx-\frac{1}{4}\ln^2 2\\ &=-\frac{5}{4}\left(\int_0^1 \frac{\ln x}{1-x}\,dx-\int_0^1 \frac{2x\ln x}{1-x^2}\,dx\right)-\frac{1}{4}\ln^2 2\\ \end{align}In the second integral perform the change of variable $$y=x^2$$, \begin{align}J&=-\frac{5}{8}\int_0^1 \frac{\ln x}{1-x}\,dx-\frac{1}{4}\ln^2 2\\ &=-\frac{5}{8}\times -\zeta(2)-\frac{1}{4}\ln^2 2\\ &=\boxed{\frac{5\pi^2}{48}-\frac{1}{4}\ln^2 2} \end{align} NB: I assume $$\zeta(2)=\dfrac{\pi^2}{6}$$