Interesting, but hard problem: $\min_x \max_{1 \leq r \leq N} |\cos(rx)|$ I want to solve this minimization problem:
$$\min_x \max_{1 \leq r \leq N} |\cos(rx)|$$
where $x \in \mathbb{R}^+$ and $r \in \{1, 2, \cdots, N\}, N \in \mathbb{N}$.
Using some simulations I found that the solution is $x^* =\frac{\pi}{N + 1}$. But I am looking for an analytical solution.
Figure below shows $|\cos(rx)|$ for different values of $x$ and $r$ when $N = 4$. Also, $\max_{1 \leq r \leq N} |\cos(rx)|$ is plotted. As it is shown, always the min occurs when $|\cos(x)| = |\cos(Nx)|$. But I don't know how to prove this! Has anybody encountered a problem like this?

 A: As you can see, the minimum happens when $|\cos rx|=|\cos sx|$, for integers $r$ and $s$.  That is when $\cos^2 rx=\cos^2 sx$, or $\cos 2rx=\cos 2sx$.  So $$2rx=2n\pi\pm 2sx\\
x=\frac {n\pi}{r\pm s}$$
If it is $r-s$, then these two points differ by a multiple of $\pi$, and the $r-s$ point is exactly a multiple of $\pi$.  In that case $\max|\cos rx|=1$.
So the denominator is $r+s$.  We need $r+s>N$, otherwise $(r+s)x$ is a multiple of $\pi$, and again $\max|\cos rs|=1$.
We also have $r+s<2N$.  So if there is any common factor between $n$ and $r+s$ in the fraction $n\pi/(r+s)$, the reduced denominator is less than $N$; and one of the first $N$ points is exactly a multiple of $\pi$.
Now consider $r$ goes from $-N$ to $+N$.  It is $2N+1$ points, so we go through all multiples of $\pi/(r+s)$.  So the closest one to a multiple of $\pi$ must be a distance $\pi/(r+s)$ away.  The largest value this can be is $\pi/(N+1)$.
A: The following preliminary manipulations might simplify the problem somewhat:
All functions $x\mapsto \bigl|\cos(r\,x)\bigr|$ are even and $\pi$-periodic. Therefore we can restrict to the interval $0\leq x\leq\pi$. Furthermore
$$\max_{1\leq r\leq N}\bigl|\cos(r\,x)\bigr|=\sqrt{\max_{1\leq r\leq N}\cos^2(r\,x)}\ ,$$
and
$$\max_{1\leq r\leq N}\cos^2(r\,x)={1\over2}\left(1+\max_{1\leq r\leq N}\cos(2r\,x)\right)\ .$$
Putting $2x=:y$ we therefore should look at the graph of the function
$$f(y):=\max_{1\leq r\leq N}\cos(r\,y)\qquad(0\leq y\leq\pi)\ ,$$
and determine $\mu:=\min_{0\leq y\leq\pi} f(y)$. From this $\mu$ it is then easy to obtain the minimum for the original problem.
