If $f:[a,b]\to \mathbb R$ is continuous then so is $\max_{t\in [a,x]}f(t)$? A problem that I have been thinking: For what kind of functions $f:[a,b]\to \mathbb R$ is  $x\mapsto\sup_{t\in [a,x]}f(t)$ continuous? This is not true for bounded functions, take for example $f(x)=0$ in $[0,1]$ and $f(x)=1$ in $(1,2]$. It is however trivially true for continuous monotone functions. Assuming mere continuity for $f$ I can show right continuity of $\max_{t\in[a,x]}f(t)$: 
For $\epsilon$ and some $\delta>0$, 
$$x\in [x_0-\delta,x_0+\delta]\implies f(x_0)-\epsilon<f(x)<f(x_0)+\epsilon$$
If $x\in [x_0,x_0+\delta]$ then $$\max_{t\in [a,x]}f(t)=\max\left\{\max_{t\in [a,x_0]}f(t),\max_{t\in [x_0,x]}f(t)\right\}$$
If $max_{t\in [a,x_0]}f(t)\ge \max_{t\in [x_0,x]}f(t)$ then
$$\left|\max_{t\in [a,x]}f(t)-\max_{t\in [a,x_0]}f(t)\right|=0< \epsilon$$
Otherwise,
$$\left|\max_{t\in [a,x]}f(t)-\max_{t\in [a,x_0]}f(t)\right|\le \max_{t\in [x_0,x]}f(t)-\max_{t\in [a,x_0]}f(t)<f(x_0)+\epsilon-\max_{t\in [a,x_0]}f(t)\le \epsilon$$
which proves right continuity. When I tried to prove left continuity I was stuck on showing
$$\max_{t\in [x,x_0]}f(t)-\max_{t\in [a,x]}f(t)<\epsilon$$
Can this be circumvented?
 A: 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)$.
A: 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.
A: For a more general result  see my answer here
To adjust this to your problem, replace $[a,b]$ by $[0,1]$, and set $f(x,t)=f(t):[0,1]\times[0,1]\to\Bbb R$, and $c(x)=x$.
