Riemann integral (source code)

= Riemann integral
{c}
{title2=$\int_a^b f(x)\,dx$}
{wiki}

For a bounded real <function> on a closed finite interval, the <Riemann integral> exists when the supremum of its lower <Darboux sums> equals the infimum of its upper <Darboux sums>. Their common value is $\int_a^bf(x)dx$. Equivalently, for every $\epsilon>0$ there is a <partition of an interval> whose upper-minus-lower sum is less than $\epsilon$.<Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl/5.1 The Riemann integral>[§5.1.1–5.1.2, partitions, lower and upper integrals]{ref}

For $f(x)=x$ on $[0,1]$, uniform partitions into $n$ pieces give lower and upper sums $1/2-1/(2n)$ and $1/2+1/(2n)$, proving that the <integral> is $1/2$. The <Dirichlet function> has lower sums zero and upper sums one on this interval, so it is not <Riemann integrable>. The definition explains why boundedness alone is insufficient.