3

Assume that I have three one-variable non-periodic functions $f(x),g(x),h(x)$ for $x>0$. The question is: is it possible to ask Mathematica to obtain the function describing the upper and lower boundaries of these three functions (I am not sure if it is called enveloping function)? Something like the red curves in the second picture attached (I plot it manually); I am looking for an analytic expression for the function describing these red curves.

f[x_] = 2 x Sin[x];
g[x_] = x Cos[x];
h[x_] = x + Sin[3 x];

Plot[{ f[x], g[x], h[x]}, {x, 0, 20}, PlotLegends -> "Expressions"]

P.S. This is just a simple example, my real functions are much more complicated than the given ones; I just wanted to know if there is any hope to do that.

enter image description here

math2021
  • 749
  • 3
  • 8
  • 1
    This might be a start https://mathematica.stackexchange.com/q/49043/8822 . BTW, if you look for envelope on this site you will find many more similar Q&A. – mattiav27 Jul 19 '23 at 17:37
  • @mattiav27 Thanks; but my question is if it is possible to obtain the analytic expression for the envelope function; is it possible? – math2021 Jul 19 '23 at 20:47

1 Answers1

6

Something like:

f[x_] = 2 x Sin[x];
g[x_] = x Cos[x];
h[x_] = x + Sin[3 x];
min[x_] = Min[f[x], g[x], h[x]];
max[x_] = Max[f[x], g[x], h[x]];
Plot[{f[x], g[x], h[x], min[x], max[x]}, {x, 0, 20}, 
 PlotLegends -> "Expressions", 
 PlotStyle -> {Blue, Brown, Orange, Green, Green}]

enter image description here

Daniel Huber
  • 51,463
  • 1
  • 23
  • 57