<s>[INST] Partial fraction expansion with quadratic factors in the denominator Question: expand in partial fractions:
$$\frac {x^5+x^4+3x^3-8x^2+28x+48} {x^6-16x^3+64} .$$
I factored the denominator as $(x-2)^2 (x^2+2x+4)^2$.
With a denominator like $(x-1)(x-2)^2$ I know it will be: 
$\frac A {x-1} + \frac B {x-2} + \frac C {(x-2)^2}$ (first of all I don't get why that is?).
But in this exercise, will $\frac {x^5+x^4+3x^3-8x^2+28x+48} {x^6-16x^3+64}$ be equal to $\frac A {x-2} + \frac B {(x-2)^2} + \frac C {x^2+2x+4} + \frac D {(x^2+2x+4)^2}$?
Thanks in advance.
 [/INST] Let's look at this a bit differently. As a first stage, we want to decompose the numerator $x^5+x^4+3x^3-8x^2+28x+48$ into components $p(x)(x^2+2x+4)^2+q(x)(x-2)^2$ so that we have $$\frac{x^5+x^4+3x^3-8x^2+28x+48}{(x^2+2x+4)^2(x-2)^2}=\frac {p(x)}{(x-2)^2}+\frac {q(x)}{(x^2+2x+4)^2}$$
We note by comparing degrees that $q(x)$ has degree at most $3$, so is of the form $(Cx+D)(x^2+2x+4)+Ex+f$ and $p(x)$ is of degree at most $1$ and can be written in the form $A(x-2)+B$. Then the expression becomes $$\frac A{x-2}+\frac B{(x-2)^2}+\frac {Cx+D}{x^2+2x+4}+\frac {Ex+F}{(x^2+2x+4)^2}$$
Now we are trying to match a numerator of degree $5$ which has $6$ independent coefficients, and this expression has a matching six constants to be determined. The numerator might be kinder than that, but in principle we cannot simplify this general form, where the degree of the numerator in the partial fractions is one less than the relevant degree in the denominator, unless we can use some special feature of the problem at hand.
</s>