I have a question about the following partial fraction:
$$\frac{x^4+2x^3+6x^2+20x+6}{x^3+2x^2+x}$$ After long division you get: $$x+\frac{5x^2+20x+6}{x^3+2x^2+x}$$ So the factored form of the denominator is $$x(x+1)^2$$ So $$\frac{5x^2+20x+6}{x(x+1)^2}=\frac{A}{x}+\frac{B}{x+1}+\frac{C}{(x+1)^2}$$
Why is the denominator under $C$ not simply $x+1$? It is $x$ times $(x+1)^2$ and not $(x+1)^3$
Notice that the RHS after simplification must have an identical denominator as with the LHS.
The LHS denominator has a cubic term, hence the RHS must also be cubic.
So the choice for the term under $C$ has to be $(x+1)^2$, and not the ones you have suggested.