# How do you use partial fraction decomposition to decompose the fraction to integrate (x^2-5x+6)/(x^3-x^2+2x)?

Jun 19, 2015

See below

#### Explanation:

The denominator factors as: $x \left({x}^{2} - x + 2\right)$ and cannot be factored further using real numbers (discriminant is negative). The integrand cannot be reduced, so we proceed:

Find, $A , B , \mathmr{and} C$ to make:

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

We need:
$A {x}^{2} - A x + 2 A + B {x}^{2} + C x = {x}^{2} - 5 x + 6$

Solve the system:
$A + B = 1$
$- A + C = - 5$
$2 A = 6$

Obviously, $A = 3$ and this makes $B = - 2$ and $C = - 2$

The partial fraction decomposition is:

$\frac{3}{x} - \frac{2 x + 2}{{x}^{2} - x + 2} = \frac{{x}^{2} - 5 x + 6}{x \left({x}^{2} - x + 2\right)}$.

If you have time check by combining the fractions on the left to make sure you've made no mistakes.

Now integrate:

int (x^2-5x+6)/(x^3-x^2+2x)) dx = int (3/x)dx - int (2x+2)/(x^2-x+2) dx

The first integral is easy. I'd split the second using:

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

$\int \frac{2 x - 1}{{x}^{2} - x + 2} \mathrm{dx}$ is a simple substitution and then

$\int \frac{3}{{x}^{2} - x + 2} \mathrm{dx}$ is an inverse tangent with some constants to figure out by completing the square and substituting.