Integrate $\int\frac{dx}{(x^2+1)\sqrt{x^2+2}}$ I would like some guidance regarding the following integral:
$$\int\frac{dx}{(x^2+1)\sqrt{x^2+2}}$$
EDIT: The upper problem was derived from the following integral $$\int\frac{\sqrt{x^2+2}}{x^2+1}dx$$
Where I rationalized the numerator which followed into: $$\int\frac{dx}{\sqrt{x^2+2}}+\int\frac{dx}{(x^2+1)\sqrt{x^2+2}}$$

There is a general formula for it. $$\int \frac{dx}{(x^2+1)\sqrt{x^2+a}}=\frac{1}{\sqrt{a-1}}\tan^{-1}\left(\frac{\sqrt{a-1}x}{\sqrt{x^2+a}}\right)+C\tag{1}$$
$a=2$ gives $$\int \frac{dx}{(x^2+1)\sqrt{x^2+2}}=\tan^{-1}\left(\frac{x}{\sqrt{x^2+2}}\right)+C$$

Formula $(1)$ can be proven by substitution : $t=1/x$, $s=\sqrt{at^2+1}$.
\begin{align}\int \frac{dx}{(x^2+1)\sqrt{x^2+a}}&=-\int\frac{t}{(t^2+1)\sqrt{at^2+1}}dt\\&=-\int\frac{1}{s^2+a-1}ds\\&=\frac1{\sqrt{a-1}}\tan^{-1}\left(\frac{\sqrt{a-1}}{s}\right)+C\\&=\frac{1}{\sqrt{a-1}}\tan^{-1}\left(\frac{\sqrt{a-1}x}{\sqrt{x^2+a}}\right)+C\end{align}
For a more general method of computing these types of integrals, one can use the Euler substitution to transform into the integration of a rational function.
