<s>[INST] Solve an integral $\int\frac{1}{(1+x^2)\sqrt{x^2-1}}dx$ Solve an integral $$\int\frac{1}{(1+x^2)\sqrt{x^2-1}}dx$$
Using the third substitution of Euler,
$$\sqrt{x^2-1}=(x-1)t\Rightarrow x=\frac{1+t^2}{1-t^2},dx=\frac{4t}{(1-t^2)^2}$$
we get an integral $$\int\frac{1-t^2}{1+t^4}dt=\frac{1}{2}\int\frac{1-\sqrt 2 t}{t^2-\sqrt 2 t+1}dt+\frac{1}{2}\int\frac{1+\sqrt 2t}{t^2+\sqrt 2t+1}dt$$
Using substitutions $$u=t^2-\sqrt 2t+1$$ and $$v=t^2+\sqrt 2t+1$$
we get $$\int\frac{1-t^2}{1+t^4}dt=-\frac{\sqrt 2}{4}\ln|u|+\frac{\sqrt 2}{4}\ln|v|=-\frac{\sqrt 2}{4}\ln|t^2-\sqrt 2t+1|+\frac{\sqrt 2}{4}\ln|t^2+\sqrt 2t+1|$$
From $$x=\frac{1+t^2}{1-t^2}\Rightarrow t=\sqrt{\frac{x-1}{x+1}}\Rightarrow$$
$$\int\frac{1}{(1+x^2)\sqrt{x^2-1}}dx=$$$$-\frac{\sqrt 2}{4}\ln\left|\frac{x-1}{x+1}-\sqrt 2\sqrt{\frac{x-1}{x+1}}+1\right|+\frac{\sqrt 2}{4}\ln\left|\frac{x-1}{x+1}+\sqrt 2\sqrt{\frac{x-1}{x+1}}+1\right|+c$$
Is there another, quicker method to solve this integral, rather than Euler substitution.
 [/INST] Setting $$x=\sinh(t)$$ then we have  $$dx=\cosh(t)dt$$ and our integral will be $$\int \frac{dt}{1+\sinh^2(t)}$$
then use $$\sinh(t)=-2\,{\frac {\tanh \left( t/2 \right) }{ \left( \tanh \left( t/2
 \right)  \right) ^{2}-1}}
$$
note that $$x^2-1=\sinh^2(t)-1=\cosh^2(t)$$
</s>