Primitive of Reciprocal of p x + q by Root of a x + b/p (b p - a q) less 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} } = \dfrac 2 {\sqrt {p \paren {a q - b p} } } \arctan \sqrt {\dfrac {p \paren {a x + b} } {a q - b p} } + 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: