Finding $\int e^{2x} \sin{4x} \, dx$ Finding $$\int e^{2x} \sin 4x \, dx$$
I think I should be doing integration by parts...
If I let $u=e^{2x} \Rightarrow du = 2e^{2x}$,
$dv = \sin{4x} \Rightarrow v = -\frac{1}{4} \cos{4x}$
$\int{ e^{2x} \sin{4x}} dx = e^{2x}(-\frac{1}{4}\cos 4x) - \color{red}{\int (-\frac{1}{4} \cos 4x) 2e^{2x} \, dx}$
Highlighted in red, I seem to integrating an exponential times trig expression again ... doesn't seem like te right way to go
So I let $u=\sin{4x} \Rightarrow du = 4\cos 4x \, dx$
$dv = e^{2x} dx \Rightarrow v = \frac{1}{2} e^{2x}$
$\sin{4x}(\frac{1}{2} e^{2x}) - \int (\frac{1}{2} e^{2x})(4\cos4x) \, dx$
Again, its an exponential times a trig function?
Am I using the wrong substitution?

I would jump into complex values,
and noting that
$\sin 4x = \Im e^{4 i x}$ 
(I wrote \Im there, wanting to get the imaginary part, and got the $\Im$),
$$\int e^{2x} \sin 4x \, dx
= \Im \int e^{2x+4ix} \, dx
= \Im \int e^{x(2+4i)} \, dx
= \Im \frac{e^{x(2+4i)}}{2+4i}.
$$
Since $\frac{1}{2+4i} = \frac{2-4i}{20} = \frac{1-2i}{10}$
and $e^{x(2+4i)} = e^{2x}(\cos 4x + i \sin 4x)$,
I get, disregarding the $\frac{e^{2x}}{10}$ for a moment,
$\Im (1-2i)(\cos 4x + i \sin 4x)
= \Im ((\cos 4x + 2 \sin 4x) + i(-2\cos 4x + \sin 4x))
$
$
= -2\cos 4x + \sin 4x
$
so my final result is
$\frac{e^{2x}(-2\cos 4x + \sin 4x)}{10}$.
As a check the derivative of
$e^{2x}(-2\cos 4x + \sin 4x)$ (disregarding the 1/10 for now) is
$$
\begin{align}
& 2e^{2x}(-2\cos 4x + \sin 4x) + e^{2x}(8\sin 4x + 4\cos 4x) \\[4pt]
= {} & e^{2x}(-4\cos 4x + 2\sin 4x + 8\sin 4x + 4\cos 4x)
= e^{2x} (10 \sin 4x).
\end{align}
$$
