<s>[INST] Partial fraction decomposition of a rational function with denominator $x^5+2x^4+x^3-x^2-2x-1$ 
Factorize the denominator completely and write $f(x)$ as a partial fraction given $$f(x) = \frac{2x^5+15x^4+15x^3+2x^2+2}{x^5+2x^4+x^3-x^2-2x-1}$$

Any ideas for this partial fraction question? Not a clue how to go about it, the normal methods Im used to dont work. Any tips for direction will be greatly appreciated
I tried the general methods of breaking down the denominator and placing the parts over A and B, as well as C - the 2 factorizations that I tried using were (x + 1)^2 (x^3 - 1) and (x+1)^2 ( x^2 + x + 1) (x-1). I tried long division of the polynomials as well but for some reason I wasnt able to get it to work. Thanks for the feed back! 
 [/INST] $$f(x) = \frac{2x^5+15x^4+15x^3+2x^2+2}{x^5+2x^4+x^3-x^2-2x-1}$$
First: By polynomial long division, we obtain $$f(x)= \frac{2x^5+15x^4+15x^3+2x^2+2}{x^5+2x^4+x^3-x^2-2x-1} = 2 + \frac{5x^4 + 13x^3+ 4x^2 + 4x+4}{x^5 + 2x^4 +x^3-x^2-2x - 1}$$
Now, we factor the denominator. Noting that both $x=-1$ and $x = 1$ are roots of the denominator, we know that $$x^5+2x^4 + x^3 - x^2 - 2x - 1 = (x-1)(x+2)g(x)$$ To solve for the third degree polynomial $g(x)$, we divide the denominator by $(x-1)(x+1) = x^2 - 1$ to obtain $$g(x) = x^3 + 2x^2 + 2x +1 = (x+1)(x^2 + x+1)$$
That gives us $$f(x) = 2 +\frac{5x^4+13x^3 + 4x^2 + 4x + 4}{(x-1)(x+1)^2(x^2 + x + 1)} = 2 + \frac{A}{x-1} + \frac{B}{x+1} + \frac C{(x+1)^2} + \frac{Dx + E}{x^2 + x + 1}$$
Can you take it from here? We need only solve for $A, B, C, D, E$, knowing that $$A(x+1)^2(x^2 + x+1) + B(x-1)(x+1)(x^2 + x + 1) + C(x-1)(x^2 + x + 1) + (Dx+E)(x-1)(x+1)^2 = 5x^4 + 13x^3 + 4x^2 + 4x + 4$$
</s>