Evaluating $\int{\frac{1}{\sqrt{x^2-1}(x^2+1)}dx}$ Evaluating $$\int{\frac{1}{\sqrt{x^2-1}(x^2+1)}dx}$$ using $ux=\sqrt{x^2-1}$
UPDATE 'official' solution 
$$u^2x^2=x^2-1$$
$$x^2=\frac{-1}{u^2-1}$$
$$x^2+1=\frac{u^2-2}{u^2-1}$$
$$2xdx=\frac{-2u}{(u^2-1)^2}$$
  $$\int{\frac{x}{x\sqrt{x^2-1}(x^2+1)}dx}$$ 
  $$\int{\frac{1}{\frac{-1}{u^2-1}u\frac{u^2-2}{u^2-1}}\left(\frac{-u}{(u^2-1)^2}\right)du} $$ 
  $$\int{\frac{1}{(u^2-2)}du} $$ 
$$\frac{\log \left(\sqrt{2}-x\right)-\log \left(x+\sqrt{2}\right)}{2 \sqrt{2}}$$
$$\frac{\log \left(\sqrt{2}-\sqrt{x^2-1}/x\right)-\log \left(\sqrt{x^2-1}/x+\sqrt{2}\right)}{2 \sqrt{2}}$$
However at mathematica I get $$\frac{\log \left(-3 x^2-2 \sqrt{2} \sqrt{x^2-1} x+1\right)-\log \left(-3 x^2+2 \sqrt{2} \sqrt{x^2-1} x+1\right)}{4 \sqrt{2}}$$
Where is the error?

let me try a change of variable 
$$x = {1 + t^2 \over 1 - t^2},\  dx = {-4t \ dt \over (1-t^2)^2},\ x^2+1 = {2(1+t^4) \over (1-t^2)^2}, \ x^2-1 = {4t^2 \over (1-t^2)^2}$$
$$\int {1 \over (x^2+1) \sqrt{x^2-1}} dx = \int {t^2 - 1 \over t^4 + 1} \ dt
= \int {1 \over t^2 + 1} dt - 2 \int {1 \over t^4 + 1} dt = \tan^{-1}t - 2\int{dt \over t^4+1}$$
i got to go now. i will see if can do the last integral later.
edit: Idris, thanks for the hint. i can now evaluate 
$
\begin{eqnarray}
2\int {dt \over 1 + t^4} &=& 2\int {1/t^2 \over t^2 + 1/t^2}dt
                         = \int {1+1/t^2 \over t^2 + 1/t^2} \ dt - 
 \int {1-1/t^2 \over t^2 + 1/t^2} \ dt \\
&=&\int {d(t-1/t)\over (t-1/t)^2 + 2} - 
\int {d(t+1/t)\over (t+1/t)^2 - 2} \\
&=&{1 \over \sqrt 2}\tan^{-1}\left({t - 1/t \over \sqrt 2} \right) -
{1 \over 2\sqrt 2}\ln\left({t + 1/t -\sqrt2 \over t + 1/t +\sqrt 2} \right)
\end{eqnarray}
$
so finally, 
$$\int {1 \over (x^2+1) \sqrt{x^2-1}} dx  =  \tan^{-1}t - 
{1 \over \sqrt 2}\tan^{-1}\left({t - 1/t \over \sqrt 2} \right) +
 {1 \over 2\sqrt 2}\ln\left({t + 1/t -\sqrt2 \over t + 1/t +\sqrt 2} \right) + C$$

second edit: sorry, i made a mistake and i will fix it.
$\begin{eqnarray}
\int {1 \over (x^2+1) \sqrt{x^2-1}} dx &=& \int {t^2 - 1 \over t^4 + 1} \ dt
=\int{1 - 1/t^2 \over t^2 + 1/t^2}\ dt
= \int {d(t+1/t) \over (t+1/t)^2 - 2} \ dt \\
&=& {1 \over 2\sqrt 2}\ln\left({t + 1/t -\sqrt2 \over t + 1/t +\sqrt 2} \right) + C
\end{eqnarray}$
