Another beautiful arctan integral $\int_{1/2}^1 \frac{\arctan\left(\frac{1-x^2}{7 x^2+10x+7}\right)}{1-x^2} \, dx$

Substituting $x\to\frac{1-x}{1+x}$ is usually a first reaction of mine. Here it works surprisingly well: the integral is equivalent to $$I=\int_{1/2}^1 \frac{\tan^{-1}\left(\frac{1-x^2}{7 x^2+10x+7}\right)}{1-x^2} \, dx=\frac12\int_0^{\frac13}\frac{\tan^{-1}\left(\frac{x}{x^2+6}\right)}{x} dx.$$

Integrating by parts, $$I=-\frac12\ln3 \tan^{-1}\left(\frac{3}{55}\right)-\frac12\int_0^{\frac13} \frac{6-x^2}{x^4+13x^2+36}\,\ln x \, dx$$

This looks managable. We can decompose $\displaystyle \, \frac{6-x^2}{x^4+13x^2+36}=\frac{2}{x^2+4}-\frac{3}{x^2+9} $

so that $$\int_0^{\frac13} \frac{6-x^2}{x^4+13x^2+36}\,\ln x \, dx=2\int_0^{\frac13} \frac{\ln x}{x^2+2^2}\,dx-3\int_0^{\frac13}\frac{\ln x}{x^2+3^2}\,dx$$

Now these integrals may also be done by partial fraction (whence emerge the complex stuff) and the antiderivative of the remaining parts is easily found in terms of logarithms and dilogarithms..

So the logarithm and $tan^{-1}$ cancel at the end, leaving:

$$ I=\frac12\Im\operatorname{Li_2}\left(\frac1{9i}\right)-\frac12\Im\operatorname{Li_2}\left(\frac1{6i}\right)$$

Edit

The final cancellation and Chris' comment below suggest a detour to the integration by parts and partial fractions decomposition:

We just notice that $\displaystyle \tan^{-1}\left(\frac{x}{x^2+6}\right)=\tan^{-1}\left(\frac{x}{2}\right)-\tan^{-1}\left(\frac{x}{3}\right)$, whence

$$I=\frac12\int_0^{\frac13}\frac{\tan^{-1}\left(\frac{x}{x^2+6}\right)}{x} dx=\frac12\int_0^{\frac13}\frac{\tan^{-1}\left(\frac{x}{2}\right)-\tan^{-1}\left(\frac{x}{3}\right)}{x}dx\\=\frac12\int_0^{\frac16}\frac{\tan^{-1}x}{x}dx-\frac12\int_0^{\frac19}\frac{\tan^{-1}x}{x}dx=\frac{1}{2}\operatorname{Ti}_2\left(\frac{1}{6}\right)-\frac12\operatorname{Ti}‌​_2\left(\frac{1}{9}\right).$$


Exploiting integration by parts, the problem boils down to computing:

$$ \int_{1/2}^{1}\left(\log(1+x)-\log(1-x)\right)\left(\frac{3}{5x^2+8x+5}-\frac{4}{5x^2+6x+5}\right)\,dx $$ and by partial fraction decomposition that is equivalent to computing: $$ I_{\pm}(\zeta)=\int_{1/2}^{1}\frac{\log(1\pm x)}{x-\zeta}\,dx $$ with $\zeta\in\left\{-\frac{3}{5}-\frac{4i}{5},-\frac{3}{5}+\frac{4i}{5},-\frac{4}{5}-\frac{3i}{5},-\frac{4}{5}+\frac{3i}{5}\right\} $. We may check that: $$ \int \frac{\log(1+x)}{x-a} = \log(1+x)\log\left(1-\frac{1+x}{1+a}\right)+\text{Li}_2\left(\frac{1+x}{1-a}\right) $$ holds by differentiation to compute the closed form of the original integral in terms of dilogarithms and products of logarithms only.