Let $f : [0,\infty) \to \mathbb{R}$ be a continuous function and define $g(x) = \max \{f(t) \lvert 0 \leq t \leq x\}$. Then $g$ is monotonically increasing and the continuity of $g$ can be proven via the epsilon-delta-definition and casework, e.g. for $x_0 \in [0,\infty)$, consider the cases:
- $g(x_0) \neq f(x_0)$, which will result in showing $g$ is constant on an interval $(x_0 - \delta, x_0 + \delta)$ then (see my second comment below)
- $g(x_0) = f(x_0)$
- $x \in (x_0 - \delta, x_0]$
- $x \in [x_0, x_0 + \delta)$
Is there a different way of showing continuity of $g$ without considering different cases? Maybe via "monotone and intermediate value property" $\implies$ "continuity" or "For any open set $I \subseteq \mathbb{R}$, $g^{-1}(I)$ is open" $\implies$ "$g$ is continuous"?
For $0\leq x<y$ let $M(x,y)=\sup_{x\leq t\leq y} f(t)$, so that $g(x)=M(0,x)$. Then $g(y)=\max(g(x),M(x,y))$. Observe by continuity of $f$ that $\lim_{y\to x}M(x,y)=f(x)$. Thus $$ \lim_{y\to x}g(y)=\max(g(x),f(x))=g(x), $$ so $g$ is right-continuous at $x$.
It remains to prove left-continuity of $g$ at $x$ for $x>0$, so let $0\leq z<x$. Taking limits as $z\to x$ on both sides of $g(x)=\max(g(z),M(z,x))$ we see that $$ g(x)=\max(\lim_{z\to x}g(z),\lim_{z\to x}M(z,x))=\max(\lim_{z\to x}g(z),f(x)). $$ Substituting $f(x)=\lim_{z\to x}f(z)$ into this equation yields $$ g(x)=\lim_{z\to x}\max(g(z),f(z))=\lim_{z\to x}g(z) $$ since $f(z)\leq g(z)$, and this concludes the proof of left-continuity. Since $g$ is both left and right continuous we conclude the proof.