Primitive of a x + b over p x + q

Theorem

 * $\displaystyle \int \frac {a x + b} {p x + q} \ \mathrm d x = \frac {a x} p + \frac {b p - a q} {p^2} \ln \left\vert{p x + q}\right\vert + C$