Evaluate $\int e^{-3x}\cos^3x\,dx$
My Attempt
\begin{align} & \int e^{-3x} \cos^3x\,dx=\cos^3x \cdot \frac{e^{-3x}}{-3}-\int3\cos^2x\sin x \cdot \frac{e^{-3x}}{-3} \, dx \\ = {} &\frac{-1}{3}\cos^3x \cdot e^{-3x}+\int\cos^2x\sin x \cdot e^{-3x} \, dx\\ = {} & \frac{-1}{3}\cos^3x\cdot e^{-3x}+\cos^3x\cdot e^{-3x} - \int\bigg[-2\cos x\sin x\cdot e^{-3x}-3\cos^2x\cdot e^{-3x}\bigg](-\cos x)\,dx\\ = {} & \frac{-1}{3}\cos^3x\cdot e^{-3x}+\cos^3x\cdot e^{-3x}+2\int \cos^2x\sin x \cdot e^{-3x} \, dx-3\int\cos^3x\cdot e^{-3x}\,dx \end{align}
How do I solve this integral ?
I have a personal favorite approach to this sort of question that, though inefficient, makes things very straightforward and does not require any innovation with integration by parts or obscure trig identities. The trick is to use the exponential definition of $\cos$ to reduce to an integral of exponential functions, which is easy to deal with. Here this is the first step: $$ \int e^{-3x} cos^3(x) dx = \int e^{-3x} \bigg[\frac{e^{ix} + e^{-ix}}{2} \bigg]^3dx.$$
After this step, the rest is straightforward: expand the cube, distribute, integrate the exponentials and after everything has simplified out use the exponential definitions of $\sin$ and $\cos$ to go back to trig functions.
This approach has the advantage of working the same for almost all integrals of this form and not requiring much memorization, but has the downside of being a bit ugly.