Primitive of Reciprocal of Root of a x + b by Root of p x + q

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

Then:


 * $\ds \int \frac {\d x} {\sqrt {\paren {a x + b} \paren {p x + q} } } = \begin {cases}

\dfrac 2 {\sqrt {-a p} } \map \arctan {\sqrt {\dfrac {-p \paren {a x + b} } {a \paren {p x + q} } } } & : a p < 0 \\ \dfrac {-1} {\sqrt {-a p} } \map \arcsin {\dfrac {2 a p x + b p + a q} {a q - b p} } & : a > 0, p < 0 \\ \ds \dfrac 2 {\sqrt {a p} } \map \ln {\sqrt {\size {p \paren {a x + b} } + \size {a \paren {p x + q} } } } & : a p > 0 \\ \end {cases} + C$

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

Case $3$: $a p > 0$
Let $a p > 0$.

Then:

Let $c^2 > 0$.

Then:

Let $c^2 < 0$.

Then: