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.
 A: The question is not entirely clear. Your expression can be also writen as
$$
\frac{3 x}{\left(x^2+2 x+4\right)^2}+\frac{x+2}{x^2+2 x+4}+\frac{1}{(x-2)^2}
$$
hope this helps
A: When the denominator contains factors like $(ax^2 + bx + c)^p$ with $b^2 - 4ac < 0$ (such as $x^2 + 2x + 4$ in your case), then the fractions that appear in the expansions are
$$\frac {A_1 x + B_1} {ax^2 + bx + c} + \frac {A_2 x + B_2} {(ax^2 + bx + c)^2} + \dots + \frac {A_p x + B_p} {(ax^2 + bx + c)^p} .$$
In your case, the expansion is
$$ \frac A {x-2} + \frac B {(x-2)^2} + \frac {Cx + D} {x^2 + 2x + 4} + \frac {Ex + F} {(x^2 + 2x + 4)^2} .$$
A: 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.
