TITLE: Indefinite integral $\int{\frac{dx}{x^2+2}}$
QUESTION [5 upvotes]: I cannot manage to solve this integral:  
$$\int{\frac{dx}{x^2+2}}$$
The problem is the $2$ at denominator, I am trying to decompose it in something like $\int{\frac{dt}{t^2+1}}$:  
$$t^2+1 = x^2 +2$$
$$\int{\frac{dt}{2 \cdot \sqrt{t^2-1} \cdot (t^2+1)}}$$
But it's even harder than the original one. I also cannot try partial fraction decomposition because the polynomial has no roots. Ho to go on?

REPLY [5 votes]: I find it much more versatile when encountering a denominator of the form $x^2 + a^2$, rather than only having learned what to do when $a = 1$, I use the fact that : $$\int \dfrac{dx}{x^2 + a^2} = \dfrac 1a\arctan\left(\frac x{a}\right) + C$$
Why? $$\frac{dx}{x^2+a^2} = \frac{dx}{a^2 \left(\frac{x^2}{a^2} + 1\right)} =\frac{dx}{a^2\left(\left(\frac{x}{a}\right)^2+1\right)} =  \dfrac 1a\cdot\frac{(1/a) \,dx}{\left(\left(\frac{x}{a}\right)^2+1\right)} = \frac{1}{a}\cdot\frac{du}{u^2+1}, \;\;u = \frac xa$$
Applying this fact to your integral is rather straightforward then:
$$\int{\frac{dx}{x^2+2}} = \int\frac{dx}{x^2 + \left(\sqrt 2\right)^2} = \frac 1{\sqrt 2} \arctan\left(\frac x{\sqrt 2}\right) + C$$