# Consider a measurable function $f:[0,1]\rightarrow \mathbb{R}$ such that $f(x)\geq ||f||_2$.

So I am stuck on this question and I don't really know how to go about it. The question is

Let $X=[0,1]$ and $\mu = \lambda$ be the Lebesgue measure. Consider a measurable function $f:[0,1]\rightarrow \mathbb{R}$ such that $f(x)\geq ||f||_2$ for all $x \in [0,1]$. Prove that there exists an $x \in [0,1]$ such that $f(x_0) =||f||_2$.

So far, I have written out the statements

$||f||_2=\bigg(|f|^2 d\lambda \bigg)$ and $f(x)\geq \bigg( \int |f|^2 d\lambda \bigg)^{\frac{1}{2}}$

Using Holder's inequality $$\|f\|_2 = \int_0^1 \|f\|_2 \leq \int_0^1 f \leq \left(\int_0^1 |f|^2\right)^{1/2} = \|f\|_2.$$ Hence the non-negative function $g(x) := f(x) - \|f\|_2$ satisfies $\int_0^1 g = 0$, so that $g(x) = 0$ a.e. in $[0,1]$, i.e. $f(x) = \|f\|_2$ a.e. in $[0,1]$.
Since $\{x\in[0,1]:f(x)>\|f\|_{2}\}=\bigcup_{n\in\mathbb{N}}\{x\in[0,1]:f(x)-\frac{1}{n}\geq\|f\|_{2}\}$, if there is not such $x_{0}$, for some $n_0$ we would have for $C_{0}=\{x\in[0,1]:f(x)-\frac{1}{n_{0}}\geq\|f\|_{2}\}$, $\mu(C)>0$. Then,
$$\int_{C}f^{2}\geq \int_{C}\left (\|f\|_{2}+\frac{1}{n_{0}}\right )^{2}= \left (\frac{1}{n_{0}}+\|f\|_{2}\right )^{2}\mu(C)$$ and
$$\int_{[0,1]\backslash C}f^{2}\geq \|f\|_{2}^{2}\mu([0,1]\backslash C)$$
So, $$\int_{[0,1]}f^{2}\geq \|f\|_{2}^{2}+\mu(C)(\frac{1}{n_{0}^{2}}+\frac{2\|f\|_{2}}{n_{0}})>\|f\|_{2}^{2}$$