Partial Fractions Decomposition $\frac{6x^2 - 29x - 29}{(x+1)(x-3)^2}$ explanation repeated factors I am trying to solve the fraction $$\frac{6x^2 - 29x - 29}{(x+1)(x-3)^2}$$
into partial fractions. 
Now, I thought it could be solved into the following
$$\frac{6x^2 - 29x - 29}{(x+1)(x-3)^2} = \frac{A}{x+1} + \frac{B}{(x-3)^2}$$
but this is apparently incorrect. 
According to the text, the decomposition is 
$$\frac{6x^2 - 29x - 29}{(x+1)(x-3)^2} = \frac{A}{x+1} + \frac{B}{x-3} + \frac{C}{(x-3)^2}$$
I discussed this with my friend that the fraction first decomposes into 
$$\frac{6x^2 - 29x - 29}{(x+1)(x-3)^2} = \frac{A}{x+1} + \frac{Bx +C}{(x-3)^2}$$
but I can't see how he derived this. 
I don't understand how he is correct. 

When you decompose, the degree of the numerator will be less than the degree of the denominator.  How much less is yet to be determined.  Assume that it is one degree less, and then if you get a zero coefficient, so be it.
If you had something like...$\frac {P(x)}{(x^2 +x + 1)(x-1)}$
your first step would be $\frac {Ax + B}{x^2+ x+ 1} + \frac {C}{(x-1)}$
With each numerator of degree 1 less than each denominator.
And the you might want to break down the first term to make it easier to integrate.
e.g. $\frac {A(x+\frac12)}{x^2 + x + 1} + \frac {B}{(x+\frac 12)^2 + \frac 34}$
With this problem.
$(x-3)^2$ makes for a degree 2 denominator, and you need a degree 1 numerator.
So $\frac {A}{x+1} + \frac {Bx+C}{(x-3)^2}$ would be a good place to start.
but $\frac {B}{(x-3)} + \frac {C}{(x-3)^2}$ is easier to integrate, so you might want to skip the intermediate step.
