An integral Lobachevsky calculated incorrectly $\int_{0}^{\infty}\frac{(e^x-e^{-x})x}{e^{2x}+e^{-2x}+2\cos(2a)}dx$ In a recent lecture a professor told a story about the integral below.  Lobachevsky calculated this integral at first time incorrectly. Following the publication of the integral,  Ostrogradsky sent a letter with correct answer to Lobachevsky.
What is the right answer?
$$I(a)=\int_{0}^{\infty}\frac{(e^x-e^{-x})x}{e^{2x}+e^{-2x}+2\cos(2a)}dx$$
withe $0\leq a \leq \pi$.

\begin{align}
I(a)=&\int_{0}^{\infty}\frac{(e^x-e^{-x})x}{e^{2x}+e^{-2x}+2\cos2a}\overset{ y=e^{-x}}{ dx }\\
=&\int_0^1 \frac{(y^2-1)\ln y}{y^4+2y^2 \cos 2a+1}dy
= -\int_0^1 \frac{\ln y }{2\sin a}\ 
d\left(\tanh^{-1}\frac{2y\sin a}{1+y^2}\right)\\
\overset{ibp}=& \ \frac1{2\sin a}\int_0^1\frac1y \ \tanh^{-1}\frac{2y\sin a}{1+y^2}\ dy= \frac1{2\sin a}K(a)
\end{align}
With
$K’(a)= \int_0^1 \frac{2(1+y^2)\cos a}{y^4+2y^2\cos 2a+1}dx=\tan^{-1}\left(\frac{2y\cos a}{1-y^2} 
\right)_0^1=\frac\pi2
$
$$I(a)= \frac1{2\sin a}\int_0^a K’(s)ds=\frac{\pi a}{4\sin a}
$$
