About essential range and essential supremum $\newcommand{\esssup}{\mathrm{ess\,sup}}$$\newcommand{\essrng}{\mathrm{ess\,range}}$
I am trying to prove that $\esssup(f) = \sup(\essrng(f))$, where we define
$$
\esssup(f) = \inf \{b \in \mathbb{R}_+ : \mu(f^{-1}((b, \infty))) = 0\} 
$$
and similarly
$$
\essrng(f) = \{w \in \mathbb{R}_+ : \mu(f^{-1}(B(w, \epsilon))) > 0\}.
$$
Actually, I already showed that $\esssup(f) \leq \sup(\essrng(f))$, but I have not been able to prove the other direction. The answer on this related question hasn't been useful for me to prove the desired reverse inequality.
If you could give me a hint to prove it, I'll be really grateful.
 A: $\newcommand{\esssup}{\mathrm{ess\,sup}}$$\newcommand{\essrng}{\mathrm{ess\,range}}$ You want to prove that $\esssup(f) \geq \sup (\essrng(f))$. For this, it's enough to show that if $w \in \essrng(f)$, then $\esssup(f) \geq |w|$.
Hint: You can do this by contradiction: Assume there is $w_0 \in \essrng(f)$ such that $\esssup(f)<|w_0|$ and try to find a contradiction by playing around with the definitions of $\esssup$ and $\essrng$.
Solution: (Try not to look at this until you've tried to solve it by yourself)

I am assuming that the measure space here is called $X$. By definition of essential supremum we have $|f(x)| \leq \esssup(f)$ a.e. $[\mu]$, so$$ \mu\big( \left\{  x \in X :  |f(x)| > \esssup(f) \right\} \big) =0$$Take any $w_0 \in \Bbb{C}$ and suppose that $|w_0| > \esssup(f)$. Then, there is $\varepsilon_0$ such that $|w_0| - \varepsilon_0 >\esssup(f)$. Therefore, if $x \in X$ is such that $|f(x)-w_0|< \varepsilon_0$ the reverse triangle inequality implies that $|f(x)|>|w_0|-\varepsilon_0 > \esssup(f)$. Hence  $$\{x \in X : |f(x)-w_0|< \varepsilon_0 \} \subset  \{ x \in X :  |f(x)| >\esssup(f)\}$$However, if $w_0 \in \essrng(f)$,$$0 < \mu\big( \{x \in X : |f(x)-w_0|< \varepsilon_0 \} \big) \leq \mu\big(  \{ x \in X :  |f(x)| > \esssup(f) \}  \big)=0$$a contradiction! Then we must have $|w| \leq \esssup(f)$ for any $w \in \essrng(f)$, as desired.

