Partial fraction problem in $\int \frac{dx}{x^2(x^2+1)}$ I'm stuck with this integral:
$$\int \frac{dx}{x^2(x^2+1)}$$
I know that it can be solved in a simple way adding $x^2-x^2$ in the numerator, but I have troubles with partial fraction decomposition:
$$\frac{1}{x^2(x^2+1)}=\frac{A}{x}+\frac{B}{x^2}+\frac{Cx+D}{x^2+1}$$
Then we get
$$1=Ax^4+Ax^2+Bx^3+Bx+Cx^4+Dx^3$$
But then I Find that 
$$A+C=0$$
$$B+D=0$$
$$A=0$$
$$B=0$$
So everything is zero and nothing is equal to $1$. I know that this is inconsistent and there are for sure some mistakes, but I can't find out where they are. Thanks for your help.

How did you get powers of $x^4$ in your expansion for the numerator?
$$\begin{align}\frac{A}{x}+\frac{B}{x^2}+\frac{Cx+D}{x^2+1}&=\frac{Ax(x^2+1)+B(x^2+1)+(Cx+D)x^2}{x^2(x^2+1)}\\
&=\frac{(A+C)x^3+(B+D)x^2+Ax+B}{x^2(x^2+1)}
\end{align}$$
Yielding equations:
$$\begin{align}B&=1\\A&=0\\B+D&=0\\A+C&=0\end{align}$$
