<s>[INST] Evaluate $\int \frac{a}{x(x^2-a^2)^{1/2}} dx$ I was trying to integrate $\int \frac{a}{x(x^2-a^2)^{1/2}} dx$ and by applying on what i saw on the formula of inverse trigonometric functions, there is formula like $\frac{1}{a}Arcsec\frac{u}{a}$ = $\int \frac{du}{u\sqrt(u^2-a^) }$ so my answer is $\frac{1}{a}Arcsec\frac{x}{a}$ but my friend said it should be something like $arcsin?$
 [/INST] To obtain the solution that the OP quotes
$$
\int \frac{a}{x\sqrt{x^2-a^2}}dx
$$
we then have
$$
\int \frac{a}{x^2\sqrt{1-\left(\frac{a}{x}\right)^2}}dx
$$
Here I used the fact
$$
\sqrt{x^2-a^2} = \sqrt{x^2\left(1-\frac{a^2}{x^2}\right)} = \sqrt{x^2}\sqrt{\left(1-\frac{a^2}{x^2}\right)} = x\sqrt{1-\left(\frac{a}{x}\right)^2}
$$
let $u = \frac{a}{x}$
we have
$$
-\int \frac{du}{\sqrt{1-u^2}} = -\arcsin(u) + C
$$
</s>