# An example of a function not in $L^2$ but such that $\int_{E} f dm\leq \sqrt{m(E)}$ for every set $E$

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?

1. $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.
2. 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.
3. 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$.
4. So, we want $F(x)\le \sqrt{x}$ and at the same time, make $F$ big. Hmm... how about $F(x)=\sqrt{x}$?
5. Go back to $f$, and you have your example.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.966978132724762, "perplexity": 107.65368865031924}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-39/segments/1631780057036.89/warc/CC-MAIN-20210920101029-20210920131029-00280.warc.gz"}