TITLE: A everywhere finite measurable function $f$ satisfies $\int |g \circ f|<\infty$ for all continuous $g$, then $||f||_\infty<\infty$
QUESTION [5 upvotes]: A everywhere finite measurable function $f$ on a measure space $(\Omega,\mathcal{A},\mu)$ such that for all continuous function $g: \mathbb{R}\rightarrow \mathbb{R}$, the composition $g\circ f$ is integrable,  then the function $f$ must be integrable w.r.t $|| \cdot||_\infty$,  i.e  $f$ must satisfy $||f||_\infty<\infty$.
My thought is that $f(\Omega)$ must be bounded in $\mathbb{R}$, but I have no idea.

REPLY [3 votes]: Assume that $\Vert f \Vert_\infty = \infty$.
For convenience, I assume that $f$ is not essentially bounded above. If $f$ is not essentially bounded below, you have to modify the argument slightly.
Thus, there is a sequence $(n_k)_k$ of natural numbers with $n_{k+1} \geq n_k +3$ for all $k$ and $a_k := \mu(\{x \mid f(x) \in [n_k, n_k+1]\}) > 0$ for all $k$ (show that!).
Now choose a continuous function $g \geq 0$ with $g|_{[n_k, n_k+1]} \geq c_k$, where $a_k \cdot c_k \geq 1$ (why does there exist such a function $g$?).
Show that $\int |g \circ f| \geq \sum_k c_k a_k = \infty$, a contradiction.