Minimizing absolute value of a sum of cosines

We know that the function $\cos(Cx)$ is in the range $[-1,1]$ for any constant $C$. I am interested in bounding the absolute value of sums of such quantities, in some sense capturing a correlation.

Can we choose real numbers $A$ and $B$ such that the function

$\cos(Ax) + \cos(Bx)$

always has absolute value bounded away from 2?

More generally, can we find $k$ numbers $A_1, A_2, \dots, A_k$ such that the function

$\cos(A_1x) + \cos(A_2x) + \dots +\cos(A_kx)$

has absolute value asymptotically less than $k$, say maybe $O(\sqrt{k})$? How small could it be?

Is this a well defined problem and has it been studied before?

Edit: The problem breaks down if $x=0$ so lets assume we ignore that point. I hope you get the idea of the question, but feel free to point out other technicalities. Thanks. Also, the functions mentioned above are "almost" periodic in general, so lets restrict our optimization to $x$ being in $[0,2\pi]$ if that helps.

• What about at $x=0$? Commented Nov 10, 2013 at 2:25
• @Robert Israel: You're right. I've added an edit. Thanks. Commented Nov 10, 2013 at 2:35
• Well then, take $x$ arbitrarily close to $0$. Commented Nov 10, 2013 at 4:21

We can take $A=1$ without loss of generality.
If $B \in \mathbb{Q}$, then $B= \frac{p}{q}$, then with $x=2 \pi kq$, we have $\cos x + \cos(Bx) = 1+ \cos(2 \pi kp) = 2$.
If $B \notin \mathbb{Q}$, then the set $\{ (x \mod 2 \pi, Bx \mod 2 \pi) \}_{x \ge 1}$ is dense in $[0,1]^2$, so we can find a sequence $x_n$ such that $(x_n \mod 2 \pi, Bx_n \mod 2 \pi) \to (0,0)$, and so $\cos x_n + \cos(Bx_n) \to 2$.
I should have searched first, but for the more general case, it seems that a relevant result (from Trajectories on the $k$-dimensional torus) is Kronecker's theorem.
• @BettyMock: The point above is that you cannot bound it away from 2 for any choice of $A,B$. Commented Nov 10, 2013 at 4:35