Let $f : [0, 1] \to\mathbb R $ be a continuous function.
Define $g(0) = f(0)$ and $g(x) = \max\{f(y) \mid 0 ≤ y ≤ x \}$ for $0 < x ≤ 1.$
Show that $g$ is well-defined and that $g$ is monotone continuous function.
How can I prove this result ? I am having thinking about Rolle's theorem but how can show that $f(1)$ is maximum or there is any other way to prove this result. How to prove it monotone function?
Suppose $0\le x_1 < x_2 \le 1.$
$g(x_1) = \max\{f(y) : 0\le y\le x_1\}.$
A continuous function on a closed bounded interval has a maximum value at some point in that interval, so this function $g$ is well defined.
Either there exists a number $y$ for which $x_1<y\le x_2$ and $f(y)>f(x_1),$ or no such number exists. If there is such a number, then $g(x_2)>g(x_1);$ otherwise $g(x_2) = g(x_1).$
Therefore, $g$ is weakly increasing.
Now suppose $\varepsilon>0.$ Since $f$ is continuous, there exists $\delta>0$ so small that if $x_1<x\le x_1+\delta$ then $f(x_1)-\varepsilon < f(x)< f(x_1)+\varepsilon.$ Therefore $\max\{f(y) : 0 \le y \le x+\delta\} \le f(x_1)+\varepsilon.$ Thus $g(x)< f(x_1)+\varepsilon \le g(x_1)+\varepsilon.$
So $g$ is continuous.