Primitive of Exponential of a x by Power of Sine of b x/Lemma 1
== Lemma for Primitive of $e^{a x} \sin^n b x \cos b x$ == :$\displaystyle \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$ == Proof == With a view to expressing the primitive in the form: :$\displaystyle \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 - 1} b x       | c =  }} {{eqn | ll= \leadsto       | l = \frac {\d u} {\d x}       | r = \paren {n - 1} b \sin^{n - 2} 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} \cos b x       | c =  }} {{eqn | ll= \leadsto       | l = v       | r = \frac {e^{a x} \paren {a \cos b x + b \sin b x} } {a^2 + b^2}       | c = Primitive of $e^{a x} \cos b x$ }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | r = \int e^{a x} \sin^{n - 1} b x \cos b x \rd x       | o =        | c =  }} {{eqn | r = \int \paren {\sin^{n - 1} b x} \paren {e^{a x} \cos b x} \rd x       | c =  }} {{eqn | r = \paren {\sin^{n - 1} b x} \paren {\frac {e^{a x} \paren {a \cos b x + b \sin b x} } {a^2 + b^2} }       | c = Integration by Parts }} {{eqn | o =        | ro= -       | r = \int \paren {\frac {e^{a x} \paren {a \cos b x + b \sin b x} } {a^2 + b^2} } \paren {\paren {n - 1} b \sin^{n - 2} b x \cos b x} \rd x + C       | c =  }} {{eqn | r = \frac {e^{a x} \sin^{n - 1} b x \paren {a \cos b x + b \sin b x} } {a^2 + b^2}       | c =  }} {{eqn | o =        | ro= -       | r = \frac {\paren {n - 1} a b} {a^2 + b^2} \int e^{a x} \sin^{n - 2} b x \cos^2 b x \rd x + C       | c = Linear Combination of Integrals }} {{eqn | o =        | ro= -       | r = \frac {\paren {n - 1} b^2} {a^2 + b^2} \int e^{a x} \sin^{n - 1} b x \cos b x \rd x + C       | c =  }} {{eqn | ll= \leadsto       | r = \paren {1 + \frac {\paren {n - 1} b^2} {a^2 + b^2} } \int e^{a x} \sin^{n - 1} b x \cos b x \rd x       | o =        | c = gathering terms }} {{eqn | r = \frac {e^{a x} \sin^{n - 1} b x \paren {a \cos b x + b \sin b x} } {a^2 + b^2}       | c =  }} {{eqn | o =        | ro= -       | r = \frac {\paren {n - 1} a b} {a^2 + b^2} \int e^{a x} \sin^{n - 2} b x \cos^2 b x \rd x + C       | c =  }} {{eqn | ll= \leadsto       | r = \paren {a^2 + n b^2} \int e^{a x} \sin^{n - 1} b x \cos b x \rd x       | o =        | c =  }} {{eqn | r = e^{a x} \sin^{n - 1} b x \paren {a \cos b x + b \sin b x}       | c = simplifying }} {{eqn | o =        | ro= -       | r = \paren {n - 1} a b \int e^{a x} \sin^{n - 2} b x \cos^2 b x \rd x + C       | c =  }} {{eqn | r = e^{a x} \sin^{n - 1} b x \paren {a \cos b x + b \sin b x}       | c =  }} {{eqn | o =        | ro= -       | r = \paren {n - 1} a b \int e^{a x} \sin^{n - 2} b x \paren {1 - \sin^2 b x} \rd x + C       | c = Sum of Squares of Sine and Cosine }} {{eqn | r = e^{a x} \sin^{n - 1} b x \paren {a \cos b x + b \sin b x}       | c = simplifying }} {{eqn | o =        | ro= -       | r = \paren {n - 1} a b \int e^{a x} \sin^{n - 2} b x \rd x       | c =  }} {{eqn | o =        | ro= +       | r = \paren {n - 1} a b \int e^{a x} \sin^n b x \rd x + C       | c =  }} {{eqn | ll= \leadsto       | r = \int e^{a x} \sin^{n - 1} b x \cos b x \rd x       | o =        | c =  }} {{eqn | r = \frac {e^{a x} \sin^{n - 1} b x \paren {a \cos b x + b \sin b x} } {a^2 + n b^2}       | c = simplifying }} {{eqn | o =        | ro= -       | r = \frac {\paren {n - 1} a b} {a^2 + n b^2} \int e^{a x} \sin^{n - 2} b x \rd x       | c =  }} {{eqn | o =        | ro= +       | r = \frac {\paren {n - 1} a b} {a^2 + n b^2} \int e^{a x} \sin^n b x \rd x + C       | c =  }} {{end-eqn}} and so rearranging: :$\displaystyle \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$