Compute $d(0,B)$ where $B=\{f\in \mathcal C([0,1])\mid f(0)=0, \int_0^1 f=1\}$ Let $(\mathcal C([0,1]),\|\cdot \|_\infty )$ the normed space where $\|\cdot \|_\infty $ is the supremum norm.
1) Compute $$d(0,B):=\inf_{\substack{f\neq 0 \\ f\in B}}d(0,f)$$ where $$B=\left\{f\in \mathcal C([0,1])\mid f(0)=0\text{ and } \int_0^1 f=1\right\}.$$
2) Is there $f\in B$ s.t. $d(0,B)=\|f\|_\infty $ ?
Attempt
1) The only thing I know is that if $f\in B$, then $$1=\int_0^1 f\leq \int_0^1 |f|\leq \|f\|_\infty,$$
and thus $d(0,B)\geq 1$. I guess the norm it $1$, but I can't find a sequence $(f_n)$ in $B$ s.t. $\|f_n\|_\infty \to 1$.
2) No idea.

Hint: Take$$\begin{array}{rccc}f_n\colon&[0,1]&\longrightarrow&\mathbb R\\&x&\mapsto&\begin{cases}n\left(x-1+\frac1n\right)&\text{ if }x>1-\frac1n\\0&\text{ otherwise.}\end{cases}\end{array}$$Prove that $(\forall n\in\mathbb{N}):f_n\in B$ and compute $d(0,f_n)$.
