# How do you find int (2x-5)/(x^2+2x+2)?

Nov 21, 2016

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

#### Explanation:

Let's rewrite

$\frac{2 x - 5}{{x}^{2} + 2 x + 2} = \frac{2 x + 2 - 7}{{x}^{2} + 2 x + 2}$

$= \frac{2 x + 2}{{x}^{2} + 2 x + 2} - \frac{7}{{x}^{2} + 2 x + 2}$

Therefore, the integral is

$\int \frac{\left(2 x - 5\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 x + 2}$

So, we have 2 integrals

Let's do the first one,

Let $u = {x}^{2} + 2 x + 2$

Then $\mathrm{du} = \left(2 x + 2\right) \mathrm{dx}$

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

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

For the second integral,

${x}^{2} + 2 x + 2 = {x}^{2} + 2 x + 1 + 1$

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

Let $u = x + 1$

$\mathrm{du} = \mathrm{dx}$

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

$= 7 \arctan u$

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

Finally, we have

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