I want to solve the integral $\int \frac{1}{x\sqrt{x^2-1}}\, dx$.
I have thought to consider a tranformation of variables: $x=\cosh{t}\implies dx=\sinh{t}$ and so $\int \frac{1}{x\sqrt{x^2-1}}\, dx=\int\frac{1} {\cosh{t}}\,dt$, then from here I am able to solve the integral.
$\textbf{My question is:}$ It is opportune to use the hyperbolic function in the transformation and NOT for instance $t=\cos{x}$, otherwise I would obtain $\frac{1}{x\sqrt{x^2-1}}=\frac{1}{\cos{x}\sqrt{-\sin^2{x}}}$ and so the square root of a negative object, that it is not defined in the real space, right?