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

closed-formdefinite integralsintegration

After seeing this integral I've decided to give a try to calculate:
$$I=\int_0^1 \frac{\arctan x}{x^2-x-1}dx$$
That is because it's common for many integrals to have a combination of a polynomial in the denominator and a logarithm or an inverse trig function in the numerator.
Mostly I tried standard ways such as integrating by parts, random substitutions, or using:
$$\frac{\arctan x}{x}=\int_0^1 \frac{dy}{1+x^2y^2}$$
But I realised that is not a great idea since it gives some mess after partial fractions, so I decided to prepare the integral a little for a Feynman's trick using probably the only helpful thing with that denominator, it won't change while using $x\mapsto 1-x$.
$$I=\int_0^1 \frac{\arctan x}{x^2-x-1}dx=\int_0^1 \frac{\arctan (1-x)}{x^2-x-1}dx$$
$$\Rightarrow 2I=\frac{\pi}{2 \sqrt 5}\ln\left(\frac{3-\sqrt 5}{3+\sqrt 5}\right)-\int_0^1 \frac{\arctan(x^2-x+1)}{x^2-x-1}dx$$
$$\small J(a)=\int_0^1 \frac{\arctan(a(x^2-x-1)+2)}{x^2-x-1}dx\Rightarrow J'(a)=\int_0^1 \frac{1}{1+(a(x^2-x-1)+2)^2}dx$$
But I am stuck now. I would like to see a method which finds a closed form for this integral, hopefully something decent comes out. I already imagine there will be some special functions.

Best Answer

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.