What can be said of this function? Does it have a name? Would it be possible to build an equation for it? Is it implemented in any mathematical software? $$f_g(x)= \max \{g(y) \mid y\in [0,x]\}$$ I can clearly imagine it's graph, $f$ sticks to $g$ as long as it is greater than its local minimum "so far" whilst it basically "bridges over" $g$'s "valleys" when it goes below it.
If you are interested in why I am asking the question: I was playing in Matlab and imagined such a function for visualising Taylor's formula with the Lagrange remainder, by determining the worst possible $c$ and graphing a region in which the approximated function actually lies (by $c$ I mean the value from the following formula). $$ R_k(x) = \frac{f^{(k+1)}(c)}{(k+1)!} (x-x_0)^{k+1} $$ This however shouldn't matter as I find $f_g(x)$ interesting on its own.
The function is called the running maximum of $g$. It is studied for stochastic processes in particular in financial mathematics. See for example https://en.wikipedia.org/wiki/Wiener_process#Running_maximum.