<s>[INST] Integration Using Trigonometric Substitutions with $x^2$ and $\sqrt x$ in denominator How can I integrate a function in this form: 
$$\int\frac{1}{x^2\sqrt{a+x^2}}dx$$ 
I know I need to use trigonometric substitution but don't see how to apply it for this form of function. What should I look for when integrating these types of functions?
 [/INST] Let $$x = \sqrt a\tan\theta \implies dx = \sqrt a\sec^2 \theta$$ and $x^2 = a \tan^2\theta$
$$\int\frac{1}{x^2\sqrt{a+x^2}}\,dx = \int \frac {\sqrt a \sec^2 \theta}{a\tan^2\theta\sqrt{a + a \tan^2 \theta}}\,d\theta$$
$$ = \int \dfrac{\sec^2\theta}{a \tan^2\theta \sqrt{\underbrace{1+ \tan^2}_{\sec^2 \theta}\theta}}\,d\theta$$
$$ = \frac 1a\int \dfrac{\sec^2\theta}{\tan^2\theta\sec\theta}\,d\theta$$
$$=\frac 1a \int \dfrac{\cos \theta\,d\theta}{\sin^2\theta} = \frac{-1}{a\sin\theta} + C $$  Now, since $$x = \sqrt a \tan\theta, \tan\theta = \frac x{\sqrt a}\implies \sin\theta = \dfrac{x}{\sqrt{a+x^2}}$$
So $$\frac{-1}{a\sin\theta} + C = -\dfrac{\sqrt{a+x^2}}{ax} + C$$
</s>