<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] 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}
$$
</s>