# 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

$\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$:

 $\ds$  $\ds \int \sqrt {\paren {a x + b} \paren {p x + q} } \rd x$ $\ds$ $=$ $\ds \frac {2 \paren {p x + q}^{1 / 2 + 1} \sqrt {a x + b} } {\paren {2 \cdot \frac 1 2 + 3} p} + \frac {b p - a q} {\paren {2 \cdot \frac 1 2 + 3} p} \int \frac {\paren {p x + q}^{1 / 2} } {\sqrt {a x + b} } \rd x$ $\ds$ $=$ $\ds \frac {2 \paren {p x + q} \sqrt {p x + q} \sqrt {a x + b} } {4 p} + \frac {b p - a q} {4 p} \int \frac {\sqrt {p x + q} } {\sqrt {a x + b} } \rd x$ $\ds$ $=$ $\ds \frac {2 \paren {p x + q} \sqrt {p x + q} \sqrt {a x + b} } {4 p} + \frac {b p - a q} {4 p} \paren {\frac {\sqrt {\paren {a x + b} \paren {p x + q} } } a + \frac {a q - b p} {2 a} \int \frac {\d x} {\sqrt {\paren {a x + b} \paren {p x + q} } } }$ Primitive of $\dfrac {\sqrt {p x + q} } {\sqrt {a x + b} }$ $\ds$ $=$ $\ds \frac {\paren {2 a \paren {p x + q} + \paren {b p - a q} } \sqrt {\paren {a x + b} \paren {p x + q} } } {4 a p} - \frac {\paren {b p - a q}^2 } {8 a p} \int \frac {\d x} {\sqrt {\paren {a x + b} \paren {p x + q} } }$ extracting common factor $\ds$ $=$ $\ds \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} } }$ simplifying

$\blacksquare$