A last year Putnam question maximum $\sum{\cos 3x}$ 
Determine the greatest possible value of $$\sum_{i=1}^{10}{\cos 3x_i}$$
  for real numbers $x_1,x_2....x_{10}$  satisfying 
  $$\sum_{i=0}^{10}{\cos x_i}=0$$

My attempt:
$$\sum \cos 3x = \sum 4\cos^3x -\sum3\cos x=4\sum \cos^3 x $$
So now we have to maximize sum of cubes of ten numbers when their sum is zero and each lie in interval $[-1,1]$.
 i often use AM GM inequalities but here are 10 numbers and they are not even positive. Need help to how to visualize and approach these kinds of questions.
 A: Visualising the solution
You have asked for help in visualising the solution. I think you will find it useful to have in mind the picture of $y=x^3$ for $-1\le x\le1$.
Now consider the arrangement of the 10 numbers in the maximum position. (We have a continuous function on a compact set and so the maximum is attained.)
First suppose that there is a number, $s$, smaller in magnitude than the least negative number $l$. Increasing $l$ whilst decreasing $s$ by the same amount would increase the sum of cubes and therefore cannot occur. 
So, all the negative numbers are equal, to $l$ say, and all the positive numbers are greater than $|l|$.
Now suppose that a positive number was not $1$. Then increasing it to $1$ whilst reducing one of the $l$s would increase the sum of cubes and therefore cannot occur.
Hence we need only consider the case where we have $m$ $1$s and $10-m$ numbers equal to $-\frac{m}{10-m}$.
A: Hint: Use the fact that $$\cos a + \cos b=2\cos\left(\frac12(a+b)\right)\cos\left(\frac12(a-b)\right).$$
If you pair the summands and apply above transformation, then the sum becomes a product with $10$ cosine factors, and a scaling factor of $2^5.$ So now at least we have an estimate of the sum.
