There are a lot of functions where you can use what my teacher has described as the 'cyclic' method of integration. An example is $$\int e^x\sin x\,dx$$ where you designate $u=\sin x$ and $dv=e^x\,dx$. You do integration by parts and arrive at $$\int e^x \sin x \,dx=e^x \sin x - \int e^x \cos x\,dx$$ Now do it again, and you eventually arrive at $$\int e^x \sin x\, dx=g(x)-n\int e^x \sin x \,dx$$ where $g(x)$ is a function of $x$. Re-arrange this and solve.
This also works for, say $\int e^x \cos x \,dx$.
Are there any related integrals involving $\sin x$ or $\cos x$ where this technique doesn't work? (Excluding those such as $\int x^n \sin x\, dx$, where there isn't a problem.)