Primitive of Reciprocal of p x + q by Root of a x + b/p (b p - a q) greater than 0

Theorem
Let $a, b, p, q \in \R$ such that $a p \ne b q$ and such that $p \ne 0$. Let $p \paren {b p - a q} > 0$.

Then:


 * $\ds \int \frac {\d x} {\paren {p x + q} \sqrt {a x + b} } = \frac 1 {\sqrt {p \paren {b p - a q} } } \ln \size {\frac {\sqrt {p \paren {a x + b} } - \sqrt {b p - a q} } {\sqrt {p \paren {a x + b} } + \sqrt {b p - a q} } } + C$

Lemma
We have that:
 * $p \paren {b p - a q} > 0$

which means:
 * $\dfrac {b p - a q} p > 0$

Hence let:
 * $d^2 = \dfrac {b p - a q} p$

Thus: