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$ == :$\displaystyle \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: :$\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 = \cos^{n - 1} b x       | c =  }} {{eqn | ll= \leadsto       | l = \frac {\d u} {\d x}       | r = -\paren {n - 1} b \cos^{n - 2} b x \sin b x       | c = Derivative of $\cos 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} \sin b x       | c =  }} {{eqn | ll= \leadsto       | l = v       | r = \frac {e^{a x} \paren {a \sin b x - b \cos b x} } {a^2 + b^2}       | c = Primitive of $e^{a x} \sin b x$ }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | r = \int e^{a x} \cos^{n - 1} b x \sin b x \rd x       | o =        | c =  }} {{eqn | r = \int \paren {\cos^{n - 1} b x} \paren {e^{a x} \sin b x} \rd x       | c =  }} {{eqn | r = \paren {\cos^{n - 1} b x} \paren {\frac {e^{a x} \paren {a \sin b x - b \cos b x} } {a^2 + b^2} }       | c = Integration by Parts }} {{eqn | o =        | ro= -       | r = \int \paren {\frac {e^{a x} \paren {a \sin b x - b \cos b x} } {a^2 + b^2} } \paren {-\paren {n - 1} b \cos^{n - 2} b x \sin b x} \rd x + C       | c =  }} {{eqn | r = \frac {e^{a x} \cos^{n - 1} b x \paren {a \sin b x - b \cos 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} \cos^{n - 2} b x \sin^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} \cos^{n - 1} b x \sin 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} \cos^{n - 1} b x \sin b x \rd x       | o =        | c = gathering terms }} {{eqn | r = \frac {e^{a x} \cos^{n - 1} b x \paren {a \sin b x - b \cos 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} \cos^{n - 2} b x \sin^2 b x \rd x + C       | c =  }} {{eqn | ll= \leadsto       | r = \paren {a^2 + n b^2} \int e^{a x} \cos^{n - 1} b x \sin b x \rd x       | o =        | c =  }} {{eqn | r = e^{a x} \cos^{n - 1} b x \paren {a \sin b x - b \cos b x}       | c = simplifying }} {{eqn | o =        | ro= +       | r = \paren {n - 1} a b \int e^{a x} \cos^{n - 2} b x \sin^2 b x \rd x + C       | c =  }} {{eqn | r = e^{a x} \cos^{n - 1} b x \paren {a \sin b x - b \cos b x}       | c =  }} {{eqn | o =        | ro= +       | r = \paren {n - 1} a b \int e^{a x} \cos^{n - 2} b x \paren {1 - \cos^2 b x} \rd x + C       | c = Sum of Squares of Sine and Cosine }} {{eqn | r = e^{a x} \cos^{n - 1} b x \paren {a \sin b x - b \cos b x}       | c = simplifying }} {{eqn | o =        | ro= +       | r = \paren {n - 1} a b \int e^{a x} \cos^{n - 2} b x \rd x       | c =  }} {{eqn | o =        | ro= -       | r = \paren {n - 1} a b \int e^{a x} \cos^n b x \rd x + C       | c =  }} {{eqn | ll= \leadsto       | r = \int e^{a x} \cos^{n - 1} b x \sin b x \rd x       | o =        | c =  }} {{eqn | r = \frac {e^{a x} \cos^{n - 1} b x \paren {a \sin b x - b \cos 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} \cos^{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} \cos^n b x \rd x + C       | c =  }} {{end-eqn}} and so rearranging: :$\displaystyle \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$