Find $\int \frac {\mathrm dx}{(x + 1)(x^2 + 2)}$ I'm supposed to find the antiderivative of

$$\frac {1}{(x + 1)(x^2 + 2)}$$

and I'm completely stumped. I've been trying substitutions with $u = x^2$ and that's led me nowhere. I don't think I can use partial fractions here since I have one linear factor and one quadratic factor below the division line, right?
 A: Hint:
$$\dfrac{1}{(x + 1)(x^2 + 2)}= \dfrac{1-x}{3 (x^2+2)} + \dfrac{1}{3 (x+1)}$$
A: Hint: use the method of partial fractions to obtain
$$
\int \frac{1}{(x + 1)(x^2 + 2)} \, dx = \int \left( \frac{A}{x + 1} + \frac{Bx + C}{x^2 + 2} \right) \, dx
$$
which implies that
$$
A(x^2 + 2) + (Bx + C)(x + 1) = 1
$$
$$
...
$$
A: Consider $$\int {1\over (x+1)(x^2+2)}dx.$$
Using the method of partial fraction decomposition we have $${1\over (x+1)(x^2+2)} = {A\over x+1}+{Bx+C\over x^2+2}.$$ Solving for constans $A$, $B$,and $C$ we obtain $${1\over 3(x+1)}+{1-x\over 3(x^2+2)}.$$ So we must integrate $$\int{1\over 3(x+1)}+{1-x\over 3(x^2+2)}dx.$$ Rewrite the integral as $$\int{1\over 3}\cdot {1\over x+1}+{1\over 3}\cdot {1\over x^2+2}-{1\over 3}\cdot {x\over x^2+2}dx.$$ The first term is a $u$-substitution, the second term involves a $\tan^{-1}(x)$ identity and the third term is another $u$-substitution. Thus we integrate and obtain $${1\over 3}\cdot \ln(x+1)+{1\over 3\sqrt2}\cdot \tan^{-1}({x\over \sqrt2})-{1\over 6}\cdot \ln(x^2+2)+C$$ where $C$ is a constant.
