TITLE: 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?
QUESTION [8 upvotes]: 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.

REPLY [11 votes]: 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.

REPLY [3 votes]: 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$.
Thus, (1) follows.