$$\int{\frac{dx}{(x+1)^2(x^2+1)}}$$
To solve this indefinite integral, I use fraction expansion and I get a wrong system of equations: $$ \left\{ \begin{array}{c} B = 0 \\ A + 2B + C = 0 \\ A + B + C = 1 \end{array} \right. $$
What is the problem with my fraction expansion?
Hint. The polynomial at the denominator is of degree $4$ and you have three parameters. Try with is the following partial fraction decomposition (with four parameters): $$\frac{1}{(x+1)^2(x^2+1)}=\frac{Ax+B}{x^2+1}+\frac{C}{x+1}+\frac{D}{(x+1)^2}.$$