Problem with the indefinite integral $\int{\frac{\sqrt{{{b}^{2}}{{x}^{2}}-{{a}^{2}}}}{{{x}^{2}}}dx}$ I tried using a substitution $x=\frac{a}{b}\sec \theta $ to solve
$$\int{\frac{\sqrt{{{b}^{2}}{{x}^{2}}-{{a}^{2}}}}{{{x}^{2}}}dx}$$
Obviously, $dx=\frac{a}{b}\sec \theta \tan \theta d\theta $. In other words,
$\begin{align}
\int{\frac{\sqrt{{{b}^{2}}{{x}^{2}}-{{a}^{2}}}}{{{x}^{2}}}dx} &=\int{\frac{\sqrt{{{b}^{2}}{{\left( \frac{a}{b}\sec \theta  \right)}^{2}}-{{a}^{2}}}}{{{\left( \frac{a}{b}\sec \theta  \right)}^{2}}}\left( \frac{a}{b}\sec \theta \tan \theta  \right)d\theta } \\
&=\int{\frac{\sqrt{{{\sec }^{2}}\theta -1}}{\frac{1}{b}\sec \theta }\left( \tan \theta  \right)d\theta } \\ 
& =b\int{\frac{{{\tan }^{2}}\theta }{\sec \theta }d\theta } \\
&=b\int{\frac{{{\sec }^{2}}\theta -1}{\sec \theta }d\theta } \\ 
\end{align}$
But I feel there’s something wrong with my solution. Perhaps there’s a more effective/better way to solve it?
 A: HINT
You may try the substitution
\begin{align*}
x = \frac{a\cosh(z)}{b}
\end{align*}
whence we get that
\begin{align*}
\int\frac{\sqrt{b^{2}x^{2} - a^{2}}}{x^{2}}\mathrm{d}x & = b\int\frac{\sqrt{\cosh^{2}(z) - 1}\sinh(z)}{\cosh^{2}(z)}\mathrm{d}z\\\\
& = b\int\frac{\sinh^{2}(z)}{\cosh^{2}(z)}\mathrm{d}z\\\\
& = b\int\frac{\cosh^{2}(z) - 1}{\cosh^{2}(z)}\mathrm{d}z\\\\
& = b\left[\int\mathrm{d}z - \int\frac{\mathrm{d}z}{\cosh^{2}(z)}\right]\\\\
& = b[z - \tanh(z)] + c\\\\
& = b\left[\cosh^{-1}\left(\frac{bx}{a}\right) - \frac{\sinh\left(\cosh^{-1}\left(\frac{bx}{a}\right)\right)}{\cosh\left(\cosh^{-1}\left(\frac{bx}{a}\right)\right)}\right] + c
\end{align*}
where you can use the relations:
\begin{align*}
\begin{cases}
\cosh^{-1}(z) = \ln(z + \sqrt{z^{2} - 1})\\\\
\cosh^{2}(z) - \sinh^{2}(z) = 1\\\\
\cosh(\cosh^{-1}(z)) = z
\end{cases}
\end{align*}
Can you take it from here?
A: Hint
Use one integration by parts
$$\int{\frac{\sqrt{{{b}^{2}}{{x}^{2}}-{{a}^{2}}}}{{{x}^{2}}}dx}=-\frac{\sqrt{b^2 x^2-a^2}}{x}+\int \frac{b^2}{\sqrt{b^2 x^2-a^2}}\,dx$$
