Primitive of Reciprocal of Root of a x + b by Root of p x + q/a p greater 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} } \ln \size {\sqrt {p \paren {a x + b} } + \sqrt {a \paren {p x + q} } } + C$

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

Lemma $2$
We have that $a p > 0$.

Thus:

Let $\dfrac {b p - a q} p > 0$.

Then we set:
 * $(2): \quad c^2 :=\dfrac {b p - a q} p$

Then:

Let $\dfrac {b p - a q} p < 0$.

Then we set:
 * $(3): \quad c^2 := -\dfrac {b p - a q} p$

Then:

Thus we have in both cases that:

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

Then: