# What is the integral of int (2x-5)/(x^2+2x+2)?

Jun 29, 2018

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

#### Explanation:

Write $\left(2 x - 5\right)$ as $\left(2 x + 2 - 7\right)$

Then the integral is

$I = \int \frac{\left(2 x - 5\right) \mathrm{dx}}{{x}^{2} + 2 x + 2} = \int \frac{\left(2 x + 2 - 7\right) \mathrm{dx}}{{x}^{2} + 2 x + 2}$

$= \int \frac{\left(2 x + 2\right) \mathrm{dx}}{{x}^{2} + 2 x + 2} - \int \frac{7 \mathrm{dx}}{{x}^{2} + 2 + 2}$

$= {I}_{1} + {I}_{2}$

Calculate the integral ${I}_{1}$ by substitution

Let $u = {x}^{2} + 2 x + 2$, $\implies$, $\mathrm{du} = \left(2 x + 2\right) \mathrm{dx}$

${I}_{1} = \int \frac{\left(2 x + 2\right) \mathrm{dx}}{{x}^{2} + 2 x + 2} = \int \frac{\mathrm{du}}{u}$

$= \ln \left(u\right)$

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

For the integral ${I}_{2}$, complete the square of the denominator

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

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

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

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

$= 7 \arctan \left(u\right)$

$= 7 \arctan \left(x + 1\right)$

And finally,

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