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

Apr 8, 2016

$\int \frac{{x}^{2} + x}{\left(x + 2\right) {\left(x - 1\right)}^{2}} \mathrm{dx} = \frac{2}{9} \ln \left\mid x + 2 \right\mid + \frac{7}{9} \ln \left\mid x - 1 \right\mid - \frac{2}{3 \left(x - 1\right)} + C$

Explanation:

Since the denominator has already been factored for us, we can tell that we're looking for a partial fraction decomposition of the form:

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

$= \frac{A}{x + 2} + \frac{B}{x - 1} + \frac{C}{x - 1} ^ 2$

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

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

Equating coefficients we get the following system of linear equations:

$\left\{\begin{matrix}A + B = 1 \\ - 2 A + B + C = 1 \\ A - 2 B + 2 C = 0\end{matrix}\right.$

Adding all three equations together, we find:

$3 C = 2$

So $\textcolor{b l u e}{C = \frac{2}{3}}$

Subtracting the second equation from the first, we have:

$3 A - C = 0$

Hence $\textcolor{b l u e}{A = \frac{2}{9}}$

Then from the first equation we find $\textcolor{b l u e}{B = \frac{7}{9}}$

So:

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

Hence:

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

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

$= \frac{2}{9} \ln \left\mid x + 2 \right\mid + \frac{7}{9} \ln \left\mid x - 1 \right\mid - \frac{2}{3 \left(x - 1\right)} + C$