<s>[INST] How should I solve integrals of this type? The general form of the integral I want to solve is:
$$ \int e^{bx}\sin(ax)  dx$$
Euler's formula has a nice connection, but the i makes it too complicated.
Doing it by parts doesn't seem to get me anywhere.
Do you have any tips for how to begin solving this?
 [/INST] By using the exponential version of sine:
\begin{align}
\int e^{bx} \ \sin(ax) \ dx &= \frac{1}{2i} \int \left( e^{(b+ai)x} - e^{(b-ai)x}
\right) \ dx \\
&= \frac{1}{2i} \left[ \frac{e^{(b+ai)x}}{b+ai} - \frac{e^{(b-ai)x}}{b-ai} \right] \\
&= \frac{1}{2i (b+ai)(b-ai)} \left[ (b-ai) e^{(b+ai)x} - (b+ai)e^{(b-ai)x} 
\right] \\
&= \frac{1}{2i(b^{2}+a^{2})} \left[ b \ e^{bx} \left(e^{ai x} - e^{-ai x} \right) - (ai) e^{bx} \left( e^{ai x} + e^{-ai x} \right) \right] \\
&= \frac{e^{bx}}{b^{2} + a^{2}} \left[ b \sin(ax) - a \cos(ax) \right] 
\end{align}
By using integration by parts:
\begin{align}
\int e^{bx} \ \sin(ax) \ dx &= \frac{1}{b} e^{bx} \sin(ax) - \frac{a}{b} \int
e^{bx} \ \cos(ax) \ dx  \\
&= \frac{1}{b} e^{bx} \sin(ax) - \frac{a}{b^{2}} e^{bx} \cos(ax) - \frac{a^{2}}{b^{2}} \int e^{bx} \ \sin(ax) \ dx
\end{align}
which is
\begin{align}
\left( 1 + \frac{a^{2}}{b^{2}} \right) \int e^{bx} \ \sin(ax) \ dx = \frac{1}{b} e^{bx} \sin(ax) - \frac{a}{b^{2}} e^{bx} \cos(ax)
\end{align}
or
\begin{align}
\int e^{bx} \ \sin(ax) \ dx = \frac{e^{bx}}{b^{2} + a^{2}} \left[ b \sin(ax) - a \cos(ax) \right] 
\end{align}
</s>