# 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:

 $\ds u$ $=$ $\ds \sqrt {a x + b}$ $\ds \leadsto \ \$ $\ds x$ $=$ $\ds \frac {u^2 - b} a$ $\ds \leadsto \ \$ $\ds \sqrt {p x + q}$ $=$ $\ds \sqrt {p \paren {\frac {u^2 - b} a} + q}$ $\ds$ $=$ $\ds \sqrt {\frac {p \paren {u^2 - b} + a q} a}$ $\ds$ $=$ $\ds \sqrt {\frac {p u^2 - b p + a q} a}$ $\text {(1)}: \quad$ $\ds$ $=$ $\ds \sqrt {\frac p a} \sqrt {u^2 - \paren {\frac {b p - a q} p} }$

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

Then:

 $\ds$  $\ds \int \frac {x \rd x} {\sqrt {\paren {a x + b} \paren {p x + q} } }$ $\ds$ $=$ $\ds \int \frac {2 u} a \paren {\frac {u^2 - b} a} \frac {\d u} {u \sqrt {\frac p a} \sqrt {u^2 - c^2} }$ Primitive of Function of $\sqrt {a x + b}$ $\ds$ $=$ $\ds \frac 2 {a \sqrt {a p} } \int \frac {u^2 \rd u} {\sqrt {u^2 - c^2} } - \frac {2 b} {a \sqrt {a p} } \int \frac {\d u} {\sqrt {u^2 - c^2} }$ Linear Combination of Primitives $\ds$ $=$ $\ds \frac 2 {a \sqrt {a p} } \paren {\frac {u \sqrt {u^2 - c^2} } 2 + \frac {c^2} 2 \map \ln {u + \sqrt {u^2 - c^2} } }$ Primitive of $\dfrac {x^2} {\sqrt {x^2 - a^2} }$ $\ds$ $=$ $\, \ds - \,$ $\ds \frac {2 b} {a \sqrt {a p} } \map \ln {u + \sqrt {u^2 - c^2} }$ ... and Primitive of $\dfrac 1 {\sqrt {x^2 - a^2} }$: Logarithm Form $\ds$ $=$ $\ds \frac 2 {a \sqrt {a p} } \paren {\frac {u \sqrt {u^2 - c^2} } 2 + \paren {\frac {c^2} 2 - b} \map \ln {u + \sqrt {u^2 - c^2} } }$ common factor $\ds$ $=$ $\ds \frac 2 {a \sqrt {a p} } \paren {\frac {\sqrt {a x + b} \sqrt {\frac a p} \sqrt {p x + q} } 2 + \paren {\frac {c^2} 2 - b} \map \ln {\sqrt {a x + b} + \sqrt {\frac a p} \sqrt {p x + q} } }$ substituting for $u$, noting that $\sqrt {p x + q} = \sqrt {\dfrac p a} \sqrt {u^2 - c^2}$ $\ds$ $=$ $\ds \frac {\sqrt {\paren {a x + b} \paren {p x + q} } } {a p} + \paren {\frac {b p - a q} {a p \sqrt {a p} } - \frac {2 b} {a \sqrt {a p} } } \map \ln {\frac {\sqrt {p \paren {a x + b} } + \sqrt {a \paren {p x + q} } } {\sqrt p} }$ substituting for $c^2$ and simplifying $\ds$ $=$ $\ds \frac {\sqrt {\paren {a x + b} \paren {p x + q} } } {a p} + \paren {\frac {b p - a q - 2 b p} {a p \sqrt {a p} } } \map \ln {\frac {\sqrt {p \paren {a x + b} } + \sqrt {a \paren {p x + q} } } {\sqrt p} }$ common denominator $\ds$ $=$ $\ds \frac {\sqrt {\paren {a x + b} \paren {p x + q} } } {a p} - \paren {\frac {b p + a q} {a p \sqrt {a p} } } \frac {\sqrt {a p} } 2 \int \frac {\d x} {\sqrt {\paren {a x + b} \paren {p x + q} } }$ Primitive of Reciprocal of $\sqrt {\paren {a x + b} \paren {p x + q} }$ $\ds$ $=$ $\ds \frac {\sqrt {\paren {a x + b} \paren {p x + q} } } {a p} - \paren {\frac {b p + a q} {2 a p} } \int \frac {\d x} {\sqrt {\paren {a x + b} \paren {p x + q} } }$ simplifying

$\blacksquare$