Since #\cos(3x)# is almost the derivative of #\sin(3x)# (the correct derivative would be #3\cos(3x)#), let's multiply and divide by #3# the integral:
#1/3 \int e^{\sin(3x)}3\cos(3x)\ dx#
Now the integrand is of the form #e^{f(x)} * f'(x)#, which is exactly the derivative of #e^{f(x)}#. So, we have nothing but
#1/3 \int d/dx e^{\sin(3x)}\ dx#
And since integral and derivative are one the inverse function of the other, they cancel out and the result is
#1/3 e^{\sin(3x)}+c#
§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§
Another way of solving this would have been by substitution: putting #t=\sin(3x)#, you would have #dt = 3\cos(3x) dx#, and the integral would have become
#\int e^{t} dt/3#
Factoring costants out:
#1/3 \int e^t dt#
But #\int e^t dt=e^t+c#, so #1/3 \int e^t dt = 1/3 e^t+c#
Substituing back #t=\sin(3x)#, you would obtain the same result as above.