<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] Notice, we have $$\int\frac{adx}{x\sqrt{x^2-a^2}}$$ Let $x=a\sec \theta \implies a\sec\theta\tan \theta d\theta=dt$
$$\int\frac{a^2\sec\theta\tan \theta d\theta}{a\sec\theta\sqrt{a^2 \sec^2\theta-a^2}}$$
$$=\int\frac{a^2\sec\theta\tan \theta d\theta}{a^2\sec\theta\tan \theta}$$ $$=\int d\theta=\theta+c_1$$ Now, setting the value of $\theta$ $$=\sec^{-1}\left(\frac{x}{a}\right)+c_1$$ Since, $\sec^{-1}\left(\frac{x}{a}\right)=\cos^{-1}\left(\frac{a}{x}\right)$ $$=\cos^{-1}\left(\frac{a}{x}\right)+c_1$$ $$=\frac{\pi}{2}-\sin^{-1}\left(\frac{a}{x}\right)+c_1$$ $$=-\sin^{-1}\left(\frac{a}{x}\right)+c_2$$ 
Hence, we have $$\bbox[5px, border:2px solid #C0A000]{\color{red}{\int\frac{a}{x\sqrt{x^2-a^2}}dx=\sec^{-1}\left(\frac{x}{a}\right)+c_1=-\sin^{-1}\left(\frac{a}{x}\right)+c_2}}$$
</s>