# unboundness of an infinite series $f(t)\cos(tx)\sim t^{-1}\cos(tx)$

If $\lim_{t\to \infty} f(t)t=1$, i.e., $f(t)\sim t^{-1}$, then $${\text{ess}\sup}_{x\in [-\pi,\pi]}\sum_{t=1}^{\infty} f(t)\cos(tx)=\infty ?$$ Here ${\text{ess}\sup}$ is the essential supremum. To me, it seems $${\text{ess}\sup}_{x\in [-\pi,\pi]}\sum_{t=1}^{\infty} t^{-1}\cos(tx)=\infty.$$

I am little confused when $\sum$ and $\lim$ come together.