# How do you integrate (x^2+12x-5)/((x+1)^2(x-7)) using partial fractions?

Nov 27, 2016

The answer is =-2/(x+1)-ln∣x+1∣+2ln∣x-7∣ + C

#### Explanation:

Let's do the decomposition into partial fractions

$\frac{{x}^{2} + 12 x - 5}{{\left(x + 1\right)}^{2} \left(x - 7\right)} = \frac{A}{x + 1} ^ 2 + \frac{B}{x + 1} + \frac{C}{x - 7}$

$= \frac{A \left(x - 7\right) + B \left(x + 1\right) \left(x - 7\right) + C {\left(x + 1\right)}^{2}}{{\left(x + 1\right)}^{2} \left(x - 7\right)}$

Therefore,

${x}^{2} + 12 x - 5 = A \left(x - 7\right) + B \left(x + 1\right) \left(x - 7\right) + C {\left(x + 1\right)}^{2}$

Let $x = - 1$, $\implies$, $- 16 = - 8 A$

Coefficients of ${x}^{2}$, $1 = B + C$

Let $x = 7$, $\implies$, $128 = 64 C$

$C = 2$

$B = 1 - C = 1 - 2 = - 1$

$A = 2$

$\frac{{x}^{2} + 12 x - 5}{{\left(x + 1\right)}^{2} \left(x - 7\right)} = \frac{2}{x + 1} ^ 2 - \frac{1}{x + 1} + \frac{2}{x - 7}$

So,

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

=-2/(x+1)-ln∣x+1∣+2ln∣x-7∣ + C