What is the partial-fraction decomposition of #(x^2+2x+7)/(x(x-1)^2)#?
The factors on the denominator are obvious. They are all linear, but one of them is a double factor. So we want
Combining the rations on the right, we get a numerator pf:
# = (A+B)x^2 +(-2A-B+C)x+A#.
Setting the coefficients equal to those of the original numerator,
It is immediate that
It is a good idea to check the answer by getting the common denominator. (I did that on paper, but I'm not going to type it up.)