# Sum of cosines as squashed as possible

I have 10 cosine waves of the form $$\cos(2\pi(x f_n+\varphi_n))$$, where $$f_n$$, the frequency, is an integer from 1 to 10 and $$\varphi_i$$, the phase, is a number from 0 to 1:

$$s(x) = \sum\limits_{n=1}^{10} \cos\left(2\pi (x n+ \varphi_n)\right), \quad \varphi_i \in [0,1]$$

If I set all the phases to 0, $$m = \max\limits_x \lvert s(x)\rvert$$ peaks as high as 10. All phases at 0.25 peaks at 7.596. Setting the phase to any linear function of freq just moves the waveform, keeping the peak the same. But making the phases random can sometimes get the peaks below 5!

Is there a more systematic way (other than picking random phases and hoping for the best) to minimize the peak of these cosines?

Edit:
I think the peak has to be bigger than $$\sqrt{5}$$ (amplitude of square wave with same RMS as signal above). Also, after 3 million attempts of brute force guessing, the lowest peak was 3.576. The phases still don't have any sort of pattern to them, though.

• I've tried to formally note down your question a little more mathematician-like, so that there's no misunderstanding. Could you please confirm that the formulas say exactly what you meant to say? Also, are all the phases different, or can multiple phases be the same? – Marcus Müller May 22 '19 at 11:56
• By the way, your problem is extremely similar to the problem of PAPR reduction in OFDM systems that use *PSK on their subcarriers. – Marcus Müller May 22 '19 at 12:40
• @MarcusMüller The big formula is correct, although this part: "where fi, the frequency, fn is an integer from 1 to 10" doesn't make sense to me. Did you mean to remove "fi"? – usernumber May 22 '19 at 12:49
• ah, typo! better? – Marcus Müller May 22 '19 at 13:07
• @MarcusMüller yep! – usernumber May 22 '19 at 13:12

$$s(x) = \sum\limits_{n=1}^{N} \cos\left(2\pi \left(x n+ \frac{n^2}{2\times N}\right)\right), \quad N=10$$
$$m \approx 4.28$$ 