Convergence of $\max_{0\le i\le n}|f(i/n)|$ Suppose that $f\colon [0,1]\to\mathbb R$ is a continuous function. How can I prove that
$$\max_{0\le i\le n}\biggl|f\Bigl(\frac in\Bigr)\biggr|\to\sup_{0\le x\le1}|f(x)|$$
as $n\to\infty$?
Any help will be appreciated.
 A: Clearly, the max of a few points is $\le$ the supremum.
For any $\epsilon>0$, you can find $x_0\in[0,1]$ such that $|f(x_0)|>\sup |f(x)|-\frac\epsilon2$. Then, by continuity, you find $\delta>0$ such that $|x-x_0|<\delta$ implies $|f(x)|>|f(x_0)|-\frac\epsilon2$. Wlog., $\delta<1$. Then the interval $(x_0-\delta,x_0+\delta)\cap [0,1]$ has length at least $\delta$. As soon as $n>\frac1\delta$, at least one $\frac in$ is in $(x_0-\delta,x_0+\delta)$ and hence then $$\max_{0\le i\le n}\left|f\left(\frac in\right)\right|>|f(x_0)|-\frac\epsilon2>\sup_{0\le x\le 1}|f(x)|-\epsilon.$$
A: $[0,1]$ is compact and $x \mapsto |f(x)|$ is continuous, so there is some point $\hat{x} \in [0,1]$ at which the maximum is attained. By continuity, for all $\epsilon>0$ there is some $\delta>0$ such that if $|x-\hat{x}|< \delta$, then $|f(x)|>|f(\hat{x})|-\epsilon$ (remember $\hat{x}$ is a maximizer).
Let $P_k = \{ \frac{i}{k} \}_{i=0}^k$. 
Let $\epsilon>0$ and choose $N$ such that $\frac{1}{N} < \delta$. Then choose $n \ge N$ and $x \in B(\hat{x},\delta) \cap P_n$ (which must be non-empty). Then $|f(x)|>|f(\hat{x})|-\epsilon$, or, in other words, $\max_{x \in P_n} |f(x)| > \sup_{x \in [0,1]} |f(x)|-\epsilon$ for all $n \ge N$. Since $\epsilon>0$ was arbitrary, we have the desired result.
