<s>[INST] evaluation of the integral of a certain logarithm I come across the following integral in my work
$$\int_a^\infty \log\left(\frac{x^2-1}{x^2+1}\right)\textrm{d}x,$$
with $a>1$.
Does this integral converge ? what is its value depending on $a$ ?
 [/INST] We have:
$$ I = \int_{\frac{a^2-1}{a^2+1}}^{1}\frac{\log x}{(1-x)^{3/2}(1+x)^{1/2}}\,dx $$
where the integrand function is integrable over $(0,1)$. Moreover:
$$ 0 > I > \int_{0}^{1}\frac{\log x}{(1-x)^{3/2}(1+x)^{1/2}} = -\frac{\pi}{2}-\log 2.$$
Integration by parts gives:
$$ I = x\,\left.\log\frac{x^2-1}{x^2+1}\right|_{a}^{+\infty}-\int_{a}^{+\infty}x\left(\frac{1}{x-1}+\frac{1}{x+1}-\frac{2x}{x^2+1}\right)\,dx,$$
or:
$$ I = -a\log\frac{a^2-1}{a^2+1}-\int_{a}^{+\infty}\frac{4x^2}{x^4-1}\,dx = -a\log\frac{a^2-1}{a^2+1}-4\int_{0}^{1/a}\frac{dx}{1-x^4}$$
so:
$$ I = -a\log\frac{a^2-1}{a^2+1}-2\left(\operatorname{arccot} a+\operatorname{arccoth} a\right),$$
or:
$$\color{red}{ I = -a\log\frac{a^2-1}{a^2+1}+\log\frac{a-1}{a+1}-\pi+2\arctan a}. $$
</s>