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?
 A: This is related to a classing integration by parts question. It goes like this.
Call the original integral $I$, for reasons that you'll see in a moment. Then we have
$$\begin{align}
\int \sin(ax)\exp(bx) \mathrm dx &= \sin(ax) \frac{\exp(bx)}{b} - \frac{a}{b} \int \cos(ax) \exp(bx) \mathrm dx \\
&= \sin(ax) \frac{\exp(bx)}{b} - \frac{a}{b} \left(\cos(ax) \frac{\exp(bx)}{b} - \frac{a}{b}\int\cos(ax)\exp(bx) \mathrm dx\right) \\
&= \sin(ax) \frac{\exp(bx)}{b} - a\cos(ax) \frac{\exp(bx)}{b^2} + \frac{a^2}{b^2}I,
\end{align}$$
so that we can gather the $I$ terms on the left to see that
$$ I\left(1 + \frac{a^2}{b^2}\right) = \sin(ax) \frac{\exp(bx)}{b} - a\cos(ax) \frac{\exp(bx)}{b^2}.$$
In total,
$$ I = \left(1 + \frac{a^2}{b^2}\right)^{-1}\left(\sin(ax) \frac{\exp(bx)}{b} - a\cos(ax) \frac{\exp(bx)}{b^2}\right).$$
It's a bit clever, and a bit cool if you've never seen this done before. (And I omitted the constant of integration, so it's really this $+ C$).
A: Yet another way: guess that the answer is of the form 
$$\int e^{bx} \sin(a x) = c_1 e^{bx} \cos(ax) + c_2 e^{bx} \sin(ax)$$
differentiate both sides, and equate coefficients of $e^{bx} \cos(ax)$ and $e^{bx}\sin(ax)$:
$$ \eqalign{ 0 &= b c_1 + a c_2\cr
            1 &= -a c_1 + b c_2\cr}$$
Then solve for $c_1$ and $c_2$.
A: A nice variation on the standard method as given in @mixedmath's answer: let
$$I=\int e^{bx}\sin ax\,dx\quad\hbox{and}\quad J=\int e^{bx}\cos ax\,dx\ .$$
Integrating both of these by parts gives
$$I=\frac{1}{b}e^{bx}\sin ax-\frac{a}{b}J\quad\hbox{and}\quad
  J=\frac{1}{b}e^{bx}\cos ax+\frac{a}{b}I\ ;$$
now treat these as two equations in the unknowns $I$ and $J$, and solve.
A: Another way of exploiting the connection to the complex exponential function is to use $ \ e^{i \cdot ax} \ $ as the factor $ \ \cos (ax) \ + \ i \ \sin (ax) \ $ .  If you now integrate
$$ \ \int \ e^{bx} \ \cdot \ e^{i \cdot ax} \ \ dx \ \ = \ \ \int \ e^{(b + ia) \cdot x} \ \ dx \ \ = \ \ \frac{1}{b \ + \ ia} \ e^{(b + ia) \cdot x} \ \ , $$
treating the complex number in the same manner as any real constant in a similar integral, we obtain
$$ \frac{b \ - \ ia}{a^2 \ + \ b^2} \ \cdot \ e^{bx} \  [ \ \cos (ax) \ + \ i \ \sin (ax) \ ] \ \ . $$
What is nice about this technique is that we get a "two-fer" (and no need for integration by parts): separating the real  and imaginary parts of this anti-derivative, after multiplying it out, and relating them to the corresponding parts of the integrand, yields
$$ \ \int \ e^{bx} \ \cos(ax) \ \ dx \ \ = \ \ e^{bx} \ \left[ \ \frac{b}{a^2 \ + \ b^2} \  \cos (ax) \ + \ \frac{a}{a^2 \ + \ b^2} \  \ \sin (ax) \ \right]  $$
and
$$ \ \int \ e^{bx} \ \sin(ax) \ \ dx \ \ = \ \ e^{bx} \ \left[ \ \frac{b}{a^2 \ + \ b^2} \  \sin (ax) \ - \ \frac{a}{a^2 \ + \ b^2} \  \ \cos (ax) \ \right] \ \ .  $$
A: 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}
A: A third (or maybe fourth, depending on how you're counting) method (related to the one in David's answer) which uses a bit of linear algebra is as follows:
\begin{align*}
\left[\begin{array}{c}
e^{ax}\cos(bx)\\
e^{ax}\sin(bx)
\end{array}\right]' &= \left[
\begin{array}{c}
ae^{ax}\cos(bx) - be^{ax}\sin(bx)\\
ae^{ax}\sin(bx) + be^{ax}\cos(bx)
\end{array}
\right]\\
&= \left[
\begin{array}{cc}
a & -b\\
b & a
\end{array}
\right] \left[
\begin{array}{c}
e^{ax}\cos(bx)\\
e^{ax}\sin(bx)
\end{array}
\right]
\end{align*}
Using the adjoint method, and the fact that the integral is (up to a constant) the functional inverse of the derivative on the space of smooth functions, we have:
\begin{align*}
\int \left[\begin{array}{c}
e^{ax}\cos(bx)\\
e^{ax}\sin(bx)
\end{array}\right] \text{d}x &= \frac{1}{a^2+b^2} \left[
\begin{array}{cc}
a & b\\
-b & a
\end{array}
\right] \left[\begin{array}{c}
e^{ax}\cos(bx)\\
e^{ax}\sin(bx)
\end{array}\right] + \left[\begin{array}{c}
C_1\\
C_2
\end{array}\right]\\
&= \left[\begin{array}{c}
\frac{1}{a^2+b^2}\left(ae^{ax}\cos(bx) + be^{ax}\sin(bx)\right) + C_1\\
\frac{1}{a^2+b^2}\left(ae^{ax}\sin(bx)-be^{ax}\cos(bx)\right) + C_2
\end{array}\right]
\end{align*}
Hence we have:
\begin{align*}
\int e^{ax}\cos(bx) \,\text{d}x &= \frac{1}{a^2+b^2}\left(ae^{ax}\cos(bx) + be^{ax}\sin(bx)\right) + C\\
\int e^{ax}\sin(bx) \, \text{d}x &= \frac{1}{a^2+b^2}\left(ae^{ax}\sin(bx)-be^{ax}\cos(bx)\right) + C
\end{align*}


Why the downvote?  This method works quite well computing integrals of this type.
