<s>[INST] Partial fraction decomposition of $\frac{x^3+x+2}{x(x^2+1)^2}$ Help me solve this
$$\dfrac{x^3+x+2}{x(x^2+1)^2}$$
It looked like a simple one, but became complicated in my hands because i tried it like this:
$$\dfrac{x^3+x+2}{x(x^2+1)^2}=\dfrac{A}{x}+\dfrac{Bx+C}{x^2+1}+\dfrac{Dx+E}{(x^2+1)^2} $$
multiply all sides by $x(x^2+1)^2$ to get
$x^3+x+2= A(x^2+1)+Bx(x^3+x)+C(x^2+1)+Dx^2+Ex$
group like terms:
$x^3+x+2=Bx^4+ Ax^2+Bx^2+Cx^2+Dx^2+Ex+A+C$
$x^3+x+2=Bx^4+ (A+B+C+D)x^2+Ex+A+C$
The rest seems like am in the wrong path..because I think $x^4$ seems to be misplaced.. any idea?
 [/INST] You're working with an incorrect equation.
After multiplying both sides by $x(x^2 + 1)^2$, you should have $$\begin{align} x^3+x+2 & = A(x^2+1)^2+Bx(x^3+x)+C(x^3+x)+Dx^2+Ex\\ 
&= Ax^4+ 2Ax^2 + A +Bx^4 + Bx^2 +Cx^3 + Cx +Dx^2 + E x
\end{align}$$
</s>