Evaluate integral with quadratic expression without root in the denominator $$\int \frac{1}{x(x^2+1)}dx = ? $$ 
How to solve it? Expanding to $\frac {A}{x}+ \frac{Bx +C}{x^2+1}$ would be wearisome.

It is not hard to express it as partial fraction, if you write $1$ in the numerator as $x^2+1 - x^2$.
Hence, $$\dfrac1{x(x^2+1)} = \dfrac{x^2+1-x^2}{x(x^2+1)} = \dfrac{x^2+1}{x(x^2+1)} - \dfrac{x^2}{x(x^2+1)} = \dfrac1x - \dfrac{x}{x^2+1}$$
Hence,
$$\int \dfrac{dx}{x(x^2+1)} = \int \dfrac{dx}x - \int\dfrac{x}{x^2+1}dx = \log(x) - \dfrac12 \log(x^2+1) + \text{ constant}$$
