How do you find appropriate trig substitution for $\int \frac{\sqrt{16x^2 - 9}}{x} \, dx$? I want to solve the below:
$$\int \frac{\sqrt{16x^2 - 9}}{x} \, dx$$
I know for trig substitution, if I have something in the form of $\sqrt{x^2-a^2}$, I can use $x = a\sec{u}$; it just so happens my integral has a numerator in this form: $\sqrt{16x^2 - 3^2}$ so I know to use $x = 3\sec u$:
$$
\begin{align}
& \int \frac{\sqrt{16x^2 - 9}}{x} \, dx \\
= {} & \int \frac{\sqrt{16x^2 - 3^2}}{x} \, dx \\
= {} & \int \frac{\sqrt{16(3\sec u)^2 - 3^2}}{3\sec u} 3\sec u\tan u \, du \\
= {} & \int \frac{(\sqrt{16(3\sec u)^2 - 3^2)}(3\sec u\tan u)}{3\sec u} \, du \\
= {} & \int \sqrt{(16(3\sec u)^2 - 3^2)}(\tan u) \, du
\end{align}
$$
This doesn't seem to make it easy. However, using a calculator online, it suggests I instead use $x = \dfrac{3}{4}\sec{u}$ which simplifies the integral to a crisp $\int 3\tan^2 u \, du$.
My question is, how did the calculator get $a = \dfrac{3}{4}$ and is there a way to determine an ideal trig substitution for a given function?

I am confused by the suggestion to use trigonometric substitution, since $$\frac{\sqrt{16x^2 - 9}}{x} = 16 x \frac{\sqrt{16x^2 - 9}}{16x^2},$$ and the substitution $$u^2 = 16x^2 - 9, \quad 2u \, du = 32 x \, dx$$ yields $$\begin{align*}
\int \frac{\sqrt{16x^2 - 9}}{x} \, dx 
&= \int \frac{u}{u^2 + 9} u \, du \\
&= \int 1 - \frac{9}{u^2 + 9} \, du \\
&= u - 3 \tan^{-1} \frac{u}{3} + C \\
&= \sqrt{16x^2 - 9} - 3 \tan^{-1} \frac{\sqrt{16x^2 - 9}}{3} + C.
\end{align*}$$
Trigonometric substitution certainly works, but in such cases, we can certainly avoid it.
