I'm told that given a function $f(x)=\frac{P(x)}{Q(x)}$, if $\deg(P)>\deg(Q)$ then $f$ is improper, which makes sense when I think of real numbers like $5/2$. And in this case we would have to do long division to ensure that the degree of the denominator is greater. Something of the form $S(x)+\cfrac{R(x)}{Q(x)}$.
My book eventually gives the example problem of case 4, when $Q(x)$ contains repeated quadratics $$\cfrac{x^3+x^2+1}{x(x-1)(x^2+x+1)(x^2+1)^3}$$
So now I'm thinking since the numerator cannot be factored and the leading degree is greater than $x$, then the first term of the partial fraction should be $\cfrac{Ax+B}{x}$, likewise since it's also greater than $(x-1)$ then the second term is $\cfrac{Cx+D}{x-1}$, then $\cfrac{Ex+F}{(x^2+x+1)}+\cfrac{G}{(x^2+1)}+\cfrac{H}{(x^2+1)^2}+\cfrac{I}{(x^2+1)^3}$
Instead, my textbooks solution obtains $$\cfrac{A}{x}+\cfrac{B}{x-1}+\cfrac{Cx+D}{x^2+x+1}+\cfrac{Ex+F}{x^2+1}+\cfrac{Gx+H}{(x^2+1)^2}+\cfrac{Ix+J}{(x^2+1)^3}$$
Could anyone explain what part of my interpretation here is wrong?
Let $\cfrac{P(x)}{Q(x)}=\cfrac{x^3+x^2+1}{x(x-1)(x^2+x+1)(x^2+1)^3}.$
This rational function is a proper fraction because $\deg(P)=3<10=\deg(Q)$,
and its denominator has been fully factorised into linear and irreducible quadratic factors;
so we can proceed to decompose it into partial fractions according to these rules:
By the Cover-up Rule, $\cfrac{P(x)}{Q(x)}=\cfrac{-1}{x}+\cfrac{1}{8(x-1)}+\cfrac{Cx+D}{x^2+x+1}+\cfrac{Ex+F}{x^2+1}+\cfrac{Gx+H}{(x^2+1)^2}+\cfrac{Ix+J}{(x^2+1)^3}$.
Equating coefficients gives $C=-1,D=-1,E=\frac{15}{8},F=\frac{-1}{8},G=\frac{3}{4},H=\frac{3}{4},I=\frac{-1}{2},J=\frac{1}{2}$.
Therefore $$\cfrac{P(x)}{Q(x)}=\cfrac{-1}{x}+\cfrac{1}{8(x-1)}-\cfrac{x+1}{x^2+x+1}+\cfrac{15x-1}{8(x^2+1)}+\cfrac{3(x+1)}{4(x^2+1)^2}+\cfrac{1-x}{2(x^2+1)^3}.$$