TITLE: Is there a function unbounded on all sets with positive measure?
QUESTION [5 upvotes]: Is there a function $f:[0,1]\rightarrow R$ such that for all $B\subset [0,1]$ with the Lebesgue measure $\mu(B)>0$, $f$ is unbounded on $B$?

REPLY [4 votes]: Yes. Let $A$ be a Vitali set, that is, a set of representatives of $\mathbb R/\mathbb Q$, and let $m:\mathbb Q\to\mathbb N$ be an enumeration of the rationals. Define $f(\alpha+q)=m(q)$ for all $\alpha\in A, q\in\mathbb Q$ (restrict to $\alpha+q\in[0,1]$ if you want a function defined on $[0,1]$). There is no set $B$ with $\mu(B)>0$ on which $f$ is bounded, because each such set would be a subset of $\bigcup_{n=1}^N f^{-1}(n)$ for some $N$, and all measurable subsets of a non-measurable set $f^{-1}(n)$ necessarily has measure $0$ (see The subset of non-measurable set ).