<s>[INST] How to integrate $\int {2\over (x^2+2)\sqrt{x^2+4}}dx$? 
Solve the following indefinite integral:
$$\int \frac{2}{(x^2+2)\sqrt{x^2+4}} dx$$

My approach:
I used the substitution: $x=2\tan t$, $dx=2\sec^2t dt$
$$\int \frac{2}{(x^2+2)\sqrt{x^2+4}} dx=\int \frac{2}{(4\tan^2t+2)\sqrt{4\tan^2t+4}}\cdot 2\sec^2t\ dt$$
$$=\int \frac{4\sec^2t }{2(2\tan^2t+1)2\sec t} dt$$
$$=\int \frac{\sec t}{2\tan^2t+1}dt$$
In numerator I have $\sec t$ but not $\sec^2t$ therefore I can't see a way to take it further. Please help me solve this integral. Thanks in advance.
 [/INST] The problem's already solved but just another method.
Substitute $x = \frac{1}{t}$
$$=\int \frac{2}{\big(\frac{1}{t^2} + 2\big) \sqrt{\frac{1}{t^2} + 4}} \frac{-dt}{t^2}$$
$$=\int \frac{2t^3}{(1+2t^2) \sqrt{1+4t^2}} \frac{-dt}{t^2}$$
Now substitute $1+4t^2 = u^2$.
Integral will simplify to
$$\int - \frac{du}{u^2 + 1}$$
$$=- \tan^{-1}  u = -\tan^{-1}(\sqrt{1+4t^2}) = -\tan^{-1}\sqrt{1 + \frac{4}{x^2}}$$
$$ = \tan^{-1}\frac{x}{\sqrt{x^2+4}} + C$$
</s>