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

Feb 3, 2017

The answer is $= \frac{7}{x} + 19 \ln \left(| x |\right) + \frac{11}{x + 1} - 19 \ln \left(| x + 1 |\right) + C$

#### Explanation:

Let's perform the decomposition into partial fractions

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

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

As the denominators are the same, we can compare the numerators

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

Let $x = 0$, $\implies$, $- 7 = A$

Let $x = - 1$, $\implies$, $- 11 = C$

Coefficients of ${x}^{3}$, $\implies$, $0 = B + D$

Coefficients of $x$, $\implies$, $5 = 2 A + B$

$B = 5 - 2 A = 5 + 14 = 19$

$D = - B = - 19$

Therefore,

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

So,

int((x^2+5x-dx)/(x^2(x+1)^2)=-7intdx/x^2+19intdx/x-11intdx/(x+1)^2-19intdx/(x+1)

$= \frac{7}{x} + 19 \ln \left(| x |\right) + \frac{11}{x + 1} - 19 \ln \left(| x + 1 |\right) + C$