Integration by partial fraction mistake I am trying to understand my mistake using the partial fraction method to solve $ \displaystyle\int{\frac{2x-5}{x^2-4x+4}} $.
Here's what I have so far:
$$ \frac{2x+5}{x^3-4x^2+4x}  = \frac{2x+5}{x(x-2)^2} = \frac{A}{x} + \frac{B}{(x-2)^2}$$
And its easy to see that $A=\displaystyle\frac{5}{4}$ and that $B=\displaystyle\frac{9}{2}$. Somehow I get a completely different result then that of my professor's. She did the following:
$$ \frac{2x+5}{x^3-4x^2+4x}  = \frac{2x+5}{x(x-2)^2} = \frac{A}{x} + \frac{B}{(x-2)} + \frac{C}{(x-2)^2}$$
Can anyone please tell me where my mistake is? Thanks

If the denominator has no repeated factor, then it's easy to express it into partial fraction. For example
$$\frac{-2x+3}{x^3-x} =\frac{-2x+3}{x(x-1)(x+1)}= \frac{A}{x} + \frac{B}{(x-1)} + \frac{C}{(x+1)},$$
$$\frac{7}{x^4-3x^2+2} =\frac{-2x+3}{(x-2)(x+2)(x-1)(x+1)}= \frac{A}{x-2} + \frac{B}{x+2} + \frac{C}{x-1}+\frac{C}{x+1}
.$$
However, if the  denominator has repeated factor, it's more complicated. Basically we include all the lower power of the repeated factor. Therefore, in your example, we have
$$\frac{2x+5}{x^3-4x^2+4x}  = \frac{2x+5}{x(x-2)^2} = \frac{A}{x} + \frac{B}{(x-2)} + \frac{C}{(x-2)^2}.$$
Let me do two more examples
$$\frac{4x+1}{x^4+2x^3+x^2}=\frac{4x+1}{x^2(x+1)^2}=\frac{A}{x} + \frac{B}{x^2} + \frac{C}{x+1} + \frac{D}{(x+1)^2},$$
$$\frac{-5x+1}{(x+2)(x-1)^3}=\frac{A}{x+2} + \frac{B}{x-1} + \frac{C}{(x-1)^2} + \frac{D}{(x-1)^3}.$$
