Integral $\int_0^1 \frac{\arctan x}{x^2-x-1}dx$

Here is one approach. As a warning, the final answer I find is not pretty.

Let $$I = \int_0^1 \frac{\tan^{-1} x}{x^2 -x - 1} \, dx.$$ Start by using a self-similar substitution of $$x = \frac{1 - u}{1 + u}, \,\, dx = -\frac{2}{(1 + u)^2} \, du.$$ So , after having reverted the dummy variable $u$ back to $x$, we have $$I = 2 \int_0^1 \frac{\tan^{-1} \left (\frac{1 - x}{1 + x} \right )}{x^2 - 4x - 1} \, dx.$$ Noting that for $0 < x < 1$ $$\tan^{-1} \left (\frac{1 - x}{1 + x} \right ) = \frac{\pi}{4} - \tan^{-1} x,$$ then \begin{align} I &= \frac{\pi}{2} \int_0^1 \frac{dx}{x^2 - 4x - 1} - 2 \int_0^1 \frac{\tan^{-1} x}{x^2 - 4x - 1} \, dx\\ &= -\frac{\pi}{2 \sqrt{5}} \coth^{-1} \left (\frac{3}{\sqrt{5}} \right ) - 2 J, \end{align} where $$J = \int_0^1 \frac{\tan^{-1} x}{x^2 - 4x - 1} \, dx.$$

To find $J$ we begin by noting that $\tan^{-1} x = \operatorname{Im} \ln (1 + ix)$. Thus $$J = \operatorname{Im} \int_0^1 \frac{\ln (1 + ix)}{x^2 - 4x - 1} \, dx.$$ Making a substitution of $t = 1 + ix$ we have $$J = - \operatorname{Re} \int_1^{1+i} \frac{\ln t}{(t - \alpha)(t - \beta)} \, dt,$$ where $\alpha = 1 + i(2 - \sqrt{5})$ and $\beta = 1 + i(2 + \sqrt{5})$. After performing a partial fraction decomposition we are left with $$J = \frac{1}{2 \sqrt{5}} \operatorname{Im} \left [\int_1^{1 + i} \frac{\ln t}{\alpha - t} \, dt - \int_1^{1 + i} \frac{\ln t}{\beta - t} \, dt \right ].$$ Now, as $$\int \frac{\ln x}{z - x} \, dx = - \ln \left (1 - \frac{x}{z} \right ) \ln x - \operatorname{Li}_2 \left (\frac{x}{z} \right ),$$ (for a proof of this result see the appendix below), one has $$J = \frac{1}{2 \sqrt{5}} \operatorname{Im} \left [\ln (1 + i) \ln \left (\frac{\alpha}{\beta} \cdot \frac{\beta - 1 - i}{\alpha - i - i} \right ) + \operatorname{Li}_2 \left (\frac{1}{\alpha} \right ) - \operatorname{Li}_2 \left (\frac{1}{\beta} \right ) + \operatorname{Li}_2 \left (\frac{1 + i}{\beta} \right ) - \operatorname{Li}_2 \left (\frac{1 + i}{\alpha} \right ) \right ]$$ or after performing a huge amount of algebra \begin{align} J &= \frac{\pi}{8 \sqrt{5}} \ln (\sqrt{5} - 1) + \frac{1}{2 \sqrt{5}} \operatorname{Im} \left [\operatorname{Li}_2 \left (\frac{1}{2} + \frac{1}{\sqrt{5}}+ \frac{i}{2 \sqrt{5}} \right ) - \operatorname{Li}_2 \left (\frac{1}{2} - \frac{1}{\sqrt{5}} - \frac{i}{2 \sqrt{5}} \right ) \right.\\ & \quad+ \left. \operatorname{Li}_2 \left (\frac{1}{2} -\frac{1}{2 \sqrt{5}} - i \left (\frac{3}{2 \sqrt{5}} - \frac{1}{2} \right ) \right ) - \operatorname{Li}_2 \left (\frac{1}{2} +\frac{1}{2 \sqrt{5}} + i \left (\frac{3}{2 \sqrt{5}} + \frac{1}{2} \right ) \right ) \right ]\\ &= \frac{\pi}{8 \sqrt{5}} \ln (\sqrt{5} - 1) + \frac{1}{2 \sqrt{5}} \operatorname{Im} \frak{w}, \end{align} where $\frak{w}$ is the term containing the four dilogarithms with complex arguments. Thus $$\int_0^1 \frac{\tan^{-1} x}{x^2 - x - 1} \, dx = -\frac{\pi}{4 \sqrt{5}} \left (\ln 2 + \sinh^{-1} (2) \right ) - \frac{1}{\sqrt{5}} \operatorname{Im} \frak{w}.$$ Note that as $\operatorname{Im} {\frak{w}} = -0.8363170651979\ldots$ we see that $I \approx -0.376513$.


Appendix

Proof of $$\int \frac{\ln x}{z - x} \, dx = - \ln \left (1 - \frac{x}{z} \right ) \ln x - \operatorname{Li}_2 \left (\frac{x}{z} \right ) + C$$

Setting $t = x/z, dt = dx/z$, we have \begin{align} \int \frac{\ln x}{z - x} \, dx &= \int \frac{\ln (zt)}{1 - t} \, dt\\ &= -\ln (1 - t) \ln (zt) + \int \frac{\ln (1 - t)}{t} \, dt \qquad \text{(by parts)}\\ &= -\ln (1 - t) \ln (zt) - \operatorname{Li}_2 (t) + C\\ &= - \ln \left (1 - \frac{x}{z} \right ) \ln x - \operatorname{Li}_2 \left (\frac{x}{z} \right ) + C, \end{align} as required to show.


$$\small \int_0^1 \frac{\arctan x}{x^2-x-1}dx\overset{x=\tan\frac{t}{2}}=-\frac12 \int_0^\frac{\pi}{2} \frac{t}{2+\tan t}\frac{dt}{\cos t}\overset{\tan t= x}=-\frac12\int_0^\infty \frac{\arctan x}{(2+x)\sqrt{1+x^2}}dx$$ $$\small \overset{\large x=\frac{1/2+t}{1-t/2}}=-\frac{1}{2\sqrt 5}\int_{-\frac12}^2\frac{\arctan\left(\frac{\frac{1}{2}+t}{1-\frac{t}{2}}\right)}{\sqrt{1+t^2}}dt =-\frac{2}{\sqrt 5}\arctan\left(\frac12\right) \ln (\phi)-\frac{1}{2\sqrt 5}\int_\frac12^2 \frac{\arctan t}{\sqrt{1+t^2}}dt$$ $$\overset{\large t=\frac{x^2-1}{2x}}=-\frac{2}{\sqrt 5}\arctan\left(\frac12\right) \ln (\phi)+\frac{\pi}{2\sqrt 5}\ln(\phi)-\frac{1}{\sqrt 5}\int_{\phi}^{\phi^3}\frac{\arctan x}{x}dx$$ $$=\boxed{\frac{\ln(\phi)}{\sqrt 5}\arctan\left(\frac34\right)+\frac{1}{\sqrt 5}\left(\operatorname{Ti}_2\left(\phi\right)-\operatorname{Ti}_2\left(\phi^3\right)\right)}$$ $$\text{where} \ \phi=\frac{1+\sqrt 5}{2},\, \operatorname{Ti}_{2}(k)=\Im \operatorname{Li}_2(ik)=\int_0^k \frac{\arctan x}{x}dx.$$


A solution by Cornel I. Valean

We need a single main substitution $\displaystyle x\mapsto \frac{\varphi x-1/\varphi }{1+x}=g(x)$, which directly leads to $$\mathcal{I}=-\frac{1}{\sqrt{5}}\int_{1/\varphi^2}^{\varphi^2}\frac{\arctan(g(x))}{x}\textrm{d}x=\frac{\arctan(1/\varphi)}{\sqrt{5}}\int_{1/\varphi^2}^{\varphi^2}\frac{1}{x}\textrm{d}x-\frac{1}{\sqrt{5}}\int_{1/\varphi}^{\varphi^3}\frac{\arctan(x)}{x}\textrm{d}x,$$ where the last integral can be expressed using the inverse tangent integral, $\displaystyle \operatorname{Ti}_2(x)=\int_0^x\frac{\arctan(t)}{t}\textrm{d}t$.

End of story