= Solution
Let $f:[a,b]\to\mathbb R$ be continuous. If it were unbounded, one could choose $x_n\in[a,b]$ with $|f(x_n)|>n$. The <Bolzano-Weierstrass theorem> gives a subsequence $x_{n_j}\to x\in[a,b]$, but continuity would then give $f(x_{n_j})\to f(x)$, contradicting unboundedness.
Now let $M=\sup f([a,b])$. Choose $x_n$ with $f(x_n)>M-1/n$. A convergent subsequence and continuity give $f(x)=M$ at its limit. Applying the same argument to $-f$ shows that the infimum is attained. This proves the <extreme value theorem> on a closed bounded interval.
The function
$$
\phi(x)=x\qquad(0<x<1)
$$
is continuous and bounded, but attains neither its infimum $0$ nor its supremum $1$. For the second example, enumerate the rationals in $[0,1]$ as $(q_n)$ and set
$$
\psi(x)=
\begin{cases}
n,&x=q_n,\\
0,&x\notin\mathbb Q.
\end{cases}
$$
Every <nondegenerate interval> contains infinitely many <rational numbers>, hence some $q_n$ with arbitrarily large $n$; therefore $\psi$ is <unbounded function>[unbounded] on every such interval.
For the running extrema, compactness lets us write
$$
m(x)=\min_{a\leq\xi\leq x}f(\xi),\qquad
M(x)=\max_{a\leq\xi\leq x}f(\xi).
$$
The function $f$ is <uniform continuity>[uniformly continuous] on $[a,b]$. Given $\varepsilon>0$, choose $\delta>0$ such that $|f(u)-f(v)|<\varepsilon$ whenever $|u-v|<\delta$. If $x<y$ and $y-x<\delta$, every new value $f(\xi)$ with $x\leq\xi\leq y$ is at most $f(x)+\varepsilon\leq M(x)+\varepsilon$. Since $M(y)\geq M(x)$,
$$
0\leq M(y)-M(x)\leq\varepsilon.
$$
Interchanging $x,y$ handles the other order. Applying this argument to $-f$ proves continuity of $m$ as well.
Finally fix $T>0$ and put $h(x)=g(x+T)-g(x)$. For each positive integer $n$, there must be some $x_n>n$ with $|h(x_n)|<1/n$. Otherwise, for some $n$ the continuous function $h$ would satisfy $|h(x)|\geq1/n$ on the interval $(n,\infty)$. By the <intermediate value theorem>, $h$ would have a constant sign there. The values
$$
g(x),g(x+T),g(x+2T),\ldots
$$
would then increase or decrease by at least $1/n$ at every step, contradicting boundedness of $g$. Thus $x_n\to\infty$ and
$$
\boxed{g(x_n+T)-g(x_n)\to0}.
$$
Back to article page