This 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.


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".