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

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

Then:
 * $\displaystyle \int \frac {\mathrm d x} {a x^2 + b x + c} = \begin{cases}

\dfrac 2 {\sqrt {4 a c - b^2} } \arctan \left({\dfrac {2 a x + b} {\sqrt {4 a c - b^2} } }\right) + C & : b^2 - 4 a c < 0 \\ \dfrac 1 {\sqrt {b^2 - 4 a c} } \ln \left\vert{\dfrac {2 a x + b - \sqrt {b^2 - 4 a c} } {2 a x + b + \sqrt {b^2 - 4 a c} } }\right\vert + C & : b^2 - 4 a c > 0 \\ \dfrac {-2} {2 a x + b} + C & : b^2 = 4 a c \end{cases}$

Proof
First:

Put: $z = 2 a x + b$

Let $D = b^2 - 4 a c$.

Thus:

Also see

 * Primitive of $\dfrac 1 {a x + b}$ for the case where $a = 0$