# How do you find the integral ln(x^2 + 2x + 2)dx?

May 15, 2018

The answer is $= \left(x + 1\right) \ln \left({x}^{2} + 2 x + 2\right) - 2 \left(x + 1\right) + 2 \arctan \left(x + 1\right) + C$

#### Explanation:

First complete the square

${x}^{2} + 2 x + 2 = {\left(x + 2\right)}^{2} + 1$

Let

$x + 1 = u$, $\implies$, $\mathrm{du} = \mathrm{dx}$

Therefore,

$I = \int \ln \left({x}^{2} + 2 x + 2\right) \mathrm{dx} = \int \ln \left({\left(x + 2\right)}^{2} + 1\right) \mathrm{dx}$

$= \int \ln \left({u}^{2} + 1\right) \mathrm{du}$

Perform the integration by parts

$p = \ln \left({u}^{2} + 1\right)$, $\implies$, $p ' = \frac{2 u}{{u}^{2} + 1}$

$q ' = 1$, $\implies$, $q = u$

Therefore,

$I = u \ln \left({u}^{2} + 1\right) - \int \frac{2 {u}^{2} \mathrm{du}}{{u}^{2} + 1}$

$\int \frac{2 {u}^{2} \mathrm{du}}{{u}^{2} + 1} = 2 \int \frac{\left({u}^{2} + 1 - 1\right) \mathrm{du}}{{u}^{2} + 1}$

$= 2 \int \mathrm{du} - 2 \int \frac{\mathrm{du}}{{u}^{2} + 1}$

$= 2 u - 2 \arctan \left(u\right)$

Finally,

$I = u \ln \left({u}^{2} + 1\right) - 2 u + 2 \arctan \left(u\right)$

$= \left(x + 1\right) \ln \left({x}^{2} + 2 x + 2\right) - 2 \left(x + 1\right) + 2 \arctan \left(x + 1\right) + C$