In his probability book Bauer proves the following version of Jensen's inequality:
Proposition. Let $X$ be an integrable random variable taking values in an open interval $I\subset\mathbb{R}$, and let $q$ be a convex function on $I$. If $q\circ X$ is integrable, then
$$q(E(X))\leq E(q\circ X).$$
Now am asked to prove that the result holds for an arbitrary interval, e.g. $I=[a,b]$. As a hint Bauer suggests to show that $q$ is lower semicontinuous on $I$, i.e. that $\{x\in I:q(x)>\alpha\}$ is relatively open in $I$ for every $\alpha \in \mathbb{R}$.
How can I do this? I tried an answer below. Any comment is greatly appreciated.
EDIT: I believe Bauer means to show that $q$ is upper semicontinuous, not lower. Indeed by considering the indicator of $\{0,1\}$ on the interval $[0,1]$ it is clear that a convex function need not be lower semicontinuous. To show this, suppose $I=[a,b]$. By convexity we know that $q$ is continuous on $(a,b)$, and so in particular upper semicontinuous on $(a,b)$. Also by convexity, we know that $q'_+(a)$ exists, but might be $-\infty$ (convexity implies that $q'_+(x)$ exists and is nondecreasing on $I$, and is real-valued on $I^\mathrm{o}$). If $q'_+(a)\in\mathbb{R}$, then $q$ is continuous at $a$ and so in particular upper semicontinuous at $a$. If $q'_+(a)=-\infty$, then we see that that $q$ must be decreasing in a neighborhood of $a$, which implies upper semicontinuity of $q$ at $a$. A similar argument using the left derivative $q'_-(x)$ applies for the endpoint $b$.