testUpperEnvelope.ma
uses
UpperEnvelope.ma

SetDirectory["~/mma/Analysis"];
Needs["UpperEnvelope`"]

?PlotUpperEnvelope

?UpperEnvelopePoints

Examples

f1[x_] := Cos[x] Sin[x^2]

uf1 = PlotUpperEnvelope[f1,{x, 0, 8 Pi}];

Needs["Utilities`ShowTime`"]

f2[x_] := E^(-x) Sin[x^2]

uf2 = PlotUpperEnvelope[f2, {x, 0, 8 Pi}];

ps = SampleFunction[f2, {x, 0, 4 Pi}];

Clear[f3];
f3[x_] := f1[x] - .1 f2[x]

Plot[ f3[s], {s, 0, 3}]

uf3 = PlotUpperEnvelope[f3,{s, 0, 3}]