# Primitive of Power of a x + b over Power of p x + q/Formulation 2

## Theorem

$\displaystyle \int \frac {\paren {a x + b}^m} {\paren {p x + q}^n} \rd x = \frac {-1} {\paren {n - m - 1} p} \paren {\frac {\paren {a x + b}^m} {\paren {p x + q}^{n - 1} } + m \paren {b p - a q} \int \frac {\paren {a x + b}^{m - 1} } {\paren {p x + q}^n} \rd x}$

## Proof

$\displaystyle \int \paren {a x + b}^m \paren {p x + q}^n \rd x = \frac {\paren {a x + b}^m \paren {p x + q}^{n + 1} } {\paren {m + n + 1} a} + \frac {m \paren {b p - a q} } {\paren {m + n + 1} p} \int \paren {a x + b}^{m - 1} \paren {p x + q}^n \rd x$

Setting $n := -n$:

 $\displaystyle$  $\displaystyle \int \frac {\paren {a x + b}^m} {\paren {p x + q}^n} \rd x$ $\displaystyle$ $=$ $\displaystyle \int \paren {a x + b}^m \paren {p x + q}^{-n} \rd x$ $\displaystyle$ $=$ $\displaystyle \frac {\paren {a x + b}^m \paren {p x + q}^{-n + 1} } {\paren {m - n + 1} p} + \frac {m \paren {b p - a q} } {\paren {m - n + 1} p} \int \paren {a x + b}^{m - 1} \paren {p x + q}^{-n} \rd x$ $\displaystyle$ $=$ $\displaystyle \frac {-1} {\paren {n - m - 1} p} \paren {\frac {\paren {a x + b}^m} {\paren {p x + q}^{n - 1} } + m \paren {b p - a q} \int \frac {\paren {a x + b}^{m - 1} } {\paren {p x + q}^n} \rd x}$

$\blacksquare$