We have a measurable function $f : \: X \rightarrow \mathbb{C}$. For that function, we define something called "essential range" $E(f)$, which is:
$$E(f) = \left\{ z \in \mathbb{C} \: | \: \forall_{\varepsilon > 0} \: \mu (\left\{ x \in X \: : \: |f(x) - z| < \varepsilon \right\}) > 0 \right\}$$
where $\mu$ is the Lebesgue measure
Show, that $E(f)$ is a closed set in $\mathbb{C}$
If $f \in L_{\infty} (X, \mu)$, then $E(f)$ is also bounded and it is true, that $${\lVert}f{\rVert}_{\infty} = \max \left\{ |z| \: : \: z \in E(f) \right\} $$ where by definition, $${\lVert}f{\rVert}_{\infty} = \text{esssup}_{x \in X} |f(x)| =$$ $$= \inf \left\{ c > 0 \: : \: |f(x)| \le c \quad \mu\text{-almost everywhere i.e. everywhere but on sets of measure 0}\right\}$$ and $L_{\infty} (X, \mu)$ is the set of functions $f$ for which ${\lVert}f{\rVert}_{\infty} = \text{esssup}_{x \in X} |f(x)| < \infty$
My (failed) attempts
ad. 1
By definition, a closed set is a set for which the complement is an open set. So my idea would be, to show that the complement of $E(f)$ is open.
$$|f(x) - z| < \varepsilon$$
$$- \varepsilon < f(x) - z < \varepsilon$$
$$- \varepsilon + f(x) < z < \varepsilon + f(x)$$
So i got, that if $\mu (\left\{ x \in X \: : \: |f(x) - z| < \varepsilon \right\}) > 0$, then $z \in (-\varepsilon + f(x), \varepsilon + f(x))$, which is not really ideal I guess, as it indicates that $z$ would belong to an open set if the condition with $\mu (\left\{ x \in X \: : \: |f(x) - z| < \varepsilon \right\}) > 0$ is fulfilled.
ad. 2
Kind of goes the same way:
$$|f(x) - z| < \varepsilon$$
$$- \varepsilon < f(x) - z < \varepsilon$$
$$- \varepsilon + z < f(x) < \varepsilon + z$$
$$\Rightarrow \quad |f(x)| < \varepsilon + z \le |\varepsilon + z| \le |\varepsilon| + |z|$$
If $\varepsilon \rightarrow 0$, we get:
$$|f(x)| \le |z|$$
for $z \in E(f)$. We then just take the maximum and replace $c = |z|$.
That's at least the idea but I don't know how to properly argue here.
Does anyone have some ideas how to help me out here?