# Locally Bounded vs Bounded Almost Everywhere

Is a locally bounded function $f: \mathbb{R}^n \rightarrow \mathbb{R}_{\geq 0}$ also "bounded almost everywhere"?

Is the viceversa true?

Notes.

Definition of "local boundedness":

$f: \mathbb{R}^n \rightarrow \mathbb{R}_{\geq 0}$ is locally bounded if for any $x \in \mathbb{R}^n$ there exists a neighborhood $A$ of $x$ such that $f(A)$ is a bounded set, that is, for some $M > 0$ we have $f(x) \leq M$ for all $x \in A$.

Definition of "almost-everywhere boundedness":

$f: \mathbb{R}^n \rightarrow \mathbb{R}_{\geq 0}$ is bounded almost everywhere on $\mathbb{R}^n$ if there exist $M>0$ and a set $E \in \mathbb{R}^n$ of measure $0$ so that $f(x) \leq M$ for any $x \notin E$.

-
Did you try to write down the precise meaning of both things, put them next to each other, and stare at them for a while? –  user31373 Jun 5 '12 at 18:37
Good. You should be able to see that every continuous function is locally bounded. Are there continuous functions that are unbounded? Do they satisfy the second definition? –  user31373 Jun 5 '12 at 18:50
So $f(x)=x$ is locally bounded but not bounded almost everywhere, right? –  Adam Jun 5 '12 at 18:56
@Adam yes. Now, how would you modify it to get a positive valued function? –  mrf Jun 5 '12 at 19:02
just $f(x)=|x|$ –  Adam Jun 5 '12 at 19:47

Consider the function $f:\mathbb{R}\to\mathbb{R}_{\geq 0}$ given by $$f(x)=\begin{cases}0 & x=0\:\mathrm{or}\: x\notin\mathbb{Q}\\1/|x| & \mathrm{otherwise}\end{cases}.$$ Is $f$ bounded almost everywhere? Is $f$ locally bounded?