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.
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.