Finding the amplitude of a multi-tone signal
In a comment you clarified that you're trying to find the modulation index of an amplitude modulated signal. I assume this means that the signal provided takes the form of your message signal, and that is the reason you're trying to find the maximum. If you're unable to predict the exact frequencies, amplitudes, and phases of your sinusoids, you should assume the worst case upper bound is \$ |A| + |B| \$. 

If all of your signals are cosines and have zero phase shift, then if the amplitudes are all positive, obviously the maximum is the sum \$(t = 0)\$. Interestingly, if there are only two cosines with no phase shift, and if the amplitudes are not both positive, you can still assume the maximum is \$ |A| + |B| \$ if the ratio \$r = \frac{\omega_1}{\omega_2}\$ is not rational.