I have the x,y data of two curves (solid red and blue in the attached image) and I want to find out the envelope function of the two (dashed magenta curve in the attached image). Is there a way to do it in Origin or Igor? Or in any other mathematical software for instance?