# If $f(x)$ and $g(x)$ are Riemann integrable and $f(x)\leq h(x)\leq g(x)$, must $h(x)$ be Riemann integrable?

Let $f$ and $g$ be Riemann integrable (real) functions and

$$f(x)\leq h(x)\leq g(x).$$

Is it true that $h(x)$ is Riemann integrable? Can someone post a proof (if there is)?

Thanks.

-
There exists bounded functions which are not Riemman integrable. Therefore no, that is not true: pick any bounded function $h$ which is not integrable in $[0,1]$, and suppose that $|h(x)|\leq M$ for all $x$. Then set $f(x)=-M$ and $g(x)=M$. – Mariano Suárez-Alvarez Nov 26 '11 at 18:25

## 1 Answer

No.

As an easy counterexample, take any bounded function $h:[0,1] \to \mathbb R$ that is not Riemann integrable. Assuming $a \leqslant h(x) \leqslant b$ for all $x \in [0,1]$, $h$ is always between the constant functions $a$ and $b$, both of which are integrable.

If you want a specific counterexample, take the Dirichlet function $$h(x) = \begin{cases} 1, &x \text{ is rational}, \\ 0, &\text{otherwise}, \end{cases}$$ restricted to the unit interval. Clearly, $h$ is bounded between $0$ and $1$.

-