How to apply squeeze theorem to this limit. I'm trying to solve $$\int_0^∞ e^{-x} \cos(x)\,dx$$
It is not hard to find that $$\int e^{-x} \cos(x)=\frac{1}{2}(e^{-x} \sin(x)-e^{-x} \cos(x))+C$$
From all this follows that
$$\lim_{t\to\infty}\int_0^te^{-x} \cos(x) \, dx = \frac{1}{2}\lim_{t\to\infty}(e^{-t} \sin(t) - e^{-t} \cos(t))+\frac{1}{2}$$
Notice that I have simplified already a lot the expression we are taking the limit of.
I have not been able to find this limit; a collegue student told me that I had to use the squeeze theorem, but I do not find how nor where. Any guides on how the theorem can help with this limit?

$$\because\sin x-\cos x=\sqrt 2(\cos\frac{\pi}{4}\sin x-\sin\frac{\pi}{4}\cos x)=\sqrt 2\sin (x-\frac{\pi}{4})$$
$$\therefore\lim_{t\rightarrow +\infty}|e^{-t}\sin t-e^{-t}\cos t|= \lim_{t\rightarrow +\infty}|\sqrt 2e^{-t}\sin (t-\frac{\pi}{4})|\leqslant \lim_{t\rightarrow +\infty}|\sqrt 2e^{-t}|=0$$
$$\therefore\lim_{t\rightarrow +\infty}(e^{-t}\sin t-e^{-t}\cos t)=0$$
$$\therefore\frac{1}{2}\lim_{t\rightarrow +\infty}(e^{-t}\sin t-e^{-t}\cos t)+\frac{1}{2}=\frac{1}{2}$$
