Help on indefinite integrals. I can't figure out how to find the integral for
$$
 \int e^{-3x}\sin(x)dx
$$
I get to 
$$
(e^{-3x})(-\cos(x))-e^{-3x}-\sin(x)
$$ 
and I don't know what to do after. My teacher said the answer was 
$$
-\frac{1}{10} \left[e^{-3x}\cos(x)+3e^{-3x}\sin(x) \right]+C.
$$
I'm not sure how to get there.
 A: Hint:
You have to use a standard trick of using integration by parts twice so that you differentiate the $\sin(x)$ and integrate the $e^{-3x}$. After doing it twice you will get the same integral (the integral you are trying to find) on the right hand side. Then just solve for the integral.
A: Hint: You can advance by using integration by parts twice. Another technique, you can use the identity 

$$ \sin(x)=\frac{e^{ix}-e^{-ix}}{2i} $$

which makes it easier to evaluate the integral. 
A: There is yet another way, the method of undetermined coefficients from ordinary differential equations.  Once you have done two or three problems like the one in your question, you will notice a pattern, and see that the integral must have the form 
$$(\star)  \qquad   Ae^{-3x}\cos x + Be^{-3x}\sin x + c.  $$
If you know it has this form, take the derivative of $(\star)$ and set it equal to $e^{-3x}\sin x$.  You will get two linear equations in the two unknowns $A$ and $B$.  Solve them using your favorite technique.  
You can make the procedure a little easier if you write $(\star)$ in the form 
$e^{-3x}(A\cos x + B\sin x)$ (clearly you don't need the $c$).  That way when you differentiate $(\star)$, you only have to apply the Product Rule once.
