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

Feb 8, 2017

The answer is $= - \frac{7}{2 x} - \frac{5}{4} \ln \left(| x |\right) + \frac{5}{4} \ln \left(| x + 2 |\right) + C$

#### Explanation:

Let's perform the decomposition into partial fractions

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

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

As the denominators are the same, we compare the numerators

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

Let $A = 0$, $\implies$, $7 = 2 A$, $\implies$, $A = \frac{7}{2}$

Let $x = - 2$, $\implies$, $5 = 4 C$, $\implies$, $C = \frac{5}{4}$

Coefficients of $x$

$1 = A + 2 B$, $\implies$, $2 B = 1 - A = 1 - \frac{7}{2} = - \frac{5}{2}$

$B = - \frac{5}{4}$

Therefore,

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

So,

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

$= - \frac{7}{2 x} - \frac{5}{4} \ln \left(| x |\right) + \frac{5}{4} \ln \left(| x + 2 |\right) + C$