Supremum of a Continuous Function is Continuous
I'm working on this problem from Elementary Analysis by Ross which is intuitive when sketched but keeps stymieing me when I try to write it out.
Let $f$ be a continuous function on $[a,b] \subset \mathbb{R}$. Define $f^\star (x)$ as:
$$ f^\star(x) = \sup \{f(y)\mid a \leq y \leq x \} $$ Prove that $f^\star$ is a continuous increasing function on $[a,b]$.
Things I've figured out: (these are mostly trivial)
- $f$ is uniformly continuous on $[a,b]$.
- Since $[a,b]$ is closed and bounded there exists some $c \in [a,b]$ such that $f(c) \geq f(x)\ \forall x \in [a,b]$. (In words: the supremum is actually attained.)
- If $c \in [a,b]$ is as above, then $f^\star$ is constant (and hence continuous) on $[c,b]$ (which is possibly a singleton).
This seems completely obvious when you actually draw a continuous function but translating that to a formal proof eludes me...
Solution 1:
Continuity is easy at points where $f(x_0)<f^\star(x_0)$, because we will still have $f(x)<f^\star(x_0)$ for $|x-x_0|<\delta$ for some $\delta$, meaning $f^\star$ will be constant on a neighborhood of $x_0$.
So suppose $f^\star(x_0)=f(x_0)$. Given $\epsilon$, choose $\delta$ so $|x-x_0|<\delta\implies|f(x)-f(x_0)|<\epsilon$. Then for $x_0-\delta<x<x_0$, $$ f^\star(x_0)\ge f^\star(x)\ge f(x)>f(x_0)-\epsilon=f^\star(x_0)-\epsilon $$ and for $x_0<x<x_0+\delta$, $$ f^\star(x_0)\le f^\star(x)=\sup_{[a,x]}f(y)\stackrel{1}{=}\sup_{[x_0,x]} f(y)\stackrel{2}\le f(x_0)+\epsilon=f^\star(x_0)+\epsilon $$ 1 follows since $f(x)$ is the maximum of $f(y)$ for $y\in[a,x_0]$ (recall we assumed $f(x_0)=f^\star(x_0))$, so the region $[a,x_0]$ is redundant. 2 follows since $|y-x_0|<\delta$ when $y\in[x_0,x]$.
The two displayed inequalities imply $|f^\star(x)-f^\star(x_0)|<\epsilon$ for $|x-x_0|<\delta$, so $f^\star$ is continuous.
Solution 2:
f* is non-decreasing because f*(x) <= f*(y) if x < y due to the sup being taken over a larger set.
f* is continuous because consider a point x in [a,b] and assume f obtains its maximum value of y in [a,x]
Assume y < x, then |f*(x) - f(y)| = 0 < eps if x is within neighborhood |x-y| of x. If y = x then as f is continuous by definition we can find a neighborhood d of x such that |f*(x) - f(y)| < eps for any eps > 0.