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

Theorem

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

\dfrac {2 \sqrt{a x + b} } p + \dfrac {\sqrt {b p - a q} } {p \sqrt p} \ln \left\vert{\dfrac {\sqrt {p \left({a x + b}\right)} - \sqrt {b p - a q} } {\sqrt {p \left({a x + b}\right)} + \sqrt {b p - a q} } }\right\vert & : b p - a q > 0 \\ \dfrac {2 \sqrt{a x + b} } p - \dfrac {\sqrt {a q - b p} } {p \sqrt p} \arctan \sqrt {\dfrac {p \left({a x + b}\right)} {a q - b p} } & : b p - a q < 0 \\ \end{cases}$

Proof
From Primitive of Power of $a x + b$ over Power of $p x + q$: Formulation 2:


 * $\displaystyle \int \frac {\left({a x + b}\right)^m} {\left({p x + q}\right)^n} \ \mathrm d x = \frac {-1} {\left({n - m - 1}\right) p} \left({\frac {\left({a x + b}\right)^m} {\left({p x + q}\right)^{n-1} } + m \left({b p - a q}\right) \int \frac {\left({a x + b}\right)^{m-1}} { \left({p x + q}\right)^n} \ \mathrm d x}\right)$

Setting $m := \dfrac 1 2$ and $n = 1$:

From Primitive of Reciprocal of $p x + q$ by Root of $a x + b$:
 * $\displaystyle \int \frac {\mathrm d x} {\left({p x + q}\right) \sqrt{a x + b} } = \begin{cases}

\dfrac 1 {\sqrt {b p - a q} \sqrt p} \ln \left\vert{\dfrac {\sqrt {p \left({a x + b}\right)} - \sqrt {b p - a q} } {\sqrt {p \left({a x + b}\right)} + \sqrt {b p - a q} } }\right\vert & : b p - a q > 0 \\ \dfrac 2 {\sqrt {a q - b p} \sqrt p} \arctan \sqrt {\dfrac {p \left({a x + b}\right)} {a q - b p} } & : b p - a q < 0 \\ \end{cases}$

The result follows by substitution.