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

Theorem

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

Proof
From Primitive of $\paren {p x + q}^n \sqrt {a x + b}$:
 * $\ds \int \paren {p x + q}^n \sqrt {a x + b} \rd x = \frac {2 \paren {p x + q}^{n + 1} \sqrt {a x + b} } {\paren {2 n + 3} p} + \frac {b p - a q} {\paren {2 n + 3} p} \int \frac {\paren {p x + q}^n} {\sqrt {a x + b} } \rd x$

Putting $n = \dfrac 1 2$: