Infinite Sum of Sines With Increasing Period A while ago, I was thinking about the Weierstrass function, which is a sum of sines with increasing frequencies in such a way that the curve is a fractal. However, I wondered what would happen if one took the sum where the frequencies decreased; in particular, noting that $|\sin(x)|\leq x$, it is clear that the function
$$f(x)=\sum_{n=1}^{\infty}\sin\left(\frac{x}{s_n}\right)$$
converges pointwise for any sequence $s_n$ such that the sum of $\frac{1}{s_n}$ converges absolutely - and, in fact, yields an $f$ which is analytic. Of particular interest to me is the sequence of square numbers - that is, the function
$$f(x)=\sum_{n=1}^{\infty}\sin\left(\frac{x}{n^2}\right).$$
I created the following plot of the function from the first 10,000 terms in the series:

What I find interesting here is that, for some reason I can't determine, it looks like $f(x)$ might be asymptotic to $\sqrt{x}$. I've checked numerically for higher arguments and this seems to continue to be the case. This strikes me as odd, since I had expected it to appear more or less periodic, with long-term variation in amplitude and frequency.
So, I am interested in a pair of questions about this series, neither of which I can answer:


*

*Is $f(0)=0$ the only (real) zero of $f$?

*Does $f$ grow without bound? What is it asymptotic to?
 A: Here's a proof that $f$ only vanishes at $x = 0$ (you can use a similar method to get some asymptotic results as well).
Write $f(x)/x$ as
\begin{align*}
 {f(x)\over x} &= \sum_{n\geq 1} {\operatorname{sinc}{(x/n^2)}\over n^2}
\end{align*}
Since $f(x)/x$ is even, we need only treat the case $x\geq 0$. Split the sum into the regions where $x/n^2$ is smaller or greater than $\pi$. Since $\operatorname{sinc}{\lambda}>0$ for $|\lambda|\leq \pi$, and since $\operatorname{sinc}{\lambda}\geq 2/\pi$ for $|\lambda|\leq \pi/2$, we have
\begin{align*}
 \sum_{x/n^2\leq \pi} {\operatorname{sinc}{(x/n^2)}\over n^2} &\geq {2\over \pi}\sum_{x/n^2\leq \pi/2} {1\over n^2} = {2\over \pi} \sum_{n\geq (2x/ \pi)^{1/2}}{1\over n^2} > {2\over \pi} \int_{\lceil(2x/\pi)^{1/2}\rceil}^\infty {dt\over t^2} = {2\over \pi}{1\over \lceil(2x/\pi)^{1/2}\rceil}.
\end{align*}
On the other hand, since $\operatorname{sinc}{\lambda}\leq 1/\lambda$ for all $\lambda>0$, we have
\begin{align*}
 \left|\sum_{x/n^2> \pi} {\operatorname{sinc}{(x/n^2)}\over n^2}\right| & \leq \sum_{x/n^2>\pi} {1\over x} \leq {1\over x}\left\lfloor\left({x\over \pi}\right)^{1/2}\right\rfloor\leq  \left({1\over \pi x}\right)^{1/2}.
\end{align*}
So 
\begin{align*}
 f(x)/x> {2\over \pi}{1\over \lceil(2x/\pi)^{1/2}\rceil} - {1\over (\pi x)^{1/2}},
\end{align*}
which is positive when $x\geq \pi$. Since all terms in the sum are positive if $0\leq x < \pi$, it follows that $f(x)/x$ is always positive.

By the way, here's another heuristic (which can be made precise without too much trouble I think). We have
\begin{align*}
 {f(x)\over x} & = {1\over 2}\hat g(x) = {1\over 2}\int_{-1}^1 g(t)e^{-ixt}\,dt = {1\over 2x}\int_{-x}^x g(t/x)e^{-it}\,dt,
\end{align*}
where $g = \sum_{n\geq 1} \chi_n$ is the sum of the characteristic functions of the intervals $[-n^{-2},n^{-2}]$. (Since $g$ is an $L^1$ function, this tells us at once that $f(x)/x\to 0$ as $x\to\infty$.) Note that $\{y:g(y)>n\} = [-n^{-2},n^{-2}] = \{y: y^{-1/2}>n\}$ (or something similar), so we should roughly expect $g$ to look like $y^{-1/2}$, and so we should expect $\hat g(x)$ to be approximately $x^{-1/2}$ (as can be seen from the last integral). You can use the same idea to get a sense of what the function would look like if you replace $\sin{(x/n^2)}$ with $\sin{(x/n^\alpha)}$ for $\alpha > 1$ (it should I think look like $x^{1/\alpha}$).
A: These are my thoughts on the problem. They do not answer any of the three questions, but do not fit on a comment.
Let $S_N$ be the $N$-th partial sum of the series and $L_n$ the lowest common multiple of $\{1,\dots,n\}$. Then $S_N$ is periodic of period $2\,L_n^2\,\pi$. $L_n$ is known to be of the order $e^{n(1+o(1))}$, so that the period is very large. Computations show that $S_N$ changes sign on $[0,2\,L_n^2\,\pi]$. Here is the grapf of $S_4$ on $[0,288\,\pi]$.

On the other hand, for any $\delta\in(0,1)$ let $\alpha\in(0,\pi/2)$ be such that $(\sin\alpha/\alpha)=\delta$. Then we have the lower bound
$$
f(x)\ge S_N(x)+\delta\,\Bigl(\sum_{n=N+1}^\infty\frac{1}{n^2}\Bigr)\,x,\quad0\le x\le\alpha\,N^2.
$$
This is the graph of $S_{10000}$ (in blue) and the above lower bound with $n=10$, $\delta=3/\pi=0.95493$ and $\alpha=\pi/6$.

This shows that $f(x)>0$ on $(0,50\,\pi/3]$. An strategy to prove that $f(x)>0$ for all $x>0$ is to show that 
$$
S_N(x)+\delta\,\Bigl(\sum_{n=N+1}^\infty\frac{1}{n^2}\Bigr)\,x>0,\quad0\le x\le\alpha\,N^2.
$$
I have checked it up to $n=100$.
As for upper bounds, we have
$$
|f(x)-S_N(x)|\le\sum_{n=N+1}^\infty\min\Bigl(1,\frac{x}{n^2}\Bigr)\le \Bigl(\sum_{n=N+1}^\infty\frac{1}{n^2}\Bigr)\,x.
$$
A: Here's a slightly informal way to get the asymptotic expansion of this function.
Split the region of summation into intervals of the form
$$ \pi k < \frac{x}{n^2} < \pi(k+1), $$
for $k\in\mathbb{Z}_{\geq0}$, and write the sum as
$$ \sum_{n\geq 1}\sin \frac{x}{n^2} = \sum_{k\geq0} \sum_{\frac{x}{\pi(k+1)} < n^2 < \frac{x}{\pi k}} \sin \frac{x}{n^2}. $$
The first term $k=0$ can be approximated with an integral, giving
$$ \sum_{n^2 > x/\pi}\sin\frac{x}{n^2} \sim \int_{\sqrt{x/\pi}}^{\infty} \sin\frac{x}{n^2}\,dn = \sqrt{2\pi x}C(\sqrt{2}), $$
where $C$ is the Fresnel integral.
On the rest of the sum we can approximate $\sin\frac{x}{n^2}$ with its average value $\frac2\pi$.
However, the rest of the sum should be handled with some care, because the regions on which $\sin$ is positive have different lengths from the regions on which it's negative, which will produce a net contribution to the asymptotic term $O(\sqrt{x})$.
Approximating the sum
$$ \sum_{\frac{x}{\pi(k+1)} < n^2 < \frac{x}{\pi k}} \sin \frac{x}{n^2} \sim \frac{2(-1)^k}{\pi}\left(\sqrt{\frac{x}{\pi k}} - \sqrt{\frac{x}{\pi(k+1)}}\right), $$
and summing over $k\geq1$ gives the value
$$ \frac{\sqrt{x}}{\pi^{3/2}}\left((3\sqrt{2}-2)\zeta(\tfrac12) - \sqrt{2}\zeta(\tfrac12,\tfrac32) \right) = B\sqrt{x}, $$
where $\zeta(z,a)$ is the generalized zeta function.
Putting everything together gives the asymptotic form
$$ \sum_{n\geq 1}\sin\frac{x}{n^2} \sim \left(\sqrt{2\pi}C(\sqrt{2}) + B\right)\sqrt{x} \approx 1.25038\sqrt{x}. $$
A: Another comment that is too long to be a comment:
The heuristic reason that the function is asymptotically proportional to $\sqrt{x}$ is that for very large $x$, 
$\cdot$ The contributions of the terms in $S_n(x)$ for $n$ much less than $\sqrt{x}$ behave as pseudo-random numbers, restricted to $[-1,1]$. Thus  $S_n(x)$ for $n << \sqrt{x}$ can be thought of as roughly having a mean value of zero, and a $\sigma$ on the order of $\frac{1}{2}\sqrt{x}$.
$\cdot$ The contributions of the terms in $S_n(x)$ for $n^2$ greater than about $2x$ can be well-estimated by approximating $\sin \frac{x}{n^2} \approx  \frac{x}{n^2}$.  Adding these from $n=\sqrt{x}$ to infinity looks like $x \int \frac{1}{n^2}$ which will be about $\frac{x}{\sqrt{2x}} = \frac{\sqrt{x}}{\sqrt{2}}$. And these contributions are all positive.
$\cdot$ The contributions of the terms in $S_n(x)$ for $n^2 \approx \frac{2}{\pi} x$ are all roughly $1$ since we are near the top of the sine curve, and there are about $\frac{8}{3\pi} \frac{1}{2n} = \frac{4\sqrt{2}}{3\sqrt{\pi}}\sqrt{x}$ of them between $\frac{\pi}{4}$ and  $\frac{3\pi}{4}$ on the sine curve, for a contribution of pretty nearly $\sqrt{x}$.
$\cdot$ The contributions of the terms in $S_n(x)$ lying on the falling side of that first part of the sine curve almost exactly cancel with the contributions from the negative part of the first period of the sine curve (because $n^2$ is greater in that part of the curve, at at any rate, the contribution is a lot smaller than that of the flat section of the positive arch).
So all in all, you would expect $f(x)$ to behave about like $\frac{3}{2}\sqrt{x}$ for large $x$.  
The last 3 bullets can be made somewhat more rigorous.  
But by this reasoning, you would also expect larger fluctuations than we see in the original graph.  So the "effectively ergodic" argument made in the first bullet is an over-estimate of the fluctuations, and I don't have a plausible reason why.
