# A log arctan integral $\int_0^1 \log x \arctan^2 x \, dx$

Here is an integral that arose while solving another problem. Can we express

$$\mathcal{J}=\int_0^1 \log x \arctan^2 x \, {\rm d}x$$

in terms of known mathematical constants or special functions? I had a couple of ideas for this one. For example begin by parts , that is:

\begin{align*} \int_{0}^{1} \log x \arctan^2 x\, {\rm d}x &= \left [ \left ( x \log x - x \right )\arctan^2 x \right ]_0^1 - \int_{0}^{1}\left ( x \log x - x \right )\arctan^2 x \, {\rm d}x \\ &=-\frac{\pi^2}{16} - \int_{0}^{1}x \log x \arctan^2 x \, {\rm d}x + \int_{0}^{1}x \arctan^2 x \, {\rm d}x \\ &= - \frac{\pi^2}{16} - \int_{0}^{1}x \log x \arctan^2 x \, {\rm d}x -\frac{\pi}{4}+\frac{\pi^2}{16} +\frac{\log 256}{16} \end{align*}

since the RHS integral is trivial. We can even find an elementary antiderivative. The problem is with the second. An idea that pumped to me while writing down my thoughts is that probably the easiest way of computing is by trying to evaluate the integral

$$\int_{0}^{1} t^{s-1} \arctan^2 x \, {\rm d}x$$

Of course $s$ is imposed on restrictions that are yet unknown to me. Playing around I see that this method is fruitless since:

$$\int_{0}^{1}x^{s-1} \arctan^2 x \, {\rm d}x = \left [ \frac{x^s}{s} \arctan^2 x \right ]_0^1 - \frac{2}{s}\int_{0}^{1} \frac{x^{s-1} \arctan x}{x^2+1} \, {\rm d}x$$

and if someone tries to apply parts again at the second integral beginning with the rational function then he encounters hypergeometrics. I don't know any of that. So, any help is welcome!

• The indefinite integral $\int\log x \arctan^2 x \, dx$ has a closed form in terms of elementary functions, dilogarithms and trilogarithms. – Vladimir Reshetnikov Jul 27 '16 at 6:44
• May you present us the closed form Vladimir ? When I run into wolfram it returned hypergeometrics... – Tolaso Jul 27 '16 at 8:26
• Yes, here it is. – Vladimir Reshetnikov Jul 27 '16 at 17:38

## 3 Answers


1. $\ds{\large \mathcal{J}_{1} =\, ?}$ \begin{align} \mathcal{J}_{1} & = 2\int_{0}^{1}{x\,\arctan\pars{x} \over x^{2} + 1}\,\dd x\ \stackrel{x\ \equiv\ \tan\pars{t}}{=}\ 2\int_{0}^{\pi/4}\tan\pars{t}t\,\dd t = -2\int_{t\ =\ 0}^{t\ =\ \pi/4}t\,\,\dd\bracks{\ln\pars{\cos\pars{t}}} \\[3mm] & = {\pi \over 4}\,\ln\pars{2}\ +\ 2\ \underbrace{\int_{0}^{\pi/4}\ln\pars{\cos\pars{t}}\,\dd t} _{\ds{\half\,G - {\pi \over 4}\,\ln\pars{2}}}\,,\qquad G\ \mbox{is the}\ Catalan\ Constant. \end{align} The last integral is straightforward evaluated by using the well known '$\ds{\cos}$-expansion' $\ds{\pars{~Fourier~}}$ of$\$ $\ds{\ln\pars{\cos\pars{t}}}$. \begin{align} \fbox{$\ds{% \quad\mathcal{J}_{1} = 2\int_{0}^{1}{x\arctan\pars{x} \over x^{2} + 1}\,\dd x = G - {\pi \over 4}\,\ln\pars{2}\quad}$}\tag{2} \end{align}
2. $\ds{\mathcal{J}_{2} = \, ?}$ \begin{align} \mathcal{J}_{2} & = 2\int_{0}^{1}{x\,\ln\pars{x}\arctan\pars{x} \over x^{2} + 1}\,\dd x = 2\,\Im\int_{0}^{1}{x\,\ln\pars{x}\ln\pars{1 + x\ic} \over x^{2} + 1}\,\dd x \\[3mm] & = \overbrace{\Im\int_{0}^{1}{x\,\ln^{2}\pars{1 + x\ic} \over x^{2} + 1}\,\dd x} ^{\ds{t\ \equiv\ 1 + x\ic}}\ -\ \overbrace{% \Im\int_{0}^{1}{x\,\ln^{2}\pars{x/\bracks{1 + x\ic}} \over x^{2} + 1}\,\dd x} ^{\ds{t\ \equiv\ {x \over 1 + x\ic}}} \\[3mm] & = \underbrace{\Im\int_{1}^{1 + \ic}{t - 1 \over t\pars{t - 2}}\,\ln^{2}\pars{t}\,\dd t}_{\ds{\mathcal{J}_{21}}}\ +\ \underbrace{\Im\int_{0}^{\pars{1 - \ic}/2}{t \over 2t^{2} + 3\ic t - 1}\,\ln^{2}\pars{t}\,\dd t}_{\ds{\mathcal{J}_{22}}}\tag{2.a} \\[3mm] & = \mathcal{J}_{21} + \mathcal{J}_{22} \end{align} Those integrals are typically evaluated in a standard fashion where the results involve $PolyLogarithms$ $\ds{\,\mathrm{Li}_{s}}$ expressions. Namely, \begin{align} \mathcal{J}_{21} & = \half\,G\ln\pars{2} - {5 \over 32}\,\pi\ln^{2}\pars{2} + {7 \over 384}\,\pi^{3} - \Im\,\mathrm{Li}_{3}\pars{\half + \half\,\ic} \\[3mm] \mathcal{J}_{22} & = -\,\half\,G\ln\pars{2} + {9 \over 32}\,\pi\ln^{2}\pars{2} + {17 \over 384}\,\pi^{3} -3\,\Im\,\mathrm{Li}_{3}\pars{\half + \half\,\ic} \end{align} such that $\pars{~\mathcal{J}_{2} = \mathcal{J}_{21} + \mathcal{J}_{22}~}$ $$\fbox{\ds{\ \mathcal{J}_{2} = 2\int_{0}^{1}{x\ln\pars{x}\arctan\pars{x} \over x^{2} + 1} \,\dd x = {1 \over 8}\,\pi\ln^{2}\pars{2} + {1 \over 16}\,\pi^{3} -4\,\Im\,\mathrm{Li}_{3}\pars{\half + \half\,\ic}\ }}\tag{3}$$

With the results $\pars{1}$, $\pars{2}$ and $\pars{3}$: \begin{align} \color{#f00}{\mathcal{J}} & \equiv \int_{0}^{1}\ln\pars{x}\arctan^{2}\pars{x}\,\dd x \\[3mm] & = \color{#f00}{% -\,{1 \over 16}\,\pi^{2} + G - {1 \over 4}\,\pi\ln\pars{2} - {1 \over 8}\,\pi\ln^{2}\pars{2} - {1 \over 16}\,\pi^{3} +4\,\Im\,\mathrm{Li}_{3}\pars{\half + \half\,\ic}} \approx -0.0915 \end{align}

Integrals in $\ds{\pars{2.a}}$ are reduced to an evaluation of: \begin{align} &\color{#f00}{\int_{a}^{b}{\ln^{2}\pars{t} \over c - t}\,\dd t} = \int_{a}^{b}{\ln^{2}\pars{t} \over 1 - t/c}\,{\dd t \over c} = \int_{a/c}^{b/c}{\ln^{2}\pars{ct} \over 1 - t}\,\dd t \\[3mm] = &\ \left.\vphantom{\Large A} -\ln\pars{1 - t}\ln\pars{ct}\right\vert_{\ a/c}^{\ b/c} + 2\int_{a/c}^{b/c}\ \overbrace{{\ln\pars{1 - t} \over t}} ^{\ds{-\,\mathrm{Li}_{2}'\pars{t}}}\ \,\ln\pars{ct}\,\dd t \\[3mm] = &\ -\ln\pars{1 - {b \over c}}\ln\pars{b} + \ln\pars{1 - {a \over c}}\ln\pars{a} -2\,\mathrm{Li}_{2}\pars{b \over c}\ln\pars{b} + 2\,\mathrm{Li}_{2}\pars{a \over c}\ln\pars{a} \\[3mm] +&\ 2\,\mathrm{Li}_{3}\pars{b \over c} - 2\,\mathrm{Li}_{3}\pars{a \over c} \end{align}

We have $$\frac{d}{dx}\arctan^2(x) = 2\cdot\frac{\arctan x}{1+x^2}\tag{1}$$ hence it follows that the Taylor series of $\arctan(x)^2$ is given by $$\arctan^2(x)=2\sum_{n\geq 0}(-1)^n \frac{x^{2n+2}}{2n+2} \sum_{m=0}^{n}\frac{1}{2m+1}\tag{2}$$ and: $$\mathcal{J} = \color{red}{\sum_{n\geq 1}\frac{(-1)^{n}\left(2H_{2n}-H_{n}\right)}{(2n)(2n+1)^2}}.\tag{3}$$ Now Mathematica provides: $$\sum_{n\geq 1}\frac{H_n}{(2n)(2n+1)^2}=\frac{2\pi^2\log(2)+8\log^2(2)-14\,\zeta(3)}{8}\tag{4}$$ but the alternating sign in $(3)$ gives an extra level of complexity. Anyway, $$\frac{1}{(2n)(2n+1)^2}=\frac{1}{2n}-\frac{1}{2n+1}-\frac{1}{(2n+1)^2}\tag{5}$$ hence the crucial value to compute is $\color{red}{2\,S_6-S_3}$, where:

$$S_1 = \sum_{n\geq 1}\frac{(-1)^n H_n}{2n}=\frac{\log^2(2)-\zeta(2)}{4},\qquad S_2 = \sum_{n\geq 1}\frac{(-1)^n H_n}{2n+1}=K-\frac{\pi}{2}\log 2$$ $$\color{red}{S_3} = \sum_{n\geq 1}\frac{(-1)^n H_n}{(2n+1)^2}=\,\color{red}{???}\qquad S_4=\sum_{n\geq 1}\frac{(-1)^n H_{2n}}{2n}=\frac{\log^2(2)}{8}-\frac{5\pi^2}{96}$$ $$S_5=\sum_{n\geq 1}\frac{(-1)^n H_{2n}}{2n+1}=-\frac{\pi}{8}\log(2),\qquad \color{red}{S_6}=\sum_{n\geq 1}\frac{(-1)^n H_{2n}}{(2n+1)^2}=\,\color{red}{???}$$

We have: $$S_3 = \int_{0}^{1}\frac{\log(x)\log(1+x^2)}{1+x^2}\,dx$$ that Mathematica is able to convert into a complicated expression involving $\text{Im}\,\text{Li}_3\left(\frac{1+i}{2}\right)$ (besides $\pi^3,K\log(2)$ and $\pi\log^2(2)$) but I am stil clueless about $S_6$.

The following is a proof that,

$I=\displaystyle\int_0^1 \dfrac{\ln x\ln(1+x^2)}{1+x^2}dx=2\int_0^{\tfrac{\pi}{4}} \big(\ln(\cos x)\big)^2dx-\dfrac{\pi(\ln 2)^2}{2}+\dfrac{\pi^3}{48}$

Let $\displaystyle J=\int_0^{\tfrac{\pi}{2}}\left(\ln(\cos x)\right)^2 dx$

Perform the change of variable $y=\dfrac{\pi}{2}-x$,

$\boxed{\displaystyle J=\int_0^{\tfrac{\pi}{2}}\left(\ln(\sin x)\right)^2 dx}$

$\displaystyle J=\int_0^{\tfrac{\pi}{4}}\left(\ln(\sin x)\right)^2 dx+\int_{\tfrac{\pi}{4}}^{\tfrac{\pi}{2}}\left(\ln(\sin x)\right)^2 dx$

In the second integral, perform the change of variable $y=\dfrac{\pi}{2}-x$,

$\boxed{\displaystyle J=\int_0^{\tfrac{\pi}{4}}\left(\ln(\cos x)\right)^2 dx+\int_{0}^{\tfrac{\pi}{4}}\left(\ln(\sin x)\right)^2 dx}$

Since for $a,b$ real, $2(a^2+b^2)=(a+b)^2+(a-b)^2$ then,

$\displaystyle 2J=\int_0^{\tfrac{\pi}{4}}\Big(\ln(\cos x)+\ln(\sin x)\Big)^2 dx+\int_0^{\tfrac{\pi}{4}}\Big(\ln(\cos x)-\ln(\sin x)\Big)^2 dx$

$\displaystyle \int_0^{\tfrac{\pi}{4}}\Big(\ln(\cos x)+\ln(\sin x)\Big)^2 dx=\int_0^{\tfrac{\pi}{4}}\Big(\ln(\sin(2x))-\ln 2\Big)^2 dx$

In the latter integral, perform the change of variable $y=2x$,

$\displaystyle \int_0^{\tfrac{\pi}{4}}\Big(\ln(\sin(2x))-\ln 2\Big)^2 dx=\dfrac{1}{2}J-\ln 2 \int_0^{\tfrac{\pi}{2}}\ln(\sin x)dx+\dfrac{1}{2}\int_0^{\tfrac{\pi}{2}}(\ln 2)^2dx$

$\displaystyle\int_0^{\tfrac{\pi}{2}}\ln(\sin x)dx=\int_0^{\tfrac{\pi}{4}}\ln(\sin x)dx+\int_{\tfrac{\pi}{4}}^{\tfrac{\pi}{2}}\ln(\sin x)dx$

In the latter integral, perform the change of variable $y=\dfrac{\pi}{2}-x$,

$\displaystyle\int_0^{\tfrac{\pi}{2}}\ln(\sin x)dx=\int_0^{\tfrac{\pi}{4}}\ln(\sin x)dx+\int_{0}^{\tfrac{\pi}{4}}\ln(\cos x)dx$

Moreover,

$\displaystyle\int_0^{\tfrac{\pi}{2}}\ln(\sin x)dx=\int_0^{\tfrac{\pi}{2}} \ln\left(2\sin\left(\dfrac{x}{2}\right)\cos\left(\dfrac{x}{2}\right)\right)dx$

In the latter integral, perform the change of variable $y=\dfrac{x}{2}$,

$\displaystyle\int_0^{\tfrac{\pi}{2}}\ln(\sin x)dx=2\int_0^{\tfrac{\pi}{4}}\ln 2 dx+2\int_0^{\tfrac{\pi}{4}}\ln(\cos x)dx+2\int_0^{\tfrac{\pi}{4}}\ln(\sin x)dx$

Therefore,

$\displaystyle\int_0^{\tfrac{\pi}{2}}\ln(\sin x)dx=\dfrac{\pi\ln 2}{2}+2\displaystyle\int_0^{\tfrac{\pi}{2}}\ln(\sin x)dx$

$\boxed{\displaystyle\int_0^{\tfrac{\pi}{2}}\ln(\sin x)dx=-\dfrac{\pi\ln 2}{2}}$

Therefore,

$\boxed{\displaystyle \int_0^{\tfrac{\pi}{4}}\Big(\ln(\cos x)+\ln(\sin x)\Big)^2 dx=\dfrac{1}{2}J+\dfrac{\pi(\ln 2)^2}{2}+\dfrac{\pi(\ln 2)^2}{4}=\dfrac{1}{2}J+\dfrac{3\pi(\ln 2)^2}{4}}$

$\displaystyle\int_0^{\tfrac{\pi}{4}}\Big(\ln(\cos x)-\ln(\sin x)\Big)^2 dx=\int_0^{\tfrac{\pi}{4}}(\ln(\tan x))^2 dx$

In the latter integral, perform the change of variable $y=\tan x$,

$\displaystyle\int_0^{\tfrac{\pi}{4}}\Big(\ln(\cos x)-\ln(\sin x)\Big)^2 dx=\int_0^1 \dfrac{(\ln x)^2}{1+x^2}dx=\sum_{n=0}^{\infty} \int_0^1 (-1)^n x^{2n}(\ln x)^2 dx=\\ \displaystyle 2\sum_{n=0}^{+\infty}\dfrac{(-1)^n}{(2n+1)^3}=2\beta(3)$

therefore,

$\boxed{\displaystyle\int_0^{\tfrac{\pi}{4}}\Big(\ln(\cos x)-\ln(\sin x)\Big)^2 dx=\dfrac{\pi^3}{16}}$

therefore,

$2J=\dfrac{1}{2}J+\dfrac{3\pi(\ln 2)^2}{4}+\dfrac{\pi^3}{16}$

$\boxed{J=\dfrac{\pi(\ln 2)^2}{2}+\dfrac{\pi^3}{24}}$

$\displaystyle\int_0^{\tfrac{\pi}{4}}\ln(\sin x)\ln(\cos x)dx=-\dfrac{1}{2}\left(\int_0^{\tfrac{\pi}{4}}\Big(\ln(\cos x)-\ln(\sin x)\Big)^2 dx-\int_0^{\tfrac{\pi}{4}}\left(\ln(\cos x)\right)^2 dx-\int_{0}^{\tfrac{\pi}{4}}\left(\ln(\sin x)\right)^2 dx\right)=\\ -\dfrac{1}{2}\left(\dfrac{\pi^3}{16}-J\right)$

therefore,

$\boxed{\displaystyle\int_0^{\tfrac{\pi}{4}}\ln(\sin x)\ln(\cos x)dx=\dfrac{\pi(\ln 2)^2}{4}-\dfrac{\pi^3}{96}}$

Perform the change of variable $x=\tan y$,

$\displaystyle I=\int_0^{\tfrac{\pi}{4}} \ln(\tan x)\ln\left(\dfrac{1}{(\cos x)^2}\right)dx=2\int_0^{\tfrac{\pi}{4}} \big(\ln(\cos x)\big)^2dx-2\int_0^{\tfrac{\pi}{4}} \ln(\cos x)\ln(\sin x)dx$

Finally,

$\boxed{I=\displaystyle 2\int_0^{\tfrac{\pi}{4}} \big(\ln(\cos x)\big)^2dx-\dfrac{\pi(\ln 2)^2}{2}+\dfrac{\pi^3}{48}}$

• I am afraid I don't follow your post. To what does this answer? – Tolaso Jul 5 '16 at 13:04
• From this expression using $\displaystyle \int_0^{\tfrac{\pi}{4}} \big(\ln(\cos x)\big)^2dx$ it is probably simpler to see your integral is related to $\Im\left(Li_3\left(\dfrac{1}{2} +\dfrac{1}{2} i\right)\right)$ – FDP Jul 5 '16 at 13:28