<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] $$\int \:\frac{\sqrt{x^2-1}}{x}dx$$
Let $u=\:\sqrt{x^2-1}$ then
$$\frac{du}{dx}=\frac{x}{\sqrt{x^2-1}}\iff dx=\frac{\sqrt{x^2-1}}{x}\:du$$
Thus
\begin{align*}
\int \:\frac{\sqrt{x^2-1}}{x}dx& =\int \:\frac{u^2}{u^2+1}du\\
&=\int \:\frac{u^2 + 1 - 1}{u^2+1 + 1 - 1}du\\
&=\int \:\left(\frac{u^2+1}{u^2+1}-\frac{1}{u^2+1}\right)du\\
&=\int \:\left(1-\frac{1}{u^2+1}\right)du\\
&=u-\arctan \left(u\right)+C\\
&=\:\sqrt{x^2-1}-\arctan \left(\:\sqrt{x^2-1}\right)+C
\end{align*}
</s>