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

Expanding the inverse tangent in logarithms, writing $\frac{x}{1+x^2}=\Re\frac1{x-i}$, and expanding $\log(1-x^2)=\log(1-x)+\log(1+x)$, each of the resulting four indefinite integrals has a closed form. Each term is amenable to automatic integration, (an example), which means that after taking limits, slogging through simplifications and special values, such as those found here, the closed form can be computed.

For example, for the term above, $$ \int_0^1\frac{\log(1-ix)\log(1-x)}{x-i}\,dx = -\frac{K\pi }{4}-\frac{17 i \pi ^3}{384}-\frac{1}{2} i K \log2+\frac{13}{192} \pi ^2 \log2+\frac{3}{32} i \pi (\log2)^2-\frac{(\log2)^3}{48}+3 \,\text{Li}_3({\textstyle\frac{1+i}{2}})-\frac{45 \zeta(3)}{32}. $$

Now, the integrand of the integral in question is the real part of the sum $$ \frac i2 \frac{\log(1-ix)\log(1-x)}{x-i} - \frac i2\frac{\log(1+i x)\log(1-x)}{x-i}+\frac i2\frac{\log(1-ix)\log(1+x)}{x-i}-\frac i2\frac{\log(1+ix)\log(1+x)}{x-i}, $$ where each term has a closed form for its integral, as above, in terms of $\pi$, $K$, $\log 2$ and $\text{Li}_3$.

After sufficient simplification, the integral of that sum is $$\begin{aligned} &\int_0^1 \frac{\arctan x\log(1-x^2)}{x-i}\,dx = \\ &-\frac{1}{4} i K\pi -\frac{\pi ^3}{48}+\frac{1}{32} i \pi ^2 \log2-\frac{1}{8} \pi (\log2)^2+K \log2+\frac{7}{32} i \zeta(3), \end{aligned}$$ of which the real part gives the answer $$ -\frac{\pi ^3}{48}-\frac{1}{8} \pi (\log2)^2+ K \log2$$


\begin{align} \displaystyle I&=\int_0^1 \dfrac{x\ln(1-x^2)\arctan x}{1+x^2}dx\\ \displaystyle &=\int_0^1 \dfrac{x\ln(1+x)\arctan x}{1+x^2}dx+\int_0^1 \dfrac{x\ln(1-x)\arctan x}{1+x^2}dx \end{align}

Let, \begin{equation} \displaystyle F=\int_0^1 \dfrac{x\ln(1-x)\arctan x}{1+x^2}dx \end{equation}

Perform the change of variable $y=\dfrac{1-x}{1+x}$ in the latter integral,

$\displaystyle F=\int_0^1 \dfrac{\Big(\ln 2-y\ln 2+(1-y)\ln y+(y-1)\ln (1+y)\Big)\arctan\left(\dfrac{1-y}{1+y}\right)}{y^3+y^2+y+1}dy$

For $y\neq -1$, define the function $H$, \begin{equation} \displaystyle H(y)=\dfrac{\Big(\ln 2-y\ln 2+(1-y)\ln y+(y-1)\ln (1+y)\Big)\arctan\left(\dfrac{1-y}{1+y}\right)}{y^3+y^2+y+1} \end{equation}

Since for $0<y<1$,

\begin{equation} \arctan\left(\dfrac{1-y}{1+y}\right)=\dfrac{\pi}{4}-\arctan y \end{equation}

and, for $y\neq 1$,

$\dfrac{1}{y^3+y^2+y+1}=\dfrac{1}{(1+y)(1+y^2)}=\dfrac{1}{2(1+y)}+\dfrac{1-y}{2(1+y^2)}$

$\dfrac{y}{y^3+y^2+y+1}=\dfrac{y}{(1+y)(1+y^2)}=\dfrac{1+y}{2(1+y^2)}-\dfrac{1}{2(1+y)}$

then, for $y\neq -1$,

\begin{align*} H(y)&=\dfrac{\Big(\big(-\ln 2-\ln y+\ln(1+y)\big)y+\big(\ln 2+\ln y-\ln(1+y)\big)\Big)\Big(\dfrac{\pi}{4}-\arctan y\Big)}{y^3+y^2+y+1}\\ &=-\dfrac{y\arctan y\ln(1+y)}{1+y^2}+\dfrac{\arctan y\ln(1+y)}{1+y}+ \dfrac{\pi y\ln(1+y)}{4(1+y^2)}-\dfrac{\pi \ln(1+y)}{4(1+y)}+\\ &\dfrac{y\arctan y\ln y}{1+y^2}-\dfrac{\arctan y\ln y}{1+y}-\dfrac{\pi y\ln y}{4(1+y^2)}+\dfrac{\pi \ln y}{4(1+y)}+\dfrac{y\ln 2\arctan y}{1+y^2}-\\ &\dfrac{\ln 2\arctan y}{1+y}-\dfrac{\pi y\ln 2}{4(1+y^2)}+\dfrac{\pi \ln 2}{4(1+y)} \end{align*}

Let, \begin{align*} \displaystyle A&=\int_0^1 \dfrac{x\arctan x\ln x}{1+x^2}dx\\ \displaystyle B&=\int_0^1 \dfrac{\ln x \ln(1+x^2)}{1+x^2}dx\\ \displaystyle C&=\int_0^1 \dfrac{\arctan x\ln x}{1+x}dx\\ \displaystyle J&=\int_0^1\dfrac{\arctan x\ln(1+x)}{1+x}dx \end{align*}

Thus,

\begin{equation} (1)\boxed{\displaystyle I=A-C+J-\dfrac{5}{384}\pi^3-\dfrac{7}{32}\pi\left(\ln 2\right)^2+\dfrac{1}{2}G\ln 2} \end{equation}

$G$, being the Catalan constant.

$$\int_0^1 \dfrac{\arctan x\ln(1-x)}{1+x}dx-\int_0^1\dfrac{\arctan x\ln(1+x)}{1+x}dx=\int_0^1 \dfrac{\arctan x\ln\left(\dfrac{1-x}{1+x}\right)}{1+x}dx$$

Perform the change of variable $y=\dfrac{1-x}{1+x}$,

Therefore,

\begin{align} \int_0^1 \dfrac{\arctan x\ln(1-x)}{1+x}dx-\int_0^1\dfrac{\arctan x\ln(1+x)}{1+x}dx&=\dfrac{\pi}{4}\int_0^1\dfrac{\ln x}{1+x}dx-\int_0^1\dfrac{\ln x\arctan x}{1+x}dx\\ &=-\dfrac{\pi^3}{48}-C \end{align}

Therefore,

$$(2)\boxed{\int_0^1 \dfrac{\arctan x\ln(1-x)}{1+x}dx=J-\dfrac{\pi^3}{48}-C}$$

Perform the change of variable $y=1-x$,

$$\int_0^1 \dfrac{\arctan x\ln(1-x)}{1+x}dx=\int_0^1 \dfrac{\arctan(1-x) \ln(x)}{2-x}dx$$

Define the function $R$ on $[0;1]$,

$$R(x)=\int_0^x \dfrac{\ln t}{2-t}dt=\int_0^1 \dfrac{x\ln(tx)}{2-tx}dt$$

\begin{align} \int_0^1 \dfrac{\arctan(1-x) \ln(x)}{2-x}dx&=\Big[R(x)\arctan(1-x)\Big]_0^1+\int_0^1\int_0^1\dfrac{x\ln(tx)}{(2-tx)(1+(1-x)^2)}dtdx-\int_0^1\left[\dfrac{\ln x\ln(2-tx)}{1+(1-x)^2}\right]_{t=0}^{t=1}dx+\\ &\displaystyle\int_0^1\left[\dfrac{\ln t\ln(x^2-2x+2)}{2(1+(1-t)^2)}-\dfrac{\ln t\ln(2-tx)}{1+(1-t)^2}-\dfrac{t\ln t\arctan(x-1)}{1+(1-t)^2}+\dfrac{\ln t\arctan(x-1)}{1+(1-t)^2}\right]_{x=0}^{x=1}dt\\ &=\ln 2\int_0^1\dfrac{\ln x}{1+(1-x)^2}dx-\int_0^1 \dfrac{\ln x\ln(2-x)}{1+(1-x)^2}dx-\dfrac{\ln 2}{2}\int_0^1 \dfrac{\ln t}{1+(1-t)^2}dt+\\ &\ln 2\int_0^1\dfrac{\ln t}{1+(1-t)^2}dt-\int_0^1\dfrac{\ln t\ln(2-t)}{1+(1-t)^2}dt-\dfrac{\pi}{4}\int_0^1 \dfrac{t\ln t}{1+(1-t)^2}dt+\dfrac{\pi}{4}\int_0^1 \dfrac{\ln t}{1+(1-t)^2}dt \end{align}

Perform the change of variable $y=1-x$,

\begin{align} \displaystyle \int_0^1 \dfrac{\arctan(x) \ln(1-x)}{1+x}dx&=\ln 2\int_0^1\dfrac{\ln(1-x)}{1+x^2}dx-\int_0^1 \dfrac{\ln (1-x)\ln(1+x)}{1+x^2}dx-\dfrac{\ln 2}{2}\int_0^1 \dfrac{\ln (1-t)}{1+t^2}dt+\\ &\ln 2\int_0^1\dfrac{\ln(1-t)}{1+t^2}dx-\int_0^1 \dfrac{\ln (1-t)\ln(1+t)}{1+t^2}dt-\dfrac{\pi}{4}\int_0^1\dfrac{(1-t)\ln(1-t)}{1+t^2}dt+\\ &\dfrac{\pi}{4}\int_0^1 \dfrac{\ln (1-t)}{1+t^2}dt\\ \displaystyle &=\dfrac{3}{2}\ln 2\int_0^1 \dfrac{\ln (1-t)}{1+t^2}dt+\dfrac{\pi}{4}\int_0^1 \dfrac{t\ln (1-t)}{1+t^2}dt-2\int_0^1 \dfrac{\ln (1-x)\ln(1+x)}{1+x^2}dx\\ \displaystyle&=\dfrac{3}{2}\ln 2\left(\dfrac{\pi\ln 2}{8}-G\right)+\dfrac{\pi}{4}\left(\dfrac{(\ln 2)^2}{8}-\dfrac{5\pi^2}{96}\right)-2\int_0^1 \dfrac{\ln (1-x)\ln(1+x)}{1+x^2}dx \end{align}

Thus,

\begin{equation*} (3)\boxed{\displaystyle \int_0^1 \dfrac{\arctan(x) \ln(1-x)}{1+x}dx=\dfrac{7}{32}\pi(\ln 2)^2-\dfrac{3}{2}G\ln 2-\dfrac{5\pi^3}{384}-2\int_0^1 \dfrac{\ln (1-x)\ln(1+x)}{1+x^2}dx\\} \end{equation*}

Apply the integration by parts formula in the following integral,

\begin{equation*} \displaystyle \int_0^1 \dfrac{(\ln(1+x))^2}{1+x^2}dx=\Big[\arctan x\left(\ln\left(1+x\right)\right)^2\Big]_0^1-2\int_0^1 \dfrac{\arctan x\ln(1+x)}{1+x}dx \end{equation*}

\begin{equation*} (4)\boxed{\displaystyle \int_0^1 \dfrac{(\ln(1+x))^2}{1+x^2}dx=\dfrac{\pi}{4}(\ln 2)^2-2J} \end{equation*}

Perform the change of variable $y=\dfrac{1-x}{1+x}$ in the following integral,

\begin{align} \displaystyle \int_0^1 \dfrac{\ln(1+x)\ln x}{1+x^2}dx&=\int_0^1\dfrac{(\ln(1+x))^2}{1+x^2}dx-\int_0^1 \dfrac{\ln(1-x)\ln(1+x)}{1+x^2}dx+\ln 2\int_0^1 \dfrac{\ln(1-x)}{1+x^2}dx-\\ &\ln 2\int_0^1 \dfrac{\ln(1+x)}{1+x^2}dx \end{align}

Therefore,

\begin{align*} \displaystyle \int_0^1 \dfrac{\ln(1-x)\ln(1+x)}{1+x^2}dx&=\int_0^1\dfrac{(\ln(1+x))^2}{1+x^2}dx-\int_0^1 \dfrac{\ln(1+x)\ln x}{1+x^2}dx+\ln 2\int_0^1 \dfrac{\ln\left(\tfrac{1-x}{1+x}\right)}{1+x^2}dx\\ &=\int_0^1\dfrac{(\ln(1+x))^2}{1+x^2}dx-\int_0^1 \dfrac{\ln(1+x)\ln x}{1+x^2}dx-G\ln 2\\ \end{align*}

Thus, $$(5)\boxed{\displaystyle \int_0^1 \dfrac{\ln(1-x)\ln(1+x)}{1+x^2}dx=\dfrac{\pi}{4}(\ln 2)^2-G\ln 2-\int_0^1 \dfrac{\ln(1+x)\ln x}{1+x^2}dx-2J}$$

Plug (5) into (3), it follows,

\begin{align*} \displaystyle \int_0^1 \dfrac{\arctan(x) \ln(1-x)}{1+x}dx=-\dfrac{9}{32}\pi(\ln 2)^2+\dfrac{1}{2}G\ln 2-\dfrac{5\pi^3}{384}+2\int_0^1 \dfrac{\ln x\ln(1+x)}{1+x^2}dx+4J \end{align*}

Using (2), it follows that,

\begin{equation*} (6)\boxed{\displaystyle J=\dfrac{\pi^3}{384}-\dfrac{G\ln 2}{3}+\dfrac{3}{32}\pi(\ln 2)^2-\dfrac{2}{3}\int_0^1\dfrac{\ln x\ln(1+x)}{1+x^2}dx} \end{equation*}

From Evaluating $\int_0^{\pi/4} \ln(\tan x)\ln(\cos x-\sin x)dx=\frac{G\ln 2}{2}$ ,

$$\displaystyle \int_0^1\dfrac{\ln x\ln(1+x)}{1+x^2}dx=A-\dfrac{1}{2}B-C-2G\ln 2+\beta(3)$$

and, $\displaystyle \beta(3)=\sum_{n=1}^{\infty} \dfrac{(-1)^n}{(2n+1)^3}$

It follows that,

$$(7)\boxed{J=\dfrac{\pi^3}{384}+G\ln 2+\dfrac{3\pi\left(\ln 2\right)^2}{32}-\dfrac{2}{3}A+\dfrac{1}{3}B+\dfrac{2}{3}C-\dfrac{2}{3}\beta(3)}$$

From Evaluating $\int_0^{\pi/4} \ln(\tan x)\ln(\cos x-\sin x)dx=\frac{G\ln 2}{2}$ ,

$$(8)\boxed{A=\dfrac{1}{64}\pi^3-B-G\ln 2}$$

It follows that,

$$(9)\boxed{J=\dfrac{5}{3}G\ln 2-\dfrac{\pi^3}{128}+\dfrac{3\pi\left(\ln 2\right)^2}{32}+B+\dfrac{2}{3}C-\dfrac{2}{3}\beta(3)}$$

Plug (8) and (9) into (1) it follows that,

$$(10)\boxed{I=-\dfrac{1}{192}\pi^3+\dfrac{7}{6}G\ln 2-\dfrac{1}{8}\pi\left(\ln 2\right)^2-\dfrac{1}{3}C-\dfrac{2}{3}\beta(3)}$$

From Evaluating $\int_0^1 \frac{\arctan x \log x}{1+x}dx$ ,

$$C=\dfrac{G\ln 2}{2}-\dfrac{\pi^3}{64}$$

and, knowing that $\beta(3)=\dfrac{\pi^3}{32}$,

it follows that,

$$\boxed{I=G\ln 2-\dfrac{1}{48}\pi^3-\dfrac{1}{8}\pi\left(\ln 2\right)^2}$$