My question:
Define the distance on $C[0,1]$ by $$d(f,g)=\max_{x\in [0,1]}|f(x)-g(x)|.$$ Prove that the set $S \subset C[0,1]$ is not compact, where $S=\{f \in C[0,1]|d(f,0)=1\}$.
My idea: For this, I assume that if I choose a sequence $\{f_n\}$ in $S$, that is Cauchy, but the limit of $\{f_n\}$ is not continuous. This implies $S$ is not compact.
I chose $f_n(x)=(-1)^{n}$. The limit points of $f_n(x)$ are $f(x)=1,$ and $-1$. I observed that this sequence is not Cauchy, so I cannot use my idea.
I choose another example, $f_n(x)=x^n$, but this is also not Cauchy.
Can anyone suggest an example of this case that works?
Here is one indirect way:
Let $\phi(f) = \int_{0}^{1/2} f(t) dt-\int_{1/2}^{1} f(t) dt$. It is straightforward to see that $\phi$ is continuous on $C[0,1]$ and $ \phi(f) < 1$ for all $f \in S$.
Let $f_n$ be the function whose graph is given by joining the points $(0,{1}), ({1 \over 2}-{1 \over n},1), ({1 \over 2}+{1 \over n},-1), (1,-1)$ and note that $f_n \in S$ and $\phi(f_n) \to 1$.
Hence $\sup_{f \in S} \phi(f) = 1$ but the $\sup$ is not attained. If $S$ was compact then there would be a maximiser.