# What is the name of this function on a graph?

I would like to know how this function is named to find how to calculate it. I have a trend like this one and want to find the upper and lower lines, the red ones (as you can see I do not have a great level at mathematics :) ):

EDIT: A better image using a real chart (in this case i need the name or the algorithm to find the black lines)

EDIT2: I would define the function like: from a top in a given (t) trace a line to the next top that does not create a line that cross the function. From a down in a given (t) trace a line to the next down that does not creates a line that cross the function.

This will create multiple lines, I'm ok with that, like in the following picture: I did the question 'cos I thought that this should be something common, please, if it's the first time you see something like this tell me and I will create everything from scratch!

-
Are these straight lines? Then extrapolating them to the right, they will eventually meet and also cross over (i.e., the top red line will go below the bottom one). I am not sure if you want this "feature" or not. If you are ok with curves, then we can have curves that go on forever without crossing over. (I suppose we can also make them look like straight lines at small distances.) – Srivatsan Sep 21 '11 at 15:22
The word you're looking for might be "envelope"? – joriki Sep 21 '11 at 15:24
I'm looking for the two red lines that goes over the maximums and minimums of the black line in a way that never cross the black line. Is something to find where the function is converging or if its diverging. – Ignacio Soler Garcia Sep 21 '11 at 15:28
As Srivatsan pointed out, if the graph were to extend further to the right, the lines would cross and could therefore no longer bound the graph; so I assume you intend the graph to be only what you've shown. In that case, note that the lines that you've drawn aren't uniquely defined. For instance, the upper red line in the first example could be drawn to pass through the two rightmost maxima instead, and likewise for the lower red line and the rightmost minima. The black lines, too, could be chosen differently. Any two maxima/minima on the convex hull of the graph could be chosen. – joriki Sep 21 '11 at 16:06