Primitive of Reciprocal of Root of a x + b by Root of p x + q/a p less than 0

Theorem
Let $a, b, p, q \in \R$ such that $a p \ne b q$. Let $a p < 0$.

Then:


 * $\ds \int \frac {\d x} {\sqrt {\paren {a x + b} \paren {p x + q} } } = \dfrac 2 {\sqrt {-a p} } \map \arctan {\sqrt {\dfrac {-p \paren {a x + b} } {a \paren {p x + q} } } } + C$

for all $x \in \R$ such that $\paren {a x + b} \paren {p x + q} > 0$.

Proof
Let us make the substitution:

Then:

Hence: