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

Theorem

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

Proof
Let:

Let $c^2 = \dfrac {b p - a q} p$.

Then: