Problem. Calculate $$ \int_{0}^{\infty} e^{-x}\cos(x) \, dx $$
I was recommended to calculate it using limits, but firstly I have solved the integral and I got
$$ \int_{0}^{\infty} e^{-x}\cos(x) \, dx = \frac{\sin(x) - \cos(x)}{2e^x}. $$
I don't know how to calculate limit as $x$ tends to $\infty$.