I'm reading below exercise in Brezis' Functional Analysis, i.e.,
Exercise 4.9 Jensen's inequality (page 120):
Let $(\Omega, \mathcal F, \mu)$ be a measure space with $\mu(\Omega) < \infty$. Let $J:\mathbb R \to (-\infty, +\infty]$ be a convex lower semi-continuous function such that $J$ is not identically equal to $+\infty$. Let $f \in L^1 (\Omega)$ such that $f(\omega) \in D(J)$ for $\mu$-a.e. $\omega \in \Omega$ and that $J(f) \in L^1 (\Omega)$. Then $$ J \bigg ( \frac{1}{\mu(\Omega)} \int_\Omega f \, \mathrm d \mu \bigg ) \le \frac{1}{\mu(\Omega)} \int_\Omega J(f) \, \mathrm d \mu. $$ Here $D(J) := \{x \in \mathbb R : f(x) \neq +\infty\}$ is the domain of $J$. Clearly, $D(J)$ is a convex set.
We have $f(\omega) \in D(J)$ for $\mu$-a.e. $\omega \in \Omega$. We only know that $D(J)$ is convex.
Could you explain how to obtain $$ \frac{1}{\mu(\Omega)} \int_\Omega f \, \mathrm d \mu\in D(J) $$ ?
We have a related result, i.e.,
Fundamental inclusion for convex sets Let $C$ be a closed subset of $\mathbb{R}^n$. Then, $C$ is convex if and only if $\int_\Omega f \, \mathrm d\mu \in C$ for every probability space $(\Omega, \mathcal F, \mu)$ and for every $\mathbb{R}^n$-valued integrable functions $f$ on $\Omega$ satisfying $f(\omega)\in C$ for $\mu$-a.e. $\omega\in\Omega$.