# How to compute the coefficient of a generating function?

I would like to find a closed formula for the coefficients of the generating function $$f(x)=-{\frac {{x}^{4}+6\,{x}^{3}-2\,{x}^{2}+6\,x+1}{ \left( x+1 \right) \left( {x}^{2}+1 \right) \left( x-1 \right) ^{3}}} .$$

I am trying to do the following. \begin{align} f(x)=\sum_{i,j,k_1,k_2,k_3=0}^{\infty} (-x)^i (-x^2)^j x^{k_1+k_2+k_3}(1+6x-2x^2+6x^3+x^4). \end{align}

The expression is very complicated. Are there some simpler method (or some software) to find a closed formula for the coefficients? Thank you very much.

• Tried partial fractions? $$-{x^4+6x^3-2x^2+6x+1\over(x+1)(x^2+1)(x-1)^3}={A\over x+1}+{Bx+C\over x^2+1}+{D\over x-1}+{E\over(x-1)^2}+{F\over(x-1)^3}$$ – Gerry Myerson Mar 7 at 11:34

$$-{\frac {{x}^{4}+6\,{x}^{3}-2\,{x}^{2}+6\,x+1}{ \left( x+1 \right) \left( {x}^{2}+1 \right) \left( x-1 \right) ^{3}}} =\frac{0.25}{1-x}-\frac{0.75}{1+x}+\frac{x}{1+x^2}-\frac{1.5}{(1-x)^2}+\frac{3}{(1-x)^3}$$ then use the following series and differentiate it two times to replace all terms to series $$\frac{1}{1-x}=\sum_{n=0}^{\infty}x^n$$