Real Analysis, Folland problem 6.1.11 $L^p$ spaces

Problem 6.1.11 - If $f$ is a measurable function on $X$, define the essential range $R_f$ of $f$ to be the set of all $z\in\mathbb{C}$ such that $\{x:|f(x) - z| < \epsilon \}$ has positive measure for all $\epsilon > 0$

a.) $R_f$ is closed.

b.) If $f\in L^{\infty}$, then $R_f$ is compact and $\|f\|_{\infty} = \max\{|z|: z\in R_f \}$

I am not sure how to think about this problem. I believe we could take the complement of the range of $R_f$ defined by the set for $f$ and prove that it is open although I am not sure if that is the best approach. Any suggestions is greatly appreciated.

• Why did I get marked down. I will happily re-edit my question – Wolfy Apr 22 '16 at 23:52

Let $z=\lim z_n$, with $x_n\in R_f$. Given $\varepsilon>0$, let $n$ such that $|z_n-z|<\varepsilon/2$. The set $\{x:\ |f(x)-z_n|<\varepsilon/2\}$ has positive measure. If $|f(x)-z_n|<\varepsilon/2$, then $$|f(x)-z|\leq|f(x)-z_n|+|z_n-z|<\frac\varepsilon2+\frac\varepsilon2=\varepsilon.$$ This proves the inclusion $$\{x:\ |f(x)-z_n|<\varepsilon/2\}\subset \{x:\ |f(x)-z|<\varepsilon\}.$$ So the latter set contains a subset of positive measure and thus has positive measure.
When $f\in L^\infty$, this by definition means that $R_f$ is bounded. As it is already closed, it is compact.
For part $a.$), let $z$ be a limit point of $R_f$ and let $(z_n)_{n=1}^\infty$ be a sequence in $R_f$ such that $\lim_{n\to \infty} z_n = z$. Given $\epsilon > 0$, there exists an $N$ such that $|z_N - z| < \epsilon/2$. By triangle inequality, the set $\{x : \lvert f(x) - z\rvert < \epsilon\}$ contains the set $\{x : \lvert f(x) - z_N\rvert < \epsilon/2\}$, and $\{x : \lvert f(x) - z_N\rvert < \epsilon/2\}$ has positive measure. Hence, $\{x : \lvert f(x) - z_N\rvert < \epsilon\}$ has positive measure. Since $\epsilon$ was arbitary, $z\in R_f$ and $R_f$ is closed.
To show that $R_f$ is compact, it's enough to show that $R_f$ is closed and bounded. By part a.) $R_f$ is closed, so it suffices to show that $R_f$ is bounded. Try to prove $R_f$ is contained in a disc of radius $\|f\|_\infty$.