# How do you integrate (-2x)/((x^2+2x+2)^2) ?

Apr 1, 2018

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

#### Explanation:

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

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

After using $x + 1 = \tan u$, $x = \tan u - 1$ and $\mathrm{dx} = {\left(\sec u\right)}^{2} \cdot \mathrm{du}$ transforms, this integral became

$- \int 2 \left(\tan u - 1\right) \cdot \frac{{\left(\sec u\right)}^{2} \cdot \mathrm{du}}{\sec u} ^ 4$

=$- \int 2 \left(\tan u - 1\right) \cdot {\left(\cos u\right)}^{2} \cdot \mathrm{du}$

=$\int 2 {\left(\cos u\right)}^{2} \cdot \mathrm{du}$-$\int 2 \tan u \cdot {\left(\cos u\right)}^{2} \cdot \mathrm{du}$

=$\int 2 {\left(\cos u\right)}^{2} \cdot \mathrm{du}$-$\int 2 \sin u \cdot \cos u \cdot \mathrm{du}$

=$\int \left(1 + \cos 2 u\right) \cdot \mathrm{du}$-$\int \sin 2 u \cdot \mathrm{du}$

=$u + \frac{1}{2} \sin 2 u + \frac{1}{2} \cos 2 u + C$

=$u + \frac{1}{2} \cdot \frac{2 \tan u}{{\left(\tan u\right)}^{2} + 1} + \frac{1}{2} \cdot \frac{1 - {\left(\tan u\right)}^{2}}{1 + {\left(\tan u\right)}^{2}} + C$

=$u + \tan \frac{u}{{\left(\tan u\right)}^{2} + 1} + \frac{1}{2} \cdot \frac{1 - {\left(\tan u\right)}^{2}}{1 + {\left(\tan u\right)}^{2}} + C$

After using $x + 1 = \tan u$ and $u = \arctan \left(x + 1\right)$ inverse transforms, I found

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

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

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