Evaluating $\int_0^1\frac{\arctan x\ln\left(\frac{2x^2}{1+x^2}\right)}{1-x}dx$

Update: the problem and solution will be part of a new paper soon.


A solution by Cornel Ioan Valean

Let's denote the main integral by $\mathcal{I}$, and then we have

$$\mathcal{I=}\int_0^1\frac{(\pi/4-\arctan((1-x)/(1+x)))\log\left(\frac{2x^2}{1+x^2}\right)}{1-x}\textrm{d}x$$ $$=\underbrace{\frac{\pi}{4}\int_0^1\frac{\log\left(\frac{2x^2}{1+x^2}\right)}{1-x}\textrm{d}x}_{\displaystyle J}- \underbrace{\int_0^1\frac{\arctan((1-x)/(1+x))\log\left(\frac{2x^2}{1+x^2}\right)}{1-x}\textrm{d}x}_{\displaystyle K}. \tag1$$

The integral $J$ easily reduces to known integrals. If we integrate by parts, we get

$$J=\frac{\pi}{2}\underbrace{\int_0^1\frac{\log (1-x)}{x}\textrm{d}x}_{\displaystyle -\pi^2/6}-\frac{\pi}{2}\underbrace{\int_0^1\frac{x \log (1-x)}{1+x^2}\textrm{d}x}_{\displaystyle 1/8 (\log^2(2)-5\pi^2/12 )}=-\frac{\pi}{16}\log^2(2)-\frac{11}{192}\pi^3,\tag2$$

where the last integral also appears in the book, (Almost) Impossible Integrals, Sums, and Series, page $8$.

For the integral $K$, a bit of magic will be necessary. The first key observation is that

$$K=\Im \biggr\{\int_0^1\frac{\log^2(x (1 + x)/(1 + x^2) + i x (1 - x)/(1 + x^2))}{1-x}\textrm{d}x\biggr\}.$$

Now, we may consider the generalization $$G(a)=\int_0^1\frac{\displaystyle\log^2\left(\frac{ (1+a) x}{1 + a x}\right)}{1- x}\textrm{d}x,$$ and make the variable change $\displaystyle x\mapsto \frac{1-x}{1+a x}$ that leads to $$G(a)=\int_0^1 \frac{\log^2(1-x)}{x}\textrm{d}x-a\int_0^1\frac{\displaystyle\log^2(1-x)}{1+ a x}\textrm{d}x,$$ and letting the variable change $x\mapsto 1-x$ in both integrals, we finally get $$G(a)=\int_0^1 \frac{\log^2(x)}{1-x}\textrm{d}x-\frac{a}{1+a}\int_0^1\frac{\displaystyle\log^2(x)}{1 -a/(1+a) x}\textrm{d}x=2 \zeta(3)-2\operatorname{Li}_3\left(\frac{a}{1+a}\right),$$ where in the calculations we also needed the integral, $\displaystyle \int_0^1 \frac{a \log^2(x)}{1-a x}\textrm{d}x=2\operatorname{Li}_3(a)$, that appears in a generalized form in the same book, (Almost) Impossible Integrals, Sums, and Series, page $4$.

A first note: The variable change $\displaystyle x\mapsto \frac{x}{1+a-ax}$ would work more directly, and no need for a second variable change.

Then, based on the previous result we make the second key observation, $$K=\Im \{G(i)\}.$$

Thus,

$$\small K=\Im \biggr \{\int_0^1\frac{\log^2(x (1 + x)/(1 + x^2) + i x (1 - x)/(1 + x^2))}{1-x}\textrm{d}x \biggr \}=2 \Im \biggr\{\operatorname{Li}_3\left(\frac{1+i}{2}\right)\biggr\}. \tag3 $$

At last, combining $(1)$, $(2)$, and $(3)$, we conclude that

$$\mathcal{I}=-\frac{\pi}{16}\log^2(2)-\frac{11}{192}\pi^3+2 \Im \biggr\{\operatorname{Li}_3\left(\frac{1+i}{2}\right)\biggr\}.$$

End of story

A second note: no software needed for calculating such integrals, or far more advanced ones alike.

Another nice example of an integral calculated by similar means

$$\int_0^1 \frac{1}{x(1+x)}\left(12 \log \left(\frac{(1-x)^2}{1+x^2}\right) \arctan^2(x)-\log ^3\left(\frac{(1-x)^2}{1+x^2}\right)\right) \textrm{d}x$$ $$=\frac{2043 }{64}\zeta (4)+\frac{15}{8} \log ^2(2)\zeta (2)-\frac{1}{2} \log ^4(2)-15 \operatorname{Li}_4\left(\frac{1}{2}\right).$$


Some generalizations. Enjoy!

  • $\small \int_0^1 \frac{\log ^3\left(\frac{2 x^2}{x^2+1}\right) \tan ^{-1}(x)}{1-x} \, dx=-\frac{192}{19} \sqrt{2} \, _6F_5\left(\frac{1}{2},\frac{1}{2},\frac{1}{2},\frac{1}{2},\frac{1}{2},\frac{1}{2};\frac{3}{2},\frac{3}{2},\frac{3}{2},\frac{3}{2},\frac{3}{2};\frac{1}{2}\right)-\frac{15 }{19456}\pi \, _7F_6\left(1,1,1,1,1,\frac{3}{2},\frac{3}{2};2,2,2,2,2,2;1\right)+\frac{105 C \zeta (3)}{16}-\frac{3 \pi C^2}{2}-\frac{3}{8} \pi ^2 C \log (2)-\frac{3}{4} \pi ^2 \Im\left(\text{Li}_3\left(\frac{1}{2}+\frac{i}{2}\right)\right)+\frac{480}{19} \Im\left(\text{Li}_5\left(\frac{1}{2}+\frac{i}{2}\right)\right)+\frac{39}{8} \pi \text{Li}_4\left(\frac{1}{2}\right)+\frac{1905 \pi \zeta (3) \log (2)}{1216}-\frac{881 \pi ^5}{29184}+\frac{203 \pi \log ^4(2)}{1216}-\frac{49 \pi ^3 \log ^2(2)}{2432}$

  • $\small \int_0^1 \frac{\log \left(\frac{2 x^2}{x^2+1}\right) \tan ^{-1}(x)^3}{1-x} \, dx=-\frac{48}{19} \sqrt{2} \, _6F_5\left(\frac{1}{2},\frac{1}{2},\frac{1}{2},\frac{1}{2},\frac{1}{2},\frac{1}{2};\frac{3}{2},\frac{3}{2},\frac{3}{2},\frac{3}{2},\frac{3}{2};\frac{1}{2}\right)-\frac{15 }{77824}\pi \, _7F_6\left(1,1,1,1,1,\frac{3}{2},\frac{3}{2};2,2,2,2,2,2;1\right)+\frac{105 C \zeta (3)}{64}-\frac{3 \pi C^2}{8}-\frac{3}{32} \pi ^2 C \log (2)+\frac{3}{16} \pi ^2 \Im\left(\text{Li}_3\left(\frac{1}{2}+\frac{i}{2}\right)\right)-\frac{108}{19} \Im\left(\text{Li}_5\left(\frac{1}{2}+\frac{i}{2}\right)\right)+\frac{9}{32} \pi \text{Li}_4\left(\frac{1}{2}\right)+\frac{1905 \pi \zeta (3) \log (2)}{4864}+\frac{537 \pi ^5}{48640}+\frac{51 \pi \log ^4(2)}{4864}+\frac{103 \pi ^3 \log ^2(2)}{9728}$

  • $\scriptsize \int_0^1 \frac{\log ^2\left(\frac{2 x^2}{x^2+1}\right) \tan ^{-1}(x)^2}{1-x} \, dx=-\frac{1}{8} \, _7F_6\left(1,1,1,1,1,1,\frac{5}{4};\frac{3}{2},2,2,2,2,2;1\right)+\frac{15 }{19456}\pi \, _7F_6\left(1,1,1,1,1,\frac{3}{2},\frac{3}{2};2,2,2,2,2,2;1\right)+\frac{192}{19} \sqrt{2} \, _6F_5\left(\frac{1}{2},\frac{1}{2},\frac{1}{2},\frac{1}{2},\frac{1}{2},\frac{1}{2};\frac{3}{2},\frac{3}{2},\frac{3}{2},\frac{3}{2},\frac{3}{2};\frac{1}{2}\right)+4 C \Im\left(\text{Li}_3\left(\frac{1}{2}+\frac{i}{2}\right)\right)-\frac{21 C \zeta (3)}{8}+\frac{\pi ^3 C}{96}+\pi C^2+\frac{1}{6} C \log ^3(2)+\frac{3}{8} \pi C \log ^2(2)+2 C^2 \log (2)-\frac{5}{24} \pi ^2 C \log (2)-2 \pi \Im\left(\text{Li}_4\left(\frac{1}{2}+\frac{i}{2}\right)\right)+\frac{584}{19} \Im\left(\text{Li}_5\left(\frac{1}{2}+\frac{i}{2}\right)\right)+\pi \log (2) \Im\left(\text{Li}_3\left(\frac{1}{2}+\frac{i}{2}\right)\right)-\frac{3 \text{Li}_5\left(\frac{1}{2}\right)}{4}-\frac{211 \pi ^2 \zeta (3)}{768}-\frac{3317 \zeta (5)}{512}+\frac{7}{8} \zeta (3) \log ^2(2)+\frac{89}{304} \pi \zeta (3) \log (2)+\frac{1}{64} \pi \zeta \left(4,\frac{1}{4}\right)-\frac{1}{64} \pi \zeta \left(4,\frac{3}{4}\right)+\frac{1}{32} \zeta \left(4,\frac{1}{4}\right) \log (2)-\frac{1}{32} \zeta \left(4,\frac{3}{4}\right) \log (2)-\frac{15697 \pi ^5}{145920}+\frac{\log ^5(2)}{120}+\frac{3}{608} \pi \log ^4(2)-\frac{35}{576} \pi ^2 \log ^3(2)-\frac{175 \pi ^3 \log ^2(2)}{1216}-\frac{1307 \pi ^4 \log (2)}{23040}$

  • $\scriptsize \int_0^1 \frac{\log ^4\left(\frac{2 x^2}{x^2+1}\right)}{1-x} \, dx=-3 \, _7F_6\left(1,1,1,1,1,1,\frac{5}{4};\frac{3}{2},2,2,2,2,2;1\right)+\frac{45 \pi }{2432}\, _7F_6\left(1,1,1,1,1,\frac{3}{2},\frac{3}{2};2,2,2,2,2,2;1\right)+\frac{4608}{19} \sqrt{2} \, _6F_5\left(\frac{1}{2},\frac{1}{2},\frac{1}{2},\frac{1}{2},\frac{1}{2},\frac{1}{2};\frac{3}{2},\frac{3}{2},\frac{3}{2},\frac{3}{2},\frac{3}{2};\frac{1}{2}\right)+96 C \Im\left(\text{Li}_3\left(\frac{1}{2}+\frac{i}{2}\right)\right)-63 C \zeta (3)-\frac{\pi ^3 C}{4}+24 \pi C^2+4 C \log ^3(2)+9 \pi C \log ^2(2)+48 C^2 \log (2)-5 \pi ^2 C \log (2)+48 \pi \Im\left(\text{Li}_4\left(\frac{1}{2}+\frac{i}{2}\right)\right)+\frac{14016}{19} \Im\left(\text{Li}_5\left(\frac{1}{2}+\frac{i}{2}\right)\right)+24 \pi \log (2) \Im\left(\text{Li}_3\left(\frac{1}{2}+\frac{i}{2}\right)\right)-78 \text{Li}_5\left(\frac{1}{2}\right)-\frac{35 \pi ^2 \zeta (3)}{4}+\frac{1605 \zeta (5)}{64}+21 \zeta (3) \log ^2(2)+\frac{267}{38} \pi \zeta (3) \log (2)+\frac{21}{64} \pi \zeta \left(4,\frac{1}{4}\right)-\frac{21}{64} \pi \zeta \left(4,\frac{3}{4}\right)+\frac{3}{4} \zeta \left(4,\frac{1}{4}\right) \log (2)-\frac{3}{4} \zeta \left(4,\frac{3}{4}\right) \log (2)-\frac{15697 \pi ^5}{6080}+\frac{3 \log ^5(2)}{5}+\frac{9}{76} \pi \log ^4(2)-\frac{13}{8} \pi ^2 \log ^3(2)-\frac{525}{152} \pi ^3 \log ^2(2)-\frac{277}{320} \pi ^4 \log (2)$