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$ ?
 A: 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}. $$
A: Using
$$
-i\log\left(\frac{x+i}{x-i}\right)=\pi-2\tan^{-1}(x)
$$
we get
$$
\begin{align}
\int_a^\infty\log\left(\frac{x^2-1}{x^2+1}\right)\mathrm{d}x
&=\int_a^\infty\left[\vphantom{\sum}\log(x+1)+\log(x-1)-\log(x+i)-\log(x-i)\right]\mathrm{d}x\\
&{=}+(x+1)\log(x+1)-(x+1)\\
&\hphantom{=}+(x-1)\log(x-1)-(x-1)\\
&\hphantom{=}-(x+i)\log(x+i)+(x+i)\\
&\hphantom{=}-(x-i)\log(x-i)+(x-i)\\
&=\left[\log\left(\frac{x+1}{x-1}\right)+x\log\left(\frac{x^2-1}{x^2+1}\right)-2\tan^{-1}(x)\right]_a^\infty\\
&=\log\left(\frac{a-1}{a+1}\right)+a\log\left(\frac{a^2+1}{a^2-1}\right)+2\tan^{-1}(a)-\pi
\end{align}
$$
