How to evaluate $\int_0^1 (\arctan x)^2 \ln(\frac{1+x^2}{2x^2}) dx$

Results used

I will just state the following result as I do not wish to replicate Random Variable's brilliant work in this answer. $$\int^\frac{\pi}{4}_0\ln^2(\cos{x})\ {\rm d}x=\Im{\rm Li}_3(1-i)-\frac{\mathbf{G}}{2}\ln{2}+\frac{7\pi^3}{192}+\frac{5\pi}{16}\ln^2{2}$$ It is also quite easy to show that $$\sum^\infty_{n=1}\frac{H_n}{n^2}z^n={\rm Li}_3(z)-{\rm Li}_3(1-z)+{\rm Li}_2(1-z)\ln(1-z)+\frac{1}{2}\ln{z}\ln^2(1-z)+\zeta(3)$$


Splitting up the integral

We may split up the integral into 3 simpler integrals. $$\mathscr{I}=-\ln{2}\underbrace{\int^1_0\arctan^2{x}\ {\rm d}x}_{\mathscr{I}_1} -2\underbrace{\int^1_0\arctan^2{x}\ln{x}\ {\rm d}x}_{\mathscr{I}_2}+\underbrace{\int^1_0\arctan^2{x}\ln(1+x^2)\ {\rm d}x}_{\mathscr{I}_3}$$


Evaluation of $\mathscr{I}_1$

Integrate by parts. \begin{align} \mathscr{I}_1 =&x\arctan^2{x}\Bigg{|}^1_0-\int^1_0\frac{2x\arctan{x}}{1+x^2}{\rm d}x\\ =&\frac{\pi^2}{16}-\left[\ln(1+x^2)\arctan{x}\right]^1_0+\int^1_0\frac{\ln(1+x^2)}{1+x^2}{\rm d}x\\ =&\frac{\pi^2}{16}-\frac{\pi}{4}\ln{2}-2\int^\frac{\pi}{4}_0\ln(\cos{x})\ {\rm d}x\\ =&\frac{\pi^2}{16}-\frac{\pi}{4}\ln{2}+\frac{\pi}{2}\ln{2}+2\sum^\infty_{n=1}\frac{(-1)^n}{n}\int^\frac{\pi}{4}_0\cos(2nx)\ {\rm d}x\\ =&\frac{\pi^2}{16}+\frac{\pi}{4}\ln{2}+\sum^\infty_{n=1}\frac{(-1)^n\sin(n\pi/2)}{n^2}\\ =&\frac{\pi^2}{16}+\frac{\pi}{4}\ln{2}+\sum^\infty_{n=0}\frac{(-1)^{2n+1}(-1)^n}{(2n+1)^2}\\ =&\frac{\pi^2}{16}+\frac{\pi}{4}\ln{2}-\mathbf{G} \end{align}


Evaluation of $\mathscr{I}_2$ $\require{cancel}$ \begin{align} \mathscr{I}_2 =&\color{red}{\cancelto{0}{\color{grey}{x\arctan^2{x}\ln{x}\Bigg{|}^1_0}}}-\int^1_0\arctan^2{x}\ {\rm d}x-\int^1_0\frac{2x\arctan{x}\ln{x}}{1+x^2}{\rm d}x\\ =&-\frac{\pi^2}{16}-\frac{\pi}{4}\ln{2}+\mathbf{G}+2\sum^\infty_{n=0}\frac{(-1)^nH_{2n+1}}{(2n+3)^2}-\sum^\infty_{n=0}\frac{(-1)^nH_{n}}{(2n+3)^2}\\ =&\frac{\pi^3}{16}-\frac{\pi^2}{16}-\frac{\pi}{4}\ln{2}+\mathbf{G}-2\sum^\infty_{n=0}\frac{(-1)^nH_{2n+1}}{(2n+1)^2}+\sum^\infty_{n=1}\frac{(-1)^{n}H_n}{(2n+1)^2} \end{align} Since \begin{align} \sum^\infty_{n=0}\frac{(-1)^nH_{2n+1}}{(2n+1)^2} =&\Im\sum^\infty_{n=1}\frac{H_n}{n^2}i^n\\ =&-\Im{\rm Li}_3(1-i)-\frac{\mathbf{G}}{2}\ln{2}-\frac{\pi}{16}\ln^2{2} \end{align} and \begin{align} \sum^\infty_{n=1}\frac{(-1)^nH_n}{(2n+1)^2} =&\int^1_0\frac{\ln{x}\ln(1+x^2)}{1+x^2}{\rm d}x\\ =&-2\int^\frac{\pi}{4}_0\left(\ln(\sin{x})-\ln(\cos{x})\right)\ln(\cos{x})\ {\rm d}x\\ =&-\frac{1}{8}\frac{\partial^2{\rm B}}{\partial a\partial b}\left(\frac{1}{2},\frac{1}{2}\right)+2\int^\frac{\pi}{4}_0\ln^2(\cos{x})\ {\rm d}x\\ =&2\Im{\rm Li}_3(1-i)-\mathbf{G}\ln{2}+\frac{3\pi^3}{32}+\frac{\pi}{8}\ln^2{2} \end{align} We have $$\mathscr{I}_2=4\Im{\rm Li}_3(1-i)+\mathbf{G}+\frac{5\pi^3}{32}+\frac{\pi}{4}\ln^2{2}-\frac{\pi^2}{16}-\frac{\pi}{4}\ln{2}$$


Evaluation of $\mathscr{I}_3$

$\mathscr{I}_3$ is rather straightforward to evaluate. \begin{align} \mathscr{I}_3 =&x\arctan^2{x}\ln(1+x^2)\Bigg{|}^1_0-\int^1_0\frac{2x\arctan{x}\ln(1+x^2)}{1+x^2}{\rm d}x-\int^1_0\frac{2x^2\arctan^2{x}}{1+x^2}{\rm d}x\\ =&\frac{\pi^2}{16}\ln{2}-\frac{1}{2}\ln^2(1+x^2)\arctan{x}\Bigg{|}^1_0+\frac{1}{2}\int^1_0\frac{\ln^2(1+x^2)}{1+x^2}{\rm d}x-2\int^1_0\arctan^2{x}\ {\rm d}x\\&+2\int^1_0\frac{\arctan^2{x}}{1+x^2}{\rm d}x\\ =&2\mathbf{G}+\frac{\pi^3}{96}+\frac{\pi^2}{16}\ln{2}-\frac{\pi}{8}\ln^2{2}-\frac{\pi^2}{8}-\frac{\pi}{2}\ln{2}+2\int^\frac{\pi}{4}_0\ln^2(\cos{x})\ {\rm d}x\\ =&2\Im{\rm Li}_3(1-i)-\mathbf{G}\ln{2}+2\mathbf{G}+\frac{\pi^3}{12}+\frac{\pi^2}{16}\ln{2}+\frac{\pi}{2}\ln^2{2}-\frac{\pi^2}{8}-\frac{\pi}{2}\ln{2} \end{align}


The closed form

Combining these results, we get \begin{align} \mathscr{I}=\Large{\boxed{\displaystyle \color{red}{-6\Im{\rm Li}_3(1-i)-\frac{11\pi^3}{48}-\frac{\pi}{4}\ln^2{2}}}} \end{align} as the closed form.


Samurai, this is for the second time you post problems that relate to me. First you posted this question here which is exactly similar with my rated problem on Brilliant.org. I have raised objection to mods but they can do nothing since your post doesn't violate any rules here. Okay, fine. I can accept their reason. Now you post this question which I believe it's taken from one of proposed problems in Brilliant Integration Contest - Season 1 that I held on Brilliant.org. The original problem was proposed by Jatin Yadav as PROBLEM 7 but a day later he deleted this problem and changed to another problem after no-one can solve it included himself. According to him, it's taken from here, on Math S.E. You may want to take a look there.

I tried to solve this problem for hours but no success. Here is my attempt:

Set $x=\tan y$, we get \begin{align} I&=\int_0^1\arctan^2x\,\ln\left(\frac{1+x^2}{2x^2}\right)\,dx\\ &=-\int_0^{\pi/4} \frac{y^2\ln\left(2\sin^2y\right)}{\cos^2y}\,dy\\ &=-2\int_0^{\pi/4} \frac{y^2\ln\left(1-\cos2y\right)}{1+\cos2y}\,dy\\ &=-\frac{1}{4}\int_0^{\pi/2} \frac{t^2\ln\left(1-\cos t\right)}{1+\cos t}\,dt\qquad\Rightarrow\qquad t=2y\\ \end{align}

Use integration by parts by taking $u=t^2$ and $dv=\dfrac{\ln\left(1-\cos t\right)}{1+\cos t}\,dt$, then \begin{align} v&=\int\frac{\ln\left(1-\cos t\right)}{1+\cos t}\,dt \end{align} Use integration by parts by taking $u=\ln\left(1-\cos t\right)$ and $dv=\dfrac{dt}{1+\cos t}$, by Weierstrass substitution: $x=\tan\left(\dfrac{t}{2}\right)$ then \begin{align} v=\int\frac{dt}{1+\cos t}=\int \,dx=\tan\left(\frac{t}{2}\right)=\frac{\sin t}{1+\cos t} \end{align} Hence \begin{align} \int\frac{\ln\left(1-\cos t\right)}{1+\cos t}\,dt &=\frac{\sin t}{1+\cos t}\ln\left(1-\cos t\right)-\int\frac{\sin t}{1+\cos t}\cdot\frac{\sin t}{1-\cos t}\,dt\\ &=\frac{\sin t}{1+\cos t}\ln\left(1-\cos t\right)-t \end{align} and \begin{align} I&=-\frac{1}{4}\left[\frac{t^2\sin t}{1+\cos t}\ln\left(1-\cos t\right)-t^3\right]_0^{\pi/2}+\frac{1}{2}\int_0^{\pi/2}\left[\frac{t\sin t}{1+\cos t}\ln\left(1-\cos t\right)-t^2\right]\,dt\\ &=\frac{\pi^3}{32}+\frac{1}{2}\int_0^{\pi/2}\frac{t\sin t}{1+\cos t}\ln\left(1-\cos t\right)\,dt-\frac{\pi^3}{48}\\ &=\frac{\pi^3}{96}+\frac{1}{2}\int_0^{\pi/2}\frac{t\sin t}{1+\cos t}\ln\left(1-\cos t\right)\,dt \end{align} Consider \begin{equation} I(a)=\int_0^{\pi/2} \frac{t\sin t}{1+\cos t}\ln\left(1-a\cos t\right)\,dt \end{equation} so that $I(0)=0$ and \begin{align} I'(a)&=-\int_0^{\pi/2} \frac{t\sin t\cos t}{(1-a\cos t)(1+\cos t)}\,dt\\ &=\frac{1}{1+a}\int_0^{\pi/2} \left(\frac{t\sin t}{1+\cos t}-\frac{t\sin t}{1-a\cos t}\right)\,dt\\ \end{align} Now consider \begin{equation} I(b)=\int_0^{\pi/2} \frac{t\sin t}{1+b\cos t}\,dt \end{equation} Use integration by parts by taking $u=t$ and $dv=\dfrac{\sin t}{1+b\cos t}\,dt$, then \begin{align} I(b)&= \frac{t\ln(1+b\cos t)}{b}\bigg|_0^{\pi/2}-\frac{1}{b}\int_0^{\pi/2}\ln(1+b\cos t)\,dt\\ &=-\frac{1}{b}\int_0^{\pi/2}\ln(1+b\cos t)\,dt \end{align} Consider \begin{equation} J(b)=\int_0^{\pi/2}\ln(1+b\cos t)\,dt \end{equation} so that $J(0)=0$ and \begin{align} J'(b)&=\int_0^{\pi/2} \frac{\cos t}{1+b\cos t}\,dt\\ &=\frac{1}{b}\int_0^{\pi/2} \left(1-\frac{1}{1+b\cos t}\right)\,dt\\ &=\frac{\pi}{2b}-\int_0^{\pi/2} \frac{dt}{1+b\cos t}\qquad\Rightarrow\qquad x=\tan\left(\frac{t}{2}\right)\\ &=\frac{\pi}{2b}-\int_0^{1} \frac{2}{1+b+(1-b)x^2}\,dx\qquad\Rightarrow\qquad x=\sqrt{\frac{1+b}{1-b}}\tan z\\ &=\frac{\pi}{2b}-\frac{2}{\sqrt{1-b^2}}\arctan\left(\sqrt{\frac{1-b}{1+b}}\right)\\ J(b)&=\frac{\pi}{2}\ln b-\int\frac{2}{\sqrt{1-b^2}}\arctan\left(\sqrt{\frac{1-b}{1+b}}\right)\,db\\ \end{align} Again we use integration by parts by taking $u=\arctan\left(\sqrt{\frac{1-b}{1+b}}\right)$ and $dv=\dfrac{2}{\sqrt{1-b^2}}$, we have \begin{align} J(b)&=\frac{\pi}{2}\ln b-2\arctan\left(\sqrt{\frac{1-b}{1+b}}\right)\arcsin b-\int\frac{\arcsin b}{1-b}\sqrt{\frac{1-b}{1+b}}\,db\\ &=\frac{\pi}{2}\ln b-2\arctan\left(\sqrt{\frac{1-b}{1+b}}\right)\arcsin b-\int\frac{\arcsin b}{\sqrt{1-b^2}}\,db\\ &=\frac{\pi}{2}\ln b-2\arctan\left(\sqrt{\frac{1-b}{1+b}}\right)\arcsin b-\frac{\arcsin^2 b}{2} \end{align} Therefore \begin{align} I'(a)&=\frac{\pi^2}{8(1+a)}-\frac{1}{a(1+a)}\left[\frac{\pi}{2}\ln (-a)-2\arctan\left(\sqrt{\frac{1+a}{1-a}}\right)\arcsin (-a)-\frac{\arcsin^2(-a)}{2}\right]\\ \end{align} From this step, I give up. Perhaps someone else want to continue it. Be my guest...


This is not an answer, but my approach suggests that the answer is

$$ I := \int_{0}^{1} \arctan^{2} x \log \left( \frac{x^{2}+1}{2x^{2}} \right) \, dx = \frac{19\pi^{3}}{192} + \frac{5\pi}{16}\log^{2}2 - 6 \Im \mathrm{Li}_{3}\left( \frac{1+i}{2} \right). $$


My approach is to write

$$ I = \int_{0}^{1} \arctan^{2} x \log \left( \frac{x^{2}+1}{2} \right) \, dx - 2\int_{0}^{1} \arctan^{2} x \log x \, dx, $$

introduce function $f(z) = \log \left( \frac{1+iz}{\sqrt{2}} \right)$ and write

$$ \arctan^{2} x \log \left( \frac{x^{2}+1}{2} \right) = -\frac{1}{4} ( f(x) - f(-x))^{2}(f(x) + f(-x)). $$

This allows to write, with a bit help of complex analysis,

$$ \int_{0}^{1} \arctan^{2} x \log \left( \frac{x^{2}+1}{2} \right) \, dx = - \frac{\sqrt{2}}{4} \int_{-\pi/4}^{\pi/4} \theta^{2}\log(\sqrt{2}e^{i\theta} - 1) e^{i\theta} \, d\theta, $$

which seems more tractable than the original one. But I was stuck here.