Theorem: Primitive of Exponential of a x by Power of Sine of b x

:$\ds \int e^{a x} \sin^n b x \rd x = \frac {e^{a x} \sin^{n - 1} b x} {a^2 + n^2 b^2} \paren {a \sin b x - n b \cos b x} + \frac {n \paren {n - 1} b^2} {a^2 + n^2 b^2} \int e^{a x} \sin^{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:
{{begin-eqn}}
{{eqn | l = u
      | r = \sin^n b x
      | c = 
}}
{{eqn | ll= \leadsto
      | l = \frac {\d u} {\d x}
      | r = n b \sin^{n - 1} b x \cos b x
      | c = Derivative of $\sin a x$, Derivative of Power, Chain Rule for Derivatives
}}
{{end-eqn}}
and let:
{{begin-eqn}}
{{eqn | l = \frac {\d v} {\d x}
      | r = e^{a x}
      | c = 
}}
{{eqn | ll= \leadsto
      | l = v
      | r = \frac {e^{a x} } a
      | c = Primitive of $e^{a x}$
}}
{{end-eqn}}
Then:
{{begin-eqn}}
{{eqn | l = \int e^{a x} \sin^n b x \rd x
      | r = \sin^n b x \paren {\frac {e^{a x} } a} - \int \paren {\frac {e^{a x} } a} n b \sin^{n - 1} b x \cos b x \rd x + C
      | c = Integration by Parts
}}
{{eqn | n = 1
      | r = \frac {e^{a x} \sin^n b x} a - \frac {n b} a \int e^{a x} \sin^{n - 1} b x \cos b x \rd x + C
      | c = Primitive of Constant Multiple of Function
}}
{{end-eqn}}
From Primitive of $e^{a x} \sin^{n - 1} b x \cos b x$: Lemma 1:
:$\ds \int e^{a x} \sin^{n - 1} b x \cos b x \rd x = \frac {e^{a x} \sin^{n - 1} b x \paren {a \cos b x + b \sin b x} } {a^2 + n b^2} + \frac {\paren {n - 1} a b} {a^2 + n b^2} \paren {\int e^{a x} \sin^n b x \rd x - \int e^{a x} \sin^{n - 2} b x \rd x} + C$
Hence:
{{begin-eqn}}
{{eqn | r = \int e^{a x} \sin^n b x \rd x
      | o = 
      | c = 
}}
{{eqn | r = \frac {e^{a x} \sin^n b x} a - \frac {n b} a \int e^{a x} \sin^{n - 1} b x \cos b x \rd x + C
      | c = from $(1)$
}}
{{eqn | r = \frac {e^{a x} \sin^n b x} a - \frac {n b} {a \paren {a^2 + n b^2} } e^{a x} \sin^{n - 1} b x \paren {a \cos b x + b \sin b x}
      | c = Primitive of $e^{a x} \sin^n b x$: Lemma 1
}}
{{eqn | o = 
      | ro= -
      | r = \frac {n \paren {n - 1} b^2} {a^2 + n b^2} \int e^{a x} \sin^n b x \rd x + \frac {n \paren {n - 1} b^2} {a^2 + n b^2} \int e^{a x} \sin^{n - 2} b x \rd x + C
      | c = 
}}
{{eqn | ll= \leadsto
      | r = \paren {1 + \frac {n \paren {n - 1} b^2} {a^2 + n b^2} } \int e^{a x} \sin^n b x \rd x
      | o = 
      | c = 
}}
{{eqn | r = \frac {e^{a x} \sin^n b x} a - \frac {n b} {a \paren {a^2 + n b^2} } e^{a x} \sin^{n - 1} b x \paren {a \cos b x + b \sin b x}
      | c = 
}}
{{eqn | o = 
      | ro= +
      | r = \frac {n \paren {n - 1} b^2} {a^2 + n b^2} \int e^{a x} \sin^{n - 2} b x \rd x + C
      | c = 
}}
{{eqn | ll= \leadsto
      | r = \frac {a^2 + n b^2 + n^2 b^2 - n b^2} {a^2 + n b^2} \int e^{a x} \sin^n b x \rd x
      | o = 
      | c = 
}}
{{eqn | r = \frac {e^{a x} \sin^n b x} a - \frac {n b} {a \paren {a^2 + n b^2} } e^{a x} \sin^{n - 1} b x \paren {a \cos b x + b \sin b x}
      | c = 
}}
{{eqn | o = 
      | ro= +
      | r = \frac {n \paren {n - 1} b^2} {a^2 + n b^2} \int e^{a x} \sin^{n - 2} b x \rd x + C
      | c = 
}}
{{eqn | ll= \leadsto
      | r = \paren {a^2 + n^2 b^2} \int e^{a x} \sin^n b x \rd x
      | o = 
      | c = 
}}
{{eqn | r = \frac {a^2 + n b^2} a e^{a x} \sin^n b x - \frac {n b} a e^{a x} \sin^{n - 1} b x \paren {a \cos b x + b \sin b x}
      | c = 
}}
{{eqn | o = 
      | ro= +
      | r = \paren {n \paren {n - 1} b^2} \int e^{a x} \sin^{n - 2} b x \rd x + C
      | c = 
}}
{{eqn | ll= \leadsto
      | r = \paren {a^2 + n^2 b^2} \int e^{a x} \sin^n b x \rd x
      | o = 
      | c = 
}}
{{eqn | r = e^{a x} \sin^{n - 1} b x \paren {a \sin b x - n b \cos b x}
      | c = Primitive of $e^{a x} \sin^n b x$: Lemma 2
}}
{{eqn | o = 
      | ro= +
      | r = \paren {n \paren {n - 1} b^2} \int e^{a x} \sin^{n - 2} b x \rd x + C
      | c = 
}}
{{eqn | ll= \leadsto
      | r = \int e^{a x} \sin^n b x \rd x
      | o = 
      | c = 
}}
{{eqn | r = \frac {e^{a x} \sin^{n - 1} b x} {a^2 + n^2 b^2} \paren {a \sin b x - n b \cos b x} + \frac {n \paren {n - 1} b^2} {a^2 + n^2 b^2} \int e^{a x} \sin^{n - 2} b x \rd x + C
      | c = 
}}
{{end-eqn}}
{{qed}}