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}}$$

Kinda messy, but gets the answer.
Lets write $x^2+2=t \rightarrow x^2+1=t-1 \ and \ x=\pm\sqrt{t-2}$.
For the case $x=\sqrt{t-2}$ we will get $\displaystyle \frac{dt}{dx}=2x \rightarrow dx=\frac{dt}{2x}=\frac{dt}{2\sqrt{t-2}}$.
Now $$\int{\frac{dx}{(x^2+1) \sqrt{x^2+2}}}=\int\frac{\frac{dt}{2\sqrt{t-2}}}{(t-1)\sqrt{t}}=\frac{1}{2}\int\frac{1}{(t-1)\sqrt{t^2-2t}}dt=\frac{1}{2}\int\frac{1}{(t-1)\sqrt{(t-1)^2-1}}dt$$
Define $t-1=m \rightarrow dt=dm$ we get $\displaystyle \frac{1}{2}\int\frac{1}{m\sqrt{m^2-1}}dm$.
Define $\displaystyle p=\sqrt{m^2-1} \rightarrow \frac{dp}{dm}=\frac{2m}{2\sqrt{m^2-1}}=\frac{m}{p} \rightarrow dm=\frac{dp\cdot{p}}{m}$, hence $$\frac{1}{2}\int\frac{1}{m\sqrt{m^2-1}}dm=\frac{1}{2}\int\frac{1}{mp}\cdot{\frac{dp\cdot{p}}{m}}=\frac{1}{2}\int\frac{1}{m^2}dp=\frac{1}{2}\int\frac{1}{p^2+1}dp=\frac{1}{2}arctan(p)+C$$
We know that $p=\sqrt{m^2-1}=\sqrt{(t-1)^2-1}=\sqrt{(x^2+1)^2-1}$.
