Solution (source code)

= Solution

Let $|f|\le M$. If $M=0$ the result is immediate, so take $M>0$. Given $\varepsilon>0$, choose $0<\delta<\varepsilon/(4M)$ and the finitely many intervals supplied by the hypothesis. On each $[a_i,b_i]$, choose a <partition of an interval> whose <Darboux sum> gap is less than $\varepsilon/(2n)$, using <Riemann integrability> there.

Combine all these partitions with $0,1$ and all interval endpoints to obtain a global <partition of an interval> $P$. On the chosen intervals the gaps add to less than $\varepsilon/2$. The complementary intervals have total length
$$
1-\sum_{i=1}^n(b_i-a_i)\le\delta,
$$
and on each the difference between the supremum and infimum is at most $2M$. Consequently
$$
U(f,P)-L(f,P)<\frac\varepsilon2+2M\delta<\varepsilon.
$$
The <Riemann integrability criterion> proves \b[$f$ is <Riemann integrable> on $[0,1]$]. Shared endpoints cause no problem: the <Darboux sums> use closed intervals, and the complementary interval estimate includes every endpoint value. This proves <Riemann integrability from almost full interval coverage>.