Show that $f(x) = \cos 2\pi x +\cos 2\pi \sqrt x$ is almost-periodic by showing directly that given $\varepsilon > 0$ there exists an integer $M$ such that at least one of any $M$ consecutive integers lies within $\varepsilon$ from an integral multiple of $2\pi$.The definition of almost periodic is based on the notion of relatively dense set.
A set $\mathcal\subset \mathbb$ is relatively dense in $\mathbb$ if there exists a constant $L>0$ such that $(x,x+L)\cap F \neq \emptyset$ for all $x\in \mathbb$. Then a bounded uniformly continuous function $f:\mathbb\longrightarrow \mathbb$ is "almost periodic" iff for any $\varepsilon >0$, the set $$ \mathcal_\varepsilon = \left\lbrace h\in \mathbb:\sup_My attempt is based on the observation that for $m\in \mathbb\mathbb> \left|f(x+h) - f(x)\right| <\varepsilon \right\rbrace$$ is relatively dense in $\mathbb$.
$ but we want the set of $q$ is relatively dense. One well-known result is the Dirichlet approximation theorem, which states that showing that any real number has a sequence of good rational approximations: in fact an immediate consequence is that for a given irrational $\alpha$, the inequality $$\left|\alpha - \frac
\right| < \frac$$ is satisfied by infinitely many integers $p$ and $q$. But the problem how to control the distance between two consecutive denumerators still cannot be solved. Can anyone help me? Thank you very much.