Consider the two decompositions:
$\frac{x^2+1}{(x+2)(x-1)(x^2+x+1)}= \frac{A}{x+2} + \frac{B}{x-1} + \frac{Cx +D}{x^2+x+1}$,
and
$\frac{x^2+1}{(x-1)^3(x^2+1)^2}= \frac{A}{x-1} + \frac{B}{(x-1)^2} + \frac{C}{(x-1)^3} + \frac{Dx +E}{x^2+1}+ \frac{Fx +G}{(x^2+1)^2}$
Can someone explain to me why both the
$\frac{Cx +D}{x^2+x+1}$ term in the first, and the
$\frac{Dx +E}{x^2+1}$ term in the second, get a numerator of the form $Ax+B$?
The decomposition theorem over a field $F$ asserts that any rational fraction $\dfrac FG$ has a unique decomposition as described below:
Now, if the field is $F=\mathbf R$, the only irreducible polynomials are either linear polynomials, and the corresponding coefficients $A_{i,k}$ have degree $0$, i.e. are constants, or quadratic polynomials with a negative discriminant, and the corresponding coefficients are polynomials of degree at most $1$.