For a bounded real function on , take a partition with nodes . Its lower Darboux sum and upper Darboux sum are
The function is Riemann integrable when ; their common value is its Riemann integral. Equivalently, for every some partition has . Indeed a common refinement of nearly extremizing upper and lower partitions proves necessity, while arbitrarily small gaps force equality of the two integrals. This is the Riemann integrability criterion.
A continuous function on a compact interval is bounded and uniformly continuous. Choose a mesh small enough that its oscillation on each subinterval is less than . Then ; using first makes the desired inequality strict. Thus every continuous function on is Riemann integrable.
For a partition , write and for the upper Darboux sum and lower Darboux sum. The Riemann integrability criterion for bounded is that for every some partition satisfies . Thus if the gaps for tend to zero, the Riemann integrability criterion immediately proves that is Riemann integrable.
Conversely, suppose is Riemann integrable, and choose a fixed partition with . Let be the number of its interior division points and choose with . Call a cell of bad when its interior contains a division point of . There are at most bad cells, and their total length is at most .
Every other cell lies in a single cell of , so its oscillation is no larger than that of the containing cell. Summing the contributions of these good cells gives at most , while each bad cell has oscillation at most . Therefore the finite bad-cell estimate for Darboux sums gives
For large enough , the right-hand side is less than . This proves the uniform-mesh Darboux criterion
This argument does not assume that the partitions are nested; in general they are not.
For the composition, takes values in . Since is continuously differentiable, the extreme value theorem bounds both and on that interval. In particular, let . The mean value theorem states that a function continuous on the interval between and differentiable in its interior satisfies for some intermediate . Hence
On each partition cell, this bounds the oscillation of by times the oscillation of , whether or not the local extrema are attained. It follows that
The composition is bounded, so the proved uniform-mesh Darboux criterion applies. Thus is Riemann integrable. The reusable fact is Lipschitz composition preserves Riemann integrability; continuous differentiability supplies the required bound on the range of .
Let be the supremum of all lower Darboux sums and the infimum of all upper Darboux sums. The assumed comparison of arbitrary lower and upper sums gives . For the partition supplied for a given ,
Since this holds for every positive , . Thus the Riemann integrability criterion gives
If is continuous on , the Heine-Cantor theorem makes it uniformly continuous. Given , choose so that intervals of length below have oscillation below . A partition of mesh below then satisfies
proving that Continuous functions are Riemann integrable.
For the function defined using , choose with . Given , choose so small that . On , the function is continuous and therefore has a partition whose upper-minus-lower sum is below . Adding the interval contributes at most , regardless of the value . Hence the full Darboux-sum difference is below , and
Finally, for any partition , the mean value theorem supplies such that
Summing telescopes to
a Riemann sum for the Riemann-integrable function . Equivalently, every lower derivative sum is at most this telescoping value and every upper derivative sum is at least it. Taking the common upper and lower Darboux integrals proves the fundamental theorem of calculus conclusion
Assume . The function is bounded, and every interval has lower Darboux sum zero because it contains an irrational. Given , choose so that for . Put small intervals around the finitely many points whose total length makes their contribution to the upper sum less than , and refine their endpoints to a partition. On every remaining subinterval the function is at most , so the upper sum is less than . The Riemann integrability criterion proves that is Riemann integrable with integral zero.
The condition is sufficient but not necessary. Assign when for some positive integer , and otherwise. Then does not tend to zero. Outside a short interval near zero only finitely many unit spikes occur and can be enclosed in intervals of arbitrarily small total length; all remaining values can be made uniformly small except for finitely many further points. The same Darboux-sum argument proves that this is Riemann integrable with integral zero.
It is enough to treat an increasing function; replacing by handles a decreasing one. Let be the common refinement of dissections and . Refinement raises lower Darboux sums and lowers upper ones, so
For the uniform dissection , monotonicity gives the telescoping difference
This can be made smaller than any , so the Riemann integrability criterion proves that is integrable.
The integral lies between the lower and upper sums, and the displayed sum in the question is the right-endpoint upper sum. Hence the generally valid sharp estimate is
The strict inequality printed in the question is false for arbitrary monotone functions: if for and , the two sides of (1) are both .
For the final claim, write
Since is continuous on a compact interval, it is uniformly continuous. Uniformly for ,
After the substitution , summing the uniform errors gives
The right-hand sum is a Riemann integral, so the fundamental theorem of calculus yields
Let be continuous on . Compactness makes it uniformly continuous. Given , choose such that
Choose a partition with mesh smaller than . The oscillation on every subinterval is then at most , so
The Riemann integrability criterion proves that every continuous function on is Riemann integrable.
For , let be the set of numbers whose first digit occurs in position . The first digits each have nine allowed values, while the th is fixed, so is a union of decimal intervals of total length
The set of numbers having no digit can, after places, be covered by intervals of total length ; hence it has length zero.
For each fixed truncation level, the function is constant on finitely many decimal cylinders apart from the remaining set, whose covering length can be made arbitrarily small. The Riemann integrability criterion therefore shows that every truncation is Riemann integrable.
For integer ,
The final term tends to zero, and monotonicity handles noninteger truncation levels. Therefore the first occurrence of a decimal digit calculation gives
A bounded function on is Riemann integrable if and only if its upper Darboux sum minus its lower Darboux sum on the equal-length partition tends to zero. Sufficiency follows directly from the Riemann integrability criterion. Necessity follows by comparing with a fixed partition whose gap is small and using the finite bad-cell estimate for Darboux sums. The equal-length partitions need not be nested.