How to integrate $\int e^{2x}\sin(3x)dx$ by parts? $$\int e^{2x}\sin(3x)dx$$
First I set $u = e^{2x}, v' = \cos(3x)$
to get:
$$\int e^{2x}\sin(3x)dx = -\frac{e^{3x}}{3}\cos(3x) + \frac{2}{3}\int e^{2x}\cos(3x)dx$$
Applying integration by parts again yields:
$$-\frac{e^{2x}}{3}\cos(3x) + \frac{2}{3}\left(\frac{e^{2x}}{3}\sin(3x) -\frac{2}{3}\int e^{2x}\sin(3x)dx\right)$$
And it just keeps going on and on and I'm stuck. How can I solve this?
 A: You almost have it! Put
$$I:=\int e^{2x}\sin 3x\,dx$$
and now take your last line:
$$I=-\frac{e^{2x}}{3}\cos3x + \frac{2}{3}\left(\frac{e^{2x}}{3}\sin3x -\frac{2}{3}\int e^{2x}\sin3x\,dx\right)=\frac{e^{2x}}{3}\cos3x + \frac{2}{9}e^{2x}\sin3x -\color{red}{\frac{4}{9}\int e^{2x}sin3x}\implies$$
$$\implies\frac{13}9I=\frac{e^{2x}}{3}\cos3x + \frac{2}{9}e^{2x}\sin3x$$
and now end the exercise.
A: You are almost done. Lets denote your given integral as
$$I=\int e^{2x}\sin(3x)dx$$
Lets take a closer look at your final formula
$$\begin{align}
I&=-\frac{e^{2x}}3\cos(3x)+\frac23\left(\frac{e^{2x}}3\sin(3x)-\frac23\underbrace{\int e^{2x}\sin(3x)dx}_{=I}\right)\\
I&=-\frac{e^{2x}}3\cos(3x)+\frac23\left(\frac{e^{2x}}3\sin(3x)-\frac23I\right)\\
I&=-\frac{e^{2x}}3\cos(3x)+\frac29e^{2x}\sin(3x)-\frac49I\\
\Leftrightarrow I+\frac49I&=e^{2x}\left(\frac29\sin(3x)-\frac13\cos(3x)\right)\\
I&=\frac9{13}e^{2x}\left(\frac29\sin(3x)-\frac13\cos(3x)\right)\\
I&=\frac{e^{2x}}{13}\left(2\sin(3x)-3\cos(3x)\right)+c
\end{align}$$
Note that this can be done in a more general way for in order to integrate the function $e^{ax}\sin(bx)$ which turns out to equal
$$\int e^{ax}\sin(bx)dx=\frac{e^{ax}}{a^2+b^2}(a\sin(bx)-b\cos(bx))+c$$
A: $\displaystyle I=\int(e^{2x}\sin3x)dx=\dfrac{e^{2x}\sin 3x}{2}-\dfrac{3e^{2x}\cos3x}{4}+\int\dfrac{9e^{2x}(-\sin3x)dx}{4}$
$=\dfrac{e^{2x}\sin 3x}{2}-\dfrac{3e^{2x}\cos3x}{4}-\dfrac{9I}{4}$
$I=\dfrac{4}{13}\left(\dfrac{e^{2x}\sin 3x}{2}-\dfrac{3e^{2x}\cos3x}{4}\right)+C$
(Note: The result of indefinite integral is not unique.)
A: $$I=\int e^{ax}\sin bx\ \mathrm{d}x$$
$$\mathrm{d}v=\sin bx\ \mathrm{d}x\Rightarrow v=-\frac1b\cos bx\\u=e^{ax}\Rightarrow \mathrm{d}u=ae^{ax}\mathrm{d}x$$
$$I=-\frac{e^{ax}}b\cos bx+\frac ab\int e^{ax}\cos bx\ \mathrm{d}x$$
$$\mathrm{d}v=\cos bx\ \mathrm{d}x\Rightarrow v=\frac1b\sin bx\\u=e^{ax}\Rightarrow \mathrm{d}u=ae^{ax}\mathrm{d}x$$
$$I=-\frac{e^{ax}}b\cos bx+\frac ab\bigg(\frac{e^{ax}}{b}\sin bx-\frac ab\int e^{ax}\sin bx\ \mathrm{d}x\bigg)$$
$$I=-\frac{e^{ax}}b\cos bx+\frac{ae^{ax}}{b^2}\sin bx-\frac{a^2}{b^2}I$$
$$\bigg(1+\frac{a^2}{b^2}\bigg)I=\frac{e^{ax}}b\bigg(\frac ab\sin bx-\cos bx\bigg)$$
$$I=\frac{b^2}{a^2+b^2}\frac{e^{ax}}b\bigg(\frac ab\sin bx-\cos bx\bigg)$$
$$I=\frac{e^{ax}}{a^2+b^2}\big(a\sin bx-b\cos bx\big)+C$$
A: how about this:
$$I=\int e^{2x}\sin(3x)dx=\frac{-e^{2x}\cos(3x)}{3}+\int\frac{2\cos(3x)e^{2x}}{3}dx$$
$$=\frac{-e^{2x}\cos(3x)}{3}+\frac{2\sin(3x)e^{2x}}{9}-\int\frac{4\sin(3x)e^{2x}}{9}dx$$
$$I=\frac{-e^{2x}\cos(3x)}{3}+\frac{2\sin(3x)e^{2x}}{9}-\frac{4}{9}I$$
so:
$$\frac{13}{9}I=\frac{-e^{2x}\cos(3x)}{3}+\frac{2\sin(3x)e^{2x}}{9}$$
