# What is int (2x-5)/(x^2+2x+2) dx?

Dec 13, 2015

int(2x-5)/(x^2+2x+2)dx = color(red)( ln(x^2 + 2x+2) color(blue)( -7 arctan (x+1) + C

#### Explanation:

Given $\int \frac{2 x - 5}{{x}^{2} + 2 x + 2} \mathrm{dx}$

You can manipulate the expression* into

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

For the first integral,

let color(red)(u= x^2 +2x+2) ; du = (2x+2) dx

$\int \frac{\mathrm{du}}{u} = \ln | u | + C$

int((2x+2)/(x^2+2x+2))dx =color(red)( ln(x^2 + 2x+2) +C

For the second integral
$- \int \left(\frac{7}{{x}^{2} + 2 x + 2}\right) \mathrm{dx}$ , let's complete the square for the denominator

color(blue)(-int7/((x^2+2x+1)+2-1)dx

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

Let v= (x+1) ; dv= 1dx " " ; a^2 = 1 ; a= 1

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

=>-7int1/((x+1)^2 + 1)dx =>color(blue)( -7 arctan (x+1) + C

When we put it together we have

int(2x-5)/(x^2+2x+2)dx = color(red)( ln(x^2 + 2x+2) color(blue)( -7 arctan (x+1) + C

*Why? Because if we differentiate the denominator, we ALMOST have the derivative on the numerator...

(If you don't like this method you can also use partial fraction decomposition but it will take longer)