The number of values of $x$ where the function $f(x)=\cos x+\cos(\sqrt2x)$ attains its maximum is 
The number of values of $x$ where the function $f(x)=\cos x+\cos(\sqrt2x)$ attains its maximum is:
  $(A)0$
  $(B)1$
  $(C)2$
  $(D)\infty$


$$f'(x)=-\sin x-\sqrt2\sin(\sqrt2x)$$
Put $f'(x)=0$ to find the critical points.But i cannot find the critical points.
 A: The answer should be 1. 
First note that $f(x)$ can never be bigger than 2 as it is the sum of two functions who are always less than or equal to 1.
Next note $f(0) = 2$, hence $f(x)$ has a maximum value of 2. 
Next note for $f(x) = 2$ we need $x = 2 \pi n$ and $\sqrt{2}x = 2 \pi m$, for some $n,m \in \mathbb{Z}$ ($n,m$ are integers). This only has 1 solution at $x = 0$. To see this say $x \neq 0$. Then $n,m \neq 0$. Now we substitute the first equation into the second to get $\sqrt{2}(2 \pi n) = 2 \pi m$ so $\sqrt{2}n =m$. Since $n,m \neq 0$ this would imply $\sqrt{2}$ is rational which is clearly a contradiction.
A: Use the formula
$$\cos (x)+\cos \left(\sqrt{2} x\right)=2 \cos \left(\frac{x}{2} \left(\sqrt{2} +1\right)\right) \cos \left(\frac{x}{2} \left(1-\sqrt{2} \right)\right)$$
to find that the given  function has infinite zeroes: the roots of the equations
$$\frac{x}{2} \left(1-\sqrt{2}\right) =\frac{\pi}{2}+k\,\pi;\;\frac{x}{2} \left(1+\sqrt{2}\right) =\frac{\pi}{2}+k\,\pi;\;k\in\mathbb{Z}$$
therefore by Rolle theorem it has infinite maxima and minima
