I've recently started learning Lebesgue integral and having come across this problem I'm not sure how one would prove this.
Let $f(x):[a,b] \to \mathbb{R}$ be continuous and let $M=sup_{x\in[a,b]}|f(x)|$. suppose that $M>0$ and $p>0$.
- prove that for every $\epsilon$ such that $0<\epsilon<\frac{M}{2}$ there is a non-empty open interval $I \subset [a,b]$ such that $$(M-\epsilon)^p |I| \leq \int_{a}^{b} |f(x)|^p \, dx \leq M^p (b-a)$$
- deduce that $\lim_{p \to \infty} (\int_{a}^{b} |f(x)|^p \, dx =M$
any help is appreciated.