How do I evaluate this integral $$\frac{2}{\pi}\int_{0}^{\pi}e^{3x}\sin nx\,dx$$

I know I have to use part integration and I get here

$$\frac{2}{3}\pi*\sin nx*e^{3x}-\int_{0}^{\pi}e^{3x}(\sin nx)'\,dx$$

I don't know how to put the $(\sin nx)'$ after d
Hints:


$(\sin nx)' = n\cos nx$.
Do per partes again on the integral with $\cos$
$(\cos nx)' = -n\sin nx$.
I would hope that you know that (sin(nx))'= n cos(nx).  So after one application of "integration by parts" you have $\frac{2}{\pi}\int e^{3x}sin(nx)dx= \frac{2}{3\pi}e^{3x}sin(nx)- \frac{2n}{\pi}\int e^{3x}cos(nx)dx$.

To do that integral use "integration by parts" again, with $u= cos(nx)$, $dv= e^{3x}dx$.  Then $du= -nsin(nx)dx$ and $v= \frac{1}{3}e^{3x}$.  So $\int e^{3x}cos(nx)dx= \frac{1}{3}e^{3x}cos(nx)+ \frac{n}{3}\int e^{3x}sin(nx)dx$.

Putting that into the original integral, $\frac{2}{\pi}\int e^{3x}sin(nx)dx= \frac{2}{3\pi}e^{3x}sin(nx)- \frac{2n}{\pi}\left(\frac{1}{3}e^{3x}cos(nx)+ \frac{n}{3}\int e^{3x}sin(nx)dx\right)= \frac{2}{3\pi}e^{3x}sin(nx)- \frac{2n}{3\pi}e^{3x}cos(nx)- \frac{2n^2}{9\pi}\int e^{3x}sin(nx)dx$.

Yes, there is still an integral on the right side but now it is the same as the integral on the right.  Add $\frac{2n^2}{9\pi}\int e^{3x}sin(nx)dx$ to get $\frac{18+ 2n^2}{9\pi}\int e^{3x}sin(nx)dx= \frac{2}{3\pi}e^{3x}sin(nx)- \frac{2n}{3\pi}e^{3x}cos(nx)$ and, finally, divide both sides by $\frac{18+ 2n^2}{9\pi}$.