I'm trying to calculate
$$\int\limits_{-\pi}^0e^{-x}\cos(nx)\,\mathrm{d}x$$
as part of a Fourier series calculation. My problem is the calculations seem to loop endlessly - I'm integrating by parts but the integral sticks around, as both $\cos(nx)$ and $e^{-x}$ are never going to lose their $x$. Am I missing something here?
Once you get a similar integral by integrating by parts try to make it a variable and then simply solve the equation.