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

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

 * $\ds \int e^{a x} \cos^{n - 1} b x \sin b x \rd x = \frac {e^{a x} \cos^{n - 1} b x \paren {a \sin b x - b \cos b x} } {a^2 + n b^2} - \frac {\paren {n - 1} a b} {a^2 + n b^2} \paren {\int e^{a x} \cos^n b x \rd x - \int e^{a x} \cos^{n - 2} b x \rd x} + C$

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

let:

and let:

Then:

and so rearranging:


 * $\ds \int e^{a x} \cos^{n - 1} b x \sin b x \rd x = \frac {e^{a x} \cos^{n - 1} b x \paren {a \sin b x - b \cos b x} } {a^2 + n b^2} - \frac {\paren {n - 1} a b} {a^2 + n b^2} \paren {\int e^{a x} \cos^n b x \rd x - \int e^{a x} \cos^{n - 2} b x \rd x} + C$