Decompose $\frac{(x^3+x+1)}{(x^2+1)^2}$
Based on my understanding so far: The partials of the denominator are $(x^2+1)$ and $(x^2+1)^2$
$\frac{(x^3+x+1)}{(x^2+1)^2}$ can be decomposed into partial fractions as below:
$\frac{(x^3+x+1)}{(x^2+1)^2} = \frac{A}{x^2+1} +\frac{B}{(x^2+1)^2}$
multiply both sides by LCD which is $(x^2+1)^2$ we get:
$$x^3+x+1=A(x^2+1)+B$$ removing brackets
$$x^3+x+1=Ax^2+A+B$$
simplify
$$x(x^2+1)+1=A(x^2+1)+B$$
$\therefore$ looking at coefficients, $B=1$ and $A=x$.
Looking at the above, I don't seem to have a solution. Where am I going wrong? Am I on right path?