Long time average of solution to ODE with almost periodic structure I encountered the following question in my studies: Let $f:\mathbb{R} \rightarrow \mathbb{R}$ be a Bohr almost periodic function such that $\inf_{\mathbb{R}} f = 0$ but $f(x) > 0$ for all $x\in \mathbb{R}$. An example is
$$ f(x) = 2-\sin(2\pi x) - \sin(2\pi \sqrt{2}x).$$
If $\eta(\cdot)$ is the solution to the following ODE 
$$ \dot{\eta}(s) = f(\eta(s)), \qquad \eta(0) = 0.$$
Is there any tools that allow us to say something about the limit
$$ \lim_{s\rightarrow +\infty} \frac{\eta(s)}{s}$$
and if the limit exists (I guess, by numerical implementations) can we say anything about the rate of convergence of $\frac{\eta(s)}{s}$ to that limit?
 A: For the funciton you gave, the limit is 0, but my proof below only gives convergence as $1/\log s$. If $f=2-\sin(2\pi x)-\sin(2\pi Lx)$ where $L$ is Louiville's constant (or some appropriately chosen irrational number well-approximable by rationals), it's possible the convergence will be much faster if $f$ is close to $0$ frequently. Thus things depend delicately on approximation properties of ratios of the periods. Also, if we take $f=3-\sin(2\pi x)-\sin(2\pi\sqrt{2} x)-\sin(2\pi\sqrt{3} x)$, the proof below fails, so general behavior is unclear.
Proof:
By the equidistribution theorem, we have that multiples of $\sqrt{2}$ mod $1$ are equidistributed in the interval $[0,1]$. Thus if we take the interval $[0,N]$, then letting $$A_\epsilon=\left\{x\in [0,N]\,\bigg\vert\,\epsilon/2<x-\lfloor x\rfloor-\frac{1}{4}<\epsilon, \epsilon/2<\frac{x}{\sqrt{2}}-\left\lfloor \frac{x}{\sqrt{2}}\right\rfloor-\frac{1}{4}<\epsilon\right\}$$
we have that the measure of $A_\epsilon$ is $|A_\epsilon|=\theta(\epsilon^2N)$ (here we are thinking of $\epsilon$ as fixed and taking $N\to\infty$. On the set $A$, the we have $f=\theta(\epsilon^2)$, so the time required to traverse $A_\epsilon$ is $\theta(N)$. Then, since the sets $A_{1/2^j}$ are disjoint, the total time to traverse the interval $[0,N]$ is at least
$$
\sum_{j=1}^a A_{1/2^j}\ge aN
$$
where we can take $a\to\infty$ as $N\to\infty$. Actually, I believe we can take $a=\theta(\log N)$, which would give convergence rate $1/\log s$, but that would require using quantitative bounds on how fast equidistribution happens and I haven't worked it our carefully.
