On the Riemann Sum Like of $L^{p}$ Functions If $f$ is a continuous function on $[0,1]$, then the following is clear:
\begin{align*}
\lim_{n\rightarrow\infty}n\sum_{k=0}^{n-1}\left(\int_{k/n}^{(k+1)/n}f(x)dx\right)^{2}=\int_{0}^{1}f^{2}(x)dx,
\end{align*}
but that is also true for $L^{2}[0,1]$, I tried to approximate using mollifier but no help. And I wonder why the Hilbert space $L^{2}$ does matter, that is, does this also hold for any $L^{p}$ for $1\leq p<\infty$ for nonnegative function $f$:
\begin{align*}
\lim_{n\rightarrow\infty}n^{p-1}\sum_{k=0}^{n-1}\left(\int_{k/n}^{(k+1)/n}f(x)dx\right)^{p}=\int_{0}^{1}f^{p}(x)dx.
\end{align*}
 A: Hint: Continuous functions on $[0,1]$ are dense in every $L^p[0,1], 1\le p <\infty.$
A: We first look at
\begin{align*}
&\left|\left(\dfrac{1}{n}\sum_{k=0}^{n-1}\left(n\int_{k/n}^{(k+1)/n}f(x)dx\right)^{p}\right)^{1/p}-\left(\dfrac{1}{n}\sum_{k=0}^{n-1}\left(n\int_{k/n}^{(k+1)/n}g(x)dx\right)^{p}\right)^{1/p}\right|\\
&\leq\left(\dfrac{1}{n}\sum_{k=0}^{n-1}\left|n\int_{k/n}^{(k+1)/n}(f(x)-g(x))dx\right|^{p}\right)^{1/p}\\
&\leq\left(\dfrac{1}{n}\sum_{k=0}^{n-1}\left(\int_{k/n}^{(k+1)/n}|f(x)-g(x)|(ndx)\right)^{p}\right)^{1/p}\\
&\leq\left(\dfrac{1}{n}\sum_{k=0}^{n-1}\int_{k/n}^{(k+1)/n}|f(x)-g(x)|^{p}(ndx)\right)^{1/p}\\
&=\left(\dfrac{1}{n}\int_{0}^{1}|f(x)-g(x)|^{p}(ndx)\right)^{1/p}\\
&=\|f-g\|_{L^{p}[0,1]}.
\end{align*}
And we have by Integral Mean Value that 
\begin{align*}
\left(\dfrac{1}{n}\sum_{k=0}^{n-1}\left(n\int_{k/n}^{(k+1)/n}g(x)dx\right)^{p}\right)^{1/p}\rightarrow\|g\|_{L^{p}[0,1]}
\end{align*}
as $n\rightarrow\infty$ for $g\in C[0,1]$.
Now given $\epsilon>0$, find some $g\in C[0,1]$ such that $\|f-g\|_{L^{p}[0,1]}<\epsilon$, then find some $N$ such that 
\begin{align*}
\left|\left(\dfrac{1}{n}\sum_{k=0}^{n-1}\left(n\int_{k/n}^{(k+1)/n}g(x)dx\right)^{p}\right)^{1/p}-\|g\|_{L^{p}[0,1]}\right|<\epsilon
\end{align*}
for all $n\geq N$. For such an $n$, we have
\begin{align*}
&\left|\left(\dfrac{1}{n}\sum_{k=0}^{n-1}\left(n\int_{k/n}^{(k+1)/n}f(x)dx\right)^{p}\right)^{1/p}-\|f\|_{L^{p}[0,1]}\right|\\
&\leq\left|\left(\dfrac{1}{n}\sum_{k=0}^{n-1}\left(n\int_{k/n}^{(k+1)/n}g(x)dx\right)^{p}\right)^{1/p}-\left(\dfrac{1}{n}\sum_{k=0}^{n-1}\left(n\int_{k/n}^{(k+1)/n}g(x)dx\right)^{p}\right)^{1/p}\right|\\
&~~~~~~~~+\left|\left(\dfrac{1}{n}\sum_{k=0}^{n-1}\left(n\int_{k/n}^{(k+1)/n}g(x)dx\right)^{p}\right)^{1/p}-\|g\|_{L^{p}[0,1]}\right|+\left|\|f\|_{L^{p}[0,1]}-\|g\|_{L^{p}[0,1]}\right|\\
&\leq 2\|f-g\|_{L^{p}[0,1]}+\epsilon\\
&<3\epsilon.
\end{align*}
