# Maximal minimum for a sum of two (or more) cosines

$$2 =\mathrm{argmax}_{r\geq 1}\min_{x\in \mathbb{R}}\left[\cos\left(x\right)+\cos\left(rx\right)\right]$$

In other words, find $r \geq 1$, for which the minimum (over $x$) of $\cos(x)+\cos(rx)$ is the largest. Or rather, prove that this $r$ is 2.

Background: I'm getting this result from a numerical scan

Also, it makes sense intuitively, since by drawing two cosines and trying to align them, this seems like a good configuration to get a high minimum

However, I cannot find a way to prove this. You can also easily show that the required points are not saddle points of the function $f(x,r)=\cos(x)+\cos(rx)$ (the only extremum points are on $x=\pi k$, $r$ integer, and they are all maxima), and instead they must occur for the values of $r$ for which you get two equal global minima. This sounds as a very strange coincidence in the general case. That's why I feel like there has to be some simple symmetry argument that can solve this. Am I missing something obvious (or not so obvious)?

Bonus question:

$$?=\mathrm{argmax}_{\bf r\in \mathbb{R}^N_+}\min_{x\in \mathbb{R}}\left[\sum_{i=1}^N \cos\left(r_i x\right)\right]$$

Note: This question was duplicated from math SE, since I did not get an answer.

• If $r$ is not an integer then it does not suffice to check just $0 \le x \le 2\pi.$ For example, with $r=2/19$ and $x=29\pi$ we have $rx=2\pi+\pi+\pi/19$ so $\cos(x)+\cos(rx)$ is nearly $-2$ at that $x$ and has a minimum even slightly smaller near by. I think these considersations could help you rule out irrational $r$ (find a close approximation of the form $x \approx \frac{m}{n}$ with $m,n$ odd then take $x=n\pi$ to bound the minimum from above.) Then non-integer rational numbers (note $2/19 \approx 3/29$.) Also, odd integers are clearly out. Leaving $r=2,4,6,8,\cdots$ and $3$ characters. – Aaron Meyerowitz Jun 12 '15 at 13:57
• Indeed, irrational numbers are out, as a result of the Kronecker's theorem (the second one here en.wikipedia.org/wiki/Kronecker's_theorem). However, I don't understand from your comment how to rule out non-integer rationals (e.g., note that $r=1.5$ is not bad). Also, note that in my parameter scan, $r=0:dr:10$, and I check $x\in[0,\frac{2}{dr}\pi]$. – Daniel Soudry Jun 12 '15 at 14:42

So we start with a rational $r=\frac{p}{q}$.

1) Say $2\not|p,2\not|q$. Then taking $x=q\pi$, we get: $$f_r(x)=\cos(x)+\cos(rx)=\cos(q\pi)+\cos(p\pi)=-2$$ so $r$ is not the argmax.

2) Say $2$ divides exactly one of $p,q$. Then there exists an odd integer $k$ that solves the congruence equation: $$kp=q+1 \pmod{2q}$$ we take $x=k\pi$, and we have: $$f_r(x)=-1+\cos(\frac{kp}{2q}2\pi)=-1+\cos((\frac12+\frac{1}{2q})2\pi)=-1-\cos(\frac{\pi}{q})$$

For the minimum of $f_r$ to be larger than the minimum of $f_2$, using bounds on $cos$ near $0$, we must have $q\le 2$.

3) Say $q=1$, so also $2|p$. Let $x=(1+\frac{1}{p})\pi$. Then: $$f_r(x)=-\cos(\frac{1}{p}\pi)+\cos((p+1)\pi)=-\cos(\frac{1}{p}\pi)-1$$

which rules out $p\ge 4$.

4) Finally, assume $q=2$, so also $2\not|p$. Let $k=\frac{p-1}{2}$, and set $\epsilon=k+1\pmod{2}\in\{0,1\}$. Let $x=\frac{k+\epsilon}{2k+1}2\pi$. Then $$f_r(x)=\cos((1/2+\frac{1-2\epsilon}{4k+2})2\pi)+\cos((k+\epsilon)\pi)=-1-\cos(\frac{1-2\epsilon}{4k+2}2\pi)$$

This rules out the the rest of the possible values. Hence the argmax is at $r=2$.