I have hard times calculating this integral: ($a>0$) $$\int\frac{\sqrt{u^2-a^2}}{u} \, du = \sqrt{u^2-a^2}-a\arccos \left(\frac a {|u|}\right)+C$$ My effort is putting $u=a\sec(t)$ and then I get lost! Actually I make some progress but I dont know what to do with $\arccos(u/|a|).$
Note1: I asked this question for answers from putting $u=a\sec(t).$
Note2: I described my efforts in this link. In the question asked here I want the solution from scratch, but in the question in the link I want to know my errors. 2 subtle problems on calculating this integral
If the use of $u=a\sec t $ is required, you need to be specific about its domain and range. Let $t\in [0,\frac\pi2)$, then the range of $u$ is $(a,\infty)$. So, to integrate $$I=\int\frac{\sqrt{u^2-a^2}}{u} \, du $$
where $u<-a$ and $u>a$, two cases need to be considered separately.
Case 1): $u>a$. With $u=a\sec t $, we have $\tan t = \sqrt{u^2-a^2}$, $\cos t = \frac au$, and
$$\int\frac{\sqrt{u^2-a^2}}{u} du = a\int \tan^2 t\>dt = a \tan t - at =\sqrt{u^2-a^2}-a\cos^{-1}\frac au$$
Case 2): $u<-a$. Use $u=-a\sec t $. Then, $\tan t = \sqrt{u^2-a^2}$, $\cos t = -\frac au = \frac a{|u|}$, and
$$\int\frac{\sqrt{u^2-a^2}}{u} du = a\int \tan^2 t\>dt = a \tan t - at =\sqrt{u^2-a^2}-a\cos^{-1}\frac a{|u|}$$ Now, combine the two results as one to cover both $u<-a$ and $u>a$,
$$\int\frac{\sqrt{u^2-a^2}}{u} du =\sqrt{u^2-a^2}-a\cos^{-1}\frac a{|u|}+C$$