Prove that the function $f$ defined by $f(x)=\sum_{n=0}^\infty\frac{\cos (n^2x)}{2^{nx}}$ is continuous on $(0,\infty)$.
I can apply the Weierstrass M-test on $[1,\infty):$ $$|\frac{\cos (n^2x)}{2^{nx}}|\le|\frac{1}{2^{nx}}|\le |\frac{1}{2^n}|$$ for $x\ge 1$ and conclude that $f$ is continuous on $[1,\infty)$ since the series is uniformly convergent there and $\frac{\cos (n^2x)}{2^{nx}}$ is continuous.
But how do I prove that $f$ is continuous on the whole $(0,\infty)$?
Take $\delta>0$. Then$$x>\delta\implies\left|\frac{\cos(n^2x)}{2^{nx}}\right|<\frac1{2^{\delta n}}$$and therefore, by the Weierstrass $M$-test your series converges uniformly on $(\delta,+\infty)$ and therefore its sum is continuous. So, if you fix $x_0\in(0,+\infty)$, then your function is continous at $x_0$, since if you take, say $\delta=\frac{x_0}2$, you know that the restriction of the function to $(\delta,+\infty)$ is continuous.