Let $f:\mathbb R\to\mathbb R$ be a continuous function such that $f>0$ for almost every $x\in\mathbb R$.
Does one can deduce from this that both $\inf_{x\in\mathbb R} f(x) >0$ and $\sup_{x\in\mathbb R} f(x)>0$?
If yes, how to show this? It seems reasonable to me but I do not how to approach the proof. Any hint?
Since $f(x)>0$ a.e. there exists some $x_0\in \mathbb{R}$ such that $f(x_0)>0$. Then $\sup_{x\in\mathbb{R}} f(x) \geq f(x_0) > 0$. The same does not hold for the infimum. As a counterexample take $f(x)=|x|$ which is positive a.e.
It is worth mentioning that if $f(x)$ is continuous everywhere and positive a.e. then $f(x)\geq 0$ for all $x\in \mathbb{R}$ and therefore $\inf_{x\in \mathbb{R}}f(x) \geq 0$. Indeed, if $f(x_1) < 0$ for some $x_1\in \mathbb{R}$ you can find an $\varepsilon > 0$ such that $f(x) < 0$ for all $x\in U:=(x_1-\varepsilon, x_1 + \varepsilon)$ Since $U$ has non-zero measure we get a contradiction, so $f \geq 0$ everywhere.