If $f:[a,b]\to \mathbb R$ is continuous then so is $\max_{t\in [a,x]}f(t)$?
Solution 1:
I'm going to call your max function "$g(x)$" so I don't have to keep writing it down. I think you've got two cases (which probably can be combined but it's not how the idea popped into my head). If $g(x_0)\neq f(x_0)$, then $g(x_0)-f(x_0)=\eta>0$, and you can use the continuity of $f$ to find a $\delta$ corresponding to $\epsilon=\min(\eta/2,\epsilon_{\text{given}})$ where $f(x)<g(x_0)$ on the interval, and therefore $g(x)$ must be constant on that interval (and therefore continuous). If they are equal, then you can use the $\delta$ corresponding to $\epsilon$ for $f$ to show that $|f(x)-f(x_0)|<\epsilon$ for that $\delta$-interval in $x$. Then since $g(x)$ is non-decreasing and $g(x)\geq f(x)$ for all $x$, you have $f(x)\leq g(x)\leq g(x_0)$ for $x\in(x_0-\delta,x_0)$.
Solution 2:
Suppose $g:\mathbb{R} \times \mathbb{R} \to \mathbb{R}$ is continuous and suppose $C$ is compact. Then the function $h(x) = \max_{t \in C} g(x,t)$ is continuous.
Suppose $x_n \to \hat{x}$, and suppose $t_n \in C$ is such that $h(x_n) = g(x_n,t_n) \ge g(x_n,t)$ for all $t \in C$.
Let $t^*$ be any accumulation point of the sequence $t_n$, then by continuity we see that (i) $g(x_{n_k}, t^*_{n_k}) \to g(\hat{x}, t^*)$ and (ii), since $ g(x_n,t_n) \ge g(x_n,t)$ for all $t \in C$, we have $g(\hat{x},t^*) \ge g(\hat{x},t)$ for all $t \in C$, and so $g(\hat{x},t^*) = h(\hat{x})$.
Now consider any subsequence of $\eta_n=h(x_n)$, say $\eta_{n_k}$. Since $C$ is compact, the $t_{n_k}$ have a convergent sub-subsequence, say $t_{n_{k_j}}$ that converges to some $t^*$. As above, we see that $\eta_{n_{k_j}} \to h(\hat{x})$. If follows that the entire sequence converges to $h(\hat{x})$ and so $h$ is continuous.
In terms of the original problem, let $C=[0,1]$ and let $g(x,t) = f(xt)$, which is continuous, hence the $\max$ function is continuous.