# Are we able to estimate the fraction of the domain where $\cos (ax)+2\cos (b x)$ with $\frac ab \notin\mathbb{Q}$ is positive?

We know that the two functions $$\{\;\cos (ax),\;2\cos (b x)\;\}$$ where $$\frac ab \notin \mathbb{Q}$$ are independently positive (and negative) over $$\frac 12$$ of the domain.

Is it possible to estimate the fraction of the domain in which $$\;\cos (ax)+2\cos (b x) \;$$ is positive (in this case, the function is not periodic)?

In other words, can we estimate $$\lim_{m\to\infty} \frac 1m \int_{0}^{m} \Big(\cos (ax)+2\cos (b x) >0\Big) \,dx?$$

Any hints and comments are greatly appreciated.

• I found "the ratio of the domain" confusing; I think you meant something like "the fraction of the domain". I have edited accordingly, hopefully without changing the meaning. – LSpice May 12 at 1:28
• @LSpice Yes, that is true, thanks. – user215601 May 12 at 11:03
• Interesting question. If the amplitudes were equal, i.e. the function was $\cos(ax)+\cos(bx)$, it could be rewritten as a product $2\cos(Ax)\cos(Bx)$ with $A=(a+b)/2$, $B=(a-b)/2$, and one would only have to worry about the signs of the two cosines. But with the different amplitudes it "beats" me. (Pun intended, en.wikipedia.org/wiki/Beat_(acoustics) ) – Jukka Kohonen May 13 at 16:36
• I guess the answer is of the form “mumble ergodic mumble fraction of $(u,v) \in (\mathbb{R}/2\pi\mathbb{Z})^2$ such that $\cos(u) + 2\cos(v) > 0$, which is equal to mumble”, but I don't know the magic words with which to replace the first two “mumble” and I don't have the patience to compute the value of the last “mumble”. 😔 – Gro-Tsen May 13 at 18:04
• PS: The mean motion theorem and the references given in this question is relevant to a closely related question (computing the number of zeros of this function in a given interval). – Gro-Tsen May 13 at 18:07

Since $$a,b$$ are incommensurable, $$(ax,bx)$$ is asymptotically equidistributed in the torus $$({\bf R} / 2\pi{\bf Z})^2$$. [One proof is via a continuous version of Weyl's equidistribution criterion: for any integers $$r,s$$ with $$(r,s) \neq (0,0)$$ we have $$\frac1m \int_0^m e^{i(rax+sbx)}\, dx = O_{r,s}(1/m) \to 0$$ as $$m \to \infty$$.] Therefore $$\{x > 0 \mid \cos ax + 2 \cos bx > 0 \}$$ has the same density in the positive reals as $$\{ (\theta,\phi) \in ({\bf R} / 2\pi{\bf Z})^2 \mid \cos \theta + 2 \cos \phi > 0\}$$, which is $$1/2$$ by symmetry.
Let $$r$$ be an irrational real number. For real $$x>0$$, let $$U_x$$ be a random variable (r.v.) uniformly distributed on the interval $$[0,x]$$, and then let $$C_x:=\cos rU_x+2\cos U_x.$$ Then the problem can be restated as follows: Is it true that $$\begin{equation*} P(C_x>0)\to1/2\,\text{?} \tag{1} \end{equation*}$$ Everywhere here, the limits are taken for $$x\to\infty$$.
The answer to this question is yes. Indeed, for each $$(k,n)\in\{0,1,\dots\}^2$$, \begin{align*} &E\cos^k rU_x\,\cos^n U_x \\ &=2^{-k-n}\,\frac1x\,\int_0^x du\,(e^{iru}+e^{-iru})^k \,(e^{iu}+e^{-iu})^n \\ &=2^{-k-n}\sum_{p=0}^k\sum_{q=0}^n\binom kp\binom nq \frac1x\,\int_0^x du\, \exp\{iu[(2p-k)r+2q-n]\} \\ &\to2^{-k-n}\sum_{p=0}^k\sum_{q=0}^n\binom kp\binom nq 1(2p=k,2q=n), \end{align*} since $$r$$ is irrational. So, \begin{align*} &E\cos^k rU_x\,\cos^n U_x\to m_k m_n, \end{align*} where $$\begin{equation*} m_k:=1(k\text{ is even})2^{-k}\binom k{k/2}=E\cos^k U_{2\pi}. \end{equation*}$$ So, by dominated convergence, for the joint characteristic function (c.f.) $$f_{r,x}$$ of the pair $$(\cos rU_x,\cos U_x)$$ of r.v's and all real $$s,t$$ we have \begin{align*} f_{r,x}(s,t)&=E\exp\{i(s\cos rU_x+t\cos U_x)\} \\ &=\sum_{n=0}^\infty \frac{i^n}{n!}\,E(s\cos rU_x+t\cos U_x)^n \\ &=\sum_{n=0}^\infty \frac{i^n}{n!}\, \sum_{k=0}^n\binom nk s^k t^{n-k}E\cos^k rU_x\,\cos^{n-k} U_x \\ &\to\sum_{n=0}^\infty \frac{i^n}{n!}\, \sum_{k=0}^n\binom nk s^k t^{n-k}m_k m_{n-k} \\ &=h(s)h(t), \end{align*} where $$\begin{equation*} h(s):=\sum_{k=0}^\infty \frac{i^k s^k m_k}{k!}=E\exp\{is\cos U_{2\pi}\}, \end{equation*}$$ so that $$h$$ is the c.f. of the (symmetric absolutely continuous) r.v. $$\cos U_{2\pi}$$.
So, the pair $$(\cos rU_x,\cos U_x)$$ of r.v's converges in distribution to a pair $$(A,B)$$ of independent copies of the r.v. $$\cos U_{2\pi}$$. So, for any real $$b$$, the r.v. $$\cos rU_x+b\cos U_x$$ converges in distribution to the symmetric absolutely continuous r.v. $$A+bB$$.