Note: This questions is quite different from the ones referred to in the comments. Those deal with numerical questions, while this one is algebraic.
I have plots of the following type:
Plot[Cos[50 t] + Cos[51 t], {t, 0, 10}]
I would like to plot a 'sheath'envelope over this plot, i.e. another plot that joins all of maxima and minima of this plot respectively. Here is my attempt, but it's not exactly what I'd like:
Plot[{Cos[50 t] + Cos[51 t], Cos[t] + 1.5, -Cos[t] - 1.5}, {t, 0, 10}]
How can I generate the actual, tight sheath envelope?