<s>[INST] A Simple Integral I've been stuck trying to figure out this indefinite integral:
$$\int \frac{1}{x \sqrt{x-a}} \,dx$$
I know that the answer involves the inverse tangent of some function, but I'm unsure of how to get there.
 [/INST] Substitute $ u=\sqrt{x-a} $. Then $ x=a+u^{2} $ and $du=\dfrac{1}{2\sqrt{x-a}}dx=\dfrac{dx}{2u}$.
$$ \therefore \int \dfrac{1}{x\sqrt{x-a}}dx=\int \dfrac{2}{a+u^{2}}du=2\int \dfrac{1}{a+u^{2}}du. $$
Now substitute $u=\sqrt{a}t$. Then $ u^{2}=at^{2} $ and $ du=\sqrt{a}dt $.
$$ \therefore \int \dfrac{1}{x\sqrt{x-a}}dx=\dfrac{2}{\sqrt{a}}\int \dfrac{1}{1+t^{2}}dt=\dfrac{2}{\sqrt{a}}\tan ^{-1}\left( t\right)+C=\dfrac{2}{\sqrt{a}}\tan ^{-1}\left( \dfrac{u}{\sqrt{a}}\right)+C=\dfrac{2}{\sqrt{a}}\tan ^{-1}\left( \dfrac{\sqrt{x-a}}{\sqrt{a}}\right)+C . $$
</s>