# Distribution of distances of successive zeros of $f(x)={\rm cos}(x)+{\rm cos}(\alpha x)+{\rm cos}(\beta x)$

Let $\alpha$ and $\beta$ be incommensurate real numbers.

Consider the function $f(x)={\rm cos}(x)+{\rm cos}(\alpha x)+{\rm cos}(\beta x)$ and its positive zeros $x_k(\alpha,\beta)$.

Fix $\alpha$ and $\beta$, and consider the distances between successive zeros $z_k=x_{k+1}-x_k$.

The concrete distribution of the zeros depends on $\alpha$ and $\beta$, but the distribution always shows singularities. Here are some examples for the first 100k zeros for various $\alpha$ and $\beta$:

The position of the singularities does obviously depend on the continued fraction representation of $\alpha$ and $\beta$, as higher rational approximations to $\alpha$ and $\beta$ will display similar distributions.

My question is: Can one write down explicit approximations for the positions of these singularities in these distributions of the distances between the zeros in terms of the continued fraction expansions of $\alpha$ and $\beta$?

(The distances $z_k$ and $z_{k+1}$ are strongly correlated.)

The function $f(x)$ is almost periodic. In the literature about almost periodic functions I could not locate information about the distribution of the distances between the zeros.

The peaks arise from envelopes that arise when the function value nearly repeats. The peaks are at the roots of the implicit equation $\pm {\rm cos}(x)\pm {\rm cos}(\alpha x)\pm {\rm cos}(\beta x)=0$ for the case of the function $f(x)= {\rm cos}(x)+ {\rm cos}(\alpha x)+ {\rm cos}(\beta x)=0$. More details can be found here.
Here is how I think of this problem from a ergodic theory point of view. Because the system is ergodic for long time the point $(t [2\pi] , \alpha t [2\pi], \beta t [2\pi] )$ should span $[2\pi]^3$ with equidistribution . Therefore the distribution of the distance $t$ between two consecutive zeros should be given by the measure of the set defined by $$\begin{cases} \cos(x)+\cos(y)+\cos(z)=0 \\ \cos(x+t)+\cos(y+\alpha t)+\cos(z+\beta t)=0\end{cases}$$ Let $(u,v,w)$ an orthogonal basis with $u=(1,\alpha,\beta)$ and let $(a,b,c)$ the coordinate of $(x,y,z)$ in this basis. The previous equations give us $$\begin{cases} a_1=g_1(b,c) \\ a_2=g_2(b,c) \\ t=a_2-a_1\end{cases}$$We can think of $a_1$ and $a_2$ as the fist and second time we cross the set $\cos(x) +\cos(y)+\cos(z) =0$ starting from the point $(0,b,c)$.
On the $\nabla (g_2-g_1)\neq 0$, the solution is a smooth curve,therefore the singalarities can only appear when $\nabla (g_2-g_1) = 0$. As a conclusion, the singularities should only exists for $t$ such that exists $(x,y,z)$ solution of $$\begin{cases} \cos(x)+\cos(y)+\cos(z)=0 \\ \cos(x+t)+\cos(y+\alpha t)+\cos(z+\beta t)=0 \\ \nabla(g_2-g_1)=0 \end{cases}$$ This explain the singularity at the boundaries of the set on your first diagram (extremum $\Rightarrow \nabla (g_2 -g_1)=0$ ).
I try to solve the system numerically for $\alpha=\sqrt{2},\beta=\sqrt{3}$ and it gives me $t \approx 2.275$. Does it make sense with your last diagram?