I am thinking about this problem:
Let $f\in L^1 [0,1]$ to be a nonnegative function satisfied:
$$\int_{E} f dm\leq \sqrt{m(E)}$$ for every measurable set $E\subset [0,1]$, Prove that $f\in L^{p}[0,1]$ for $1\leq p<2$.
I have already done this. But I want a counterexample for $p=2$. How to obtain one?
Instead of just giving an example, I'll show a typical path to it.
$L^p$ norms are invariant under rearrangement of the function: informally, we can move its values around, for example sorting them in decreasing order. So, it does not seem too restrictive to focus on decreasing functions.
If $f$is decreasing, then $\int_{E} f\, dm\leq \int_{0}^{ m(E)} f\,dm$. So we only need to consider initial intervals $[0,a]$ instead of general measurable sets.
The condition we need is $\int_0^a f\,dm \le \sqrt{a}$ for all $a\in [0,1]$. Looks like it's easier to state it in terms of antiderivative $F(x)=\int_0^x f\,dm$.
So, we want $F(x)\le \sqrt{x}$ and at the same time, make $F$ big. Hmm... how about $F(x)=\sqrt{x}$?
Go back to $f$, and you have your example.