If \(\int \frac{\left(x^4+1\right)}{x\left(x^2+1\right)^2} d x=A \log |x|+\frac{B}{1+x^2}+c\), then \(\mathrm{A}-\mathrm{B}\) is (where c is the constant of integration)
\(\int \frac{\mathrm{d} x}{x\left(x^3+1\right)}=\)
\[ \int \frac{x^3}{x^4+5 x^2+4} d x= \]
\[ \int \frac{x \mathrm{~d} x}{(x-1)(x-2)}= \]
\[ \int \frac{\mathrm{d} x}{x\left(x^2+1\right)}= \]