Primitive of x squared over a x squared plus b x plus c

Theorem
Let $a \in \R_{\ne 0}$.

Then:
 * $\displaystyle \int \frac {x^2 \ \mathrm d x} {a x^2 + b x + c} = \frac x a - \frac b {2 a^2} \ln \left\vert{a x^2 + b x + c}\right\vert - \frac {b^2 - 2 a c} {2 a^2} \int \frac {\mathrm d x} {a x^2 + b x + c}$

Also see

 * Primitive of $\dfrac 1 {a x^2 + b x + c}$