# How do you integrate int (x+4)/(x^2 + 2x + 5)dx using partial fractions?

Apr 1, 2016

$\frac{1}{2} \left[\ln | {x}^{2} + 2 x + 5 | + 3 \arctan \left(\frac{x + 1}{2}\right)\right] + c$

#### Explanation:

First split the integral into two parts:

$x + 1$ is a scalable factor of the derivative of ${x}^{2} + 2 x + 5$, so divide $x + 4$ by $x + 1$

$\int \frac{x + 4}{{x}^{2} + 2 x + 5} \mathrm{dx} = \int \frac{x + 1}{{x}^{2} + 2 x + 5} \mathrm{dx} + \int \frac{3}{{x}^{2} + 2 x + 5} \mathrm{dx}$

Algebraic manipulation yields:
$\frac{1}{2} \int \frac{2 x + 2}{{x}^{2} + 2 x + 5} \mathrm{dx} + 3 \int \frac{1}{{\left(x + 1\right)}^{2} + 4} \mathrm{dx}$
$= \frac{1}{2} \ln | {x}^{2} + 2 x + 5 | + \frac{3}{2} \arctan \left(\frac{x + 1}{2}\right) + c$
$= \frac{1}{2} \left[\ln | {x}^{2} + 2 x + 5 | + 3 \arctan \left(\frac{x + 1}{2}\right)\right] + c$