Primitive of Exponential of a x by Power of Cosine of b x/Lemma 1

Lemma for Primitive of $e^{a x} \sin^n b x \cos b x$

 * $\displaystyle \int e^{a x} \cos^{n - 1} b x \sin b x \ \mathrm d x = \frac {e^{a x} \cos^{n - 1} b x \left({a \sin b x - b \cos b x}\right)} {a^2 + n b^2} - \frac {\left({n - 1}\right) a b} {a^2 + n b^2} \left({\int e^{a x} \cos^n b x \ \mathrm d x - \int e^{a x} \cos^{n - 2} b x \ \mathrm d x}\right) + C$

Proof
With a view to expressing the primitive in the form:
 * $\displaystyle \int u \frac {\mathrm d v}{\mathrm d x} \ \mathrm d x = u v - \int v \frac {\mathrm d u}{\mathrm d x} \ \mathrm d x$

let:

and let:

Then:

and so rearranging:


 * $\displaystyle \int e^{a x} \cos^{n - 1} b x \sin b x \ \mathrm d x = \frac {e^{a x} \cos^{n - 1} b x \left({a \sin b x - b \cos b x}\right)} {a^2 + n b^2} - \frac {\left({n - 1}\right) a b} {a^2 + n b^2} \left({\int e^{a x} \cos^n b x \ \mathrm d x - \int e^{a x} \cos^{n - 2} b x \ \mathrm d x}\right) + C$