Prove that $\sum_{n=0}^\infty\frac{\cos (n^2x)}{2^{nx}}$ is continuous for $x> 0$

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)$?

• How about proving it on $[\epsilon,\infty)$? – Lord Shark the Unknown Jun 17 '18 at 11:17
• @LordSharktheUnknown How do I prove it on $[\epsilon, \infty)$? The inequality in the Weierstrass M-test does not hold for $\epsilon < 1$ as far as I understand. – user557902851 Jun 17 '18 at 11:25
• In this case the inequality will depend on $\varepsilon$. For $x\in[1,\infty)$ you used $x\geq1$. In this case you should use something similar – Uskebasi Jun 17 '18 at 11:42

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.
• That's probably too basic question, but why is $\sum \frac{1}{2^{\delta n}}$ convergent? – user557902851 Aug 9 '18 at 23:21
• @user5579085 It's a geometric series with ratio $\frac1{2^\delta}<1$. – José Carlos Santos Aug 9 '18 at 23:24