TITLE: Is the pointwise maximum of two Riemann integrable functions Riemann integrable?
QUESTION [7 upvotes]: Let $f,g$ be Riemann integrable functions, prove that the function $ h(x) $ defined by $$
h\left( x \right) = \max \left\{ {f\left( x \right),g\left( x \right)} \right\}
$$
is also Riemann integrable.

REPLY [8 votes]: Call $\Delta_\sigma(u)$ the difference between the upper and lower Darboux sums of a function $u$ with respect to a subdivision $\sigma$. By definition of Riemann integrability, $\inf\limits_\sigma\Delta_\sigma(f)=\inf\limits_\sigma\Delta_\sigma(g)=0$. Call $M_I(u)$ and $m_I(u)$ the supremum and the infinum of a function $u$ on an interval $I$. 
Then, for every interval $I$, $M_I(h)=\max\{M_I(f),M_I(g)\}$ and $m_I(h)\geqslant\max\{m_I(f),m_I(g)\}$, hence 
$$
M_I(h)-m_I(h)\leqslant\max\{M_I(f)-m_I(f),M_I(g)-m_I(g)\},
$$
which implies
$$
M_I(h)-m_I(h)\leqslant M_I(f)-m_I(f)+M_I(g)-m_I(g).
$$
Summing this over the intervals $I$ defining a subdivision $\sigma$, one gets $\Delta_\sigma(h)\leqslant\Delta_\sigma(f)+\Delta_\sigma(g)$.
For every positive $t$, there exists $\sigma$ such that $\Delta_\sigma(f)\leqslant t$ and $\tau$ such that $\Delta_\tau(g)\leqslant t$. For every subdivision $\varrho$ containing $\sigma$ and $\tau$, one gets 
$$
\Delta_\varrho(h)\leqslant \Delta_\varrho(f)+\Delta_\varrho(g)\leqslant\Delta_\sigma(f)+\Delta_\tau(g)\leqslant2t. 
$$
This proves that $\inf\limits_\sigma\Delta_\sigma(h)=0$ hence $h$ is Riemann integrable.