Calculate $\int^2_0\frac{\arctan x}{x^2-4x-1}\,dx$ Calculate
$\int^2_0\frac{\arctan x}{x^2-4x-1}\,dx$.
The only idea that I have is to substitute $t=x+1$, but I do not think it is a good one.
 A: By the order-reversing involution $x\mapsto\frac{2-x}{1+2x}$,$$I=\int_0^2\frac{\arctan\frac{2-x}{1+2x}dx}{x^2-4x-1}.$$(This can be found by substituting $y=\arctan x$ in the original definition of $I$, then verifying a suspicion that the new integrand is of the form $yf(y)$ with $f(\arctan2-y)=f(y)$.) Averaging,$$I=\frac{\arctan2}{2}\int_0^2\frac{dx}{x^2-4x-1}=-\frac{\arctan2\operatorname{artanh}\frac{2}{\sqrt{5}}}{2\sqrt{5}}.$$According to Wolfram Alpha this is numerically correct, $-0.357395$.
A: As @Tito Eliatron commented, integrating by parts
$$I=\int\frac{\tan ^{-1}(x)}{x^2-4 x-1}dx$$
$$I=\tan ^{-1}(x)\frac{\log \left(-x+\sqrt{5}+2\right)-\log \left(x+\sqrt{5}-2\right)}{2 \sqrt{5}}+\frac J{2 \sqrt{5}}$$
$$J=\int\frac{\log \left(-x+\sqrt{5}+2\right)-\log \left(x+\sqrt{5}-2\right)}{x^2+1}dx$$
$$\frac 1{x^2+1}=\frac 1{(x+i)(x-i)}=\frac{i}{2 (x+i)}-\frac{i}{2 (x-i)}$$All of these make that we face now four integrals
$$I=\int \frac{\log (a x+b)}{x+c}dx=\text{Li}_2\left(\frac{a x+b}{b-a c}\right)+\log (a x+b) \log \left(1-\frac{a
   x+b}{b-a c}\right)$$ Integrated between the given bounds, this leads to a quite complicated expression which is hard to simplify because of the bunch of polylogarithms of complex arguments.
After a pretty tedious work
$$\int_0^2\frac{\tan ^{-1}(x)}{x^2-4 x-1}dx=-\frac{\tan ^{-1}(2) \sinh ^{-1}(2)}{2 \sqrt{5}}\sim -0.3573950303$$
