Evaluate the following integrals:
$\int e^{2 x} \sin (3 x+1) d x$
Let $I=\int e^{2 x} \sin (3 x+1) d x$
Now Integrating by parts choosing $\sin (3 x+1)$ as first function and $e^{2 x}$ as second function we get,
$I=\sin (3 x+1) \int e^{2 x} d x-\int\left(\frac{d}{d x} \sin (3 x+1) \int e^{2 x} d x\right) d x$
$I=\frac{e^{2 x}}{2} \sin (3 x+1)-\int \frac{3 e^{2 x}}{2} \cos (3 x+1) d x$
Now again integrating by parts by taking $\cos (3 x+1)$ as first function and $\mathrm{e}^{2 x}$ as second function we get,
$I=\frac{e^{2 x}}{2} \sin (3 x+1)-\left[\cos (3 x+1) \int \frac{3 e^{2 x}}{2} d x-\int \frac{3}{2}\left(\frac{d}{d x} \cos (3 x+1) \int e^{2 x} d x\right) d x\right.$
$I=\frac{e^{2 x}}{2} \sin (3 x+1)-\frac{3}{4} e^{2 x} \cos (3 x+1)-\frac{9}{4} \int e^{2 x} \sin (3 x+1) d x$
$\int e^{2 x} \sin (3 x+1) d x=I$
Therefore,
$I=\frac{e^{2 x}}{2} \sin (3 x+1)-\frac{3}{4} e^{2 x} \cos (3 x+1)-\frac{9}{4} 1$
$I+\frac{9}{4} I=\frac{e^{2 x}}{2} \sin (3 x+1)-\frac{3}{4} e^{2 x} \cos (3 x+1)$
$\frac{13 I}{4}=\frac{e^{2 x}}{2} \sin (3 x+1)-\frac{3}{4} e^{2 x} \cos (3 x+1)$
$I=\frac{e^{2 x}}{13}\{2 \sin (3 x+1)-3 \cos (3 x+1)\}+c$