<s>[INST] Integral of $\int \frac{\sqrt{x^2-1}}{x}dx$ 
Evaluate the integral of $$\int \frac{\sqrt{x^2-1}}{x}dx$$

Attempt: I've tried taking $x=\sec y$,
$$ \int \frac{\sqrt{\sec^2y-1}}{\sec y}dx $$
How to proceed further?
 [/INST] The answer is $$\int \frac{\sqrt{x^{2}-1}}{x}{\rm d}x= \sqrt{x^{2}-1}-\arctan\left( \sqrt{x^{2}-1}\right)+C.$$
In the integral perform the change of variable $x=\sec u$,
\begin{align*}
\int\frac{\sqrt{x^{2}-1}}{x}{\rm d}x&= \int \frac{\sqrt{\sec^{2}u-1}}{\sec u}\tan u\sec u{\rm d}u\\
&=\int \tan u \tan u{\rm d}u\\
&=\int \tan^{2} u{\rm d}u\\
&=\int \sec^{2}u -1 {\rm d}u\\
&=\tan(u)-u+C
\end{align*}
Therefore,
\begin{align*} \int \frac{\sqrt{x^{2}-1}}{x}{\rm d}x&=\tan(u)-u+C\\ &= \tan\left( \sec^{-1}(x)\right)-\sec^{-1}(x)+C\\ &=\sqrt{x^{2}-1}-\sec^{-1}(x)+C\\ &=\boxed{\sqrt{x^{2}-1}-\arctan\left( \sqrt{x^{2}-1}\right)+C} \end{align*}
</s>