Let $c>0$, and define the interval $[c,\infty)$. Let $f(x)=\displaystyle\sum_{n=0}^{\infty}\cos(nx)e^{-nx}$ for $x\in[c,\infty]$ I wish to determine $\displaystyle\lim_{x\to\infty}f(x)$ $($I will attempt sandwich rule$)$.
Indeed, $f$ is well define, continuous and differentiable and thus uniformly convergent. If we consider $|f(x)|$, using the $\Delta-$inequality, we end up with: $$\displaystyle\displaystyle\sum_{n=0}^{\infty}|e^{-nx}|\tag{1}$$ which in turn is uniformly convergent $($by $M-$test$)$. Now this means that we $\color{purple}{\text{can interchange the limit and the sum}}$. So if I wanna find out the limit of the upper bound what I have is: $$ \lim_{x\to\infty}\sum_{n=0}^{\infty}|e^{-nx}|=\sum_{n=0}^{\infty}\lim_{x\to\infty}|e^{-nx}|=0 $$ However : $$ \displaystyle\sum_{n=\color{red}{0}}^{\infty}|e^{-nx}|=\frac{\color{red}{1}}{1-e^{-x}}\quad\implies\quad\lim_{x\to\infty}\frac{\color{red}{1}}{1-e^{-x}}=1 $$ So it appears that we can't interchange limit and sum but we know that $\color{purple}{(1)}$ is uniformly convergent for $c>0$. Why is this happening?
[Note] : The reason why I highlighted $n=0$ in red is to show that had it been $n=1$, then the limit of sum would be equal to sum of limit.
$\lim_{x \to \infty} e^{-nx}=0$ is not valid when $n=0$. So the correct answer is $1$.