Show that $\sup_{0This is a problem in V Arnold's Ordinary Differential Equations. 
By plotting the function $f(x)=\mathrm{cos}x+\mathrm{sin}\sqrt{2}x$ (the first graph below), I see that the graph is bounded from -2 to 2. But the boundary points $\{2,-2\}$ are not attained by $f(x)$. Intuitively, it seems true that $f(x)$ approaches 2 when both $\mathrm{cos}x$ and $\mathrm{sin}\sqrt{2}x$ approach 1. From the graph of both $\mathrm{cos}x$ and $\mathrm{sin}\sqrt{2}x$ (the second graph below), one can see that around $x=19$, both $\mathrm{cos}x$ and $\mathrm{sin}\sqrt{2}x$ approach 1. 
But this doesn't seem like much of a proof. Is there another approach to show this equality? Also, I fail to find an ODE-related approach to this problem. 


 A: You are on the right track. We note that:
$\cos(x)=1$ when $x=2\pi n$, $n\in\mathbb{N}\cup\{0\}$
and
$\sin(\sqrt{2}x)=1$ when $\sqrt{2}x=2\pi n + \dfrac{\pi}{2}$, $n\in\mathbb{N}\cup\{0\}\implies x=\sqrt{2}\pi n+\dfrac{\pi}{2\sqrt{2}}=\sqrt{2}\left(\pi n+\dfrac{\pi}{4}\right)$.
The values for the cosine term are all rational multiples of $\pi$, and those for the sine term are all irrational ones, proving that both will never be $1$ at the same time.
But, we can get arbitrarily close. Are you familiar with the property from algebra that given two integers $x,y$, any multiple of $\gcd(x,y)$ can be constructed via linear combinations? A similar rule will help you demonstrate that you can get as arbitrarily close to $2$ as you want here. I freely admit I do not have the details worked out, at which point mathematicians usually say "I'll leave that part as an exercise".
A: It suffices to prove that you can find integers $m$ and $n$ such that $2\pi m$ and $ \sqrt{2}\pi n+\frac{\pi}{2\sqrt{2}}$ are arbitrarily close. But this is a routine application of the Equidiistribution theorem. 
See if you can figure the rest out on your own. 
Proof: 
Let $\varepsilon>0$ be given. By the equidistribution theorem above, $a_n = \{\frac{4n+1}{4\sqrt{2}}\}$ numbers are equidistributed in the interval $(0,1)$. Hence, we can find $n$ such that $a_n<\frac{\varepsilon}{2\pi}$. Now let $m = \frac{4n+1}{4\sqrt{2}} - a_n = \frac{n}{\sqrt{2}} + \frac{1}{4\sqrt{2}} - a_n\in\mathbb{Z}$. By our construction, $$|2\pi(m-\frac{n}{\sqrt{2}}-\frac{1}{4\sqrt{2}})| = |2\pi m - \sqrt{2}\pi n-\frac{\pi}{2\sqrt{2}}| = 2\pi 
a_n<\varepsilon.$$
Note that in the original comment, I wrongly cited Dirichlet's approximation theorem instead of the equidistribution theorem. Also, this theorem proved by using only pigeon-hole principle, so this is basically nothing advanced. 
