Solution
= Solution
A <partial fraction decomposition> gives
$$
\frac1{x(x^2+1)}=\frac1x-\frac{x}{x^2+1}.
$$
For the second term the <substitution rule> $t=x^2+1$, $dt=2x\,dx$ gives a <logarithm>. Thus
$$
\boxed{\int\frac{dx}{x(x^2+1)}=\ln|x|-\frac12\ln(x^2+1)+C,\qquad x\ne0.}
$$
The constant in the <antiderivative> may be chosen independently on the two <intervals> separated by $0$.