A curve drawn by a physical instrument rarely comes with a formula for an antiderivative. The older problem of integration is more basic: how should we assign an area to a [bounded function](/page/Bounded%20Function) on an interval using only finite measurements? If we sample the function at finitely many points, we may miss spikes. If we use rectangles, the answer depends on where the rectangles touch the graph. Riemann integrability is the theory that explains when these finite rectangle approximations settle down to a single number.
The central tension is that a function can be bounded and still behave badly at many points. The [Riemann integral](/page/Riemann%20Integral) tolerates discontinuities when their total effect can be confined to intervals of small total length, but it rejects functions whose oscillation remains visible across a set too large to ignore. This makes Riemann integrability a special case of integrability: it is not the most general integral, but it is the one built from partitions of intervals and upper and lower rectangular estimates.
[example: A Function That Defeats Sampling]
Let $f: [0,1] \to \mathbb{R}$ be defined by $f(x)=1$ for $x \in \mathbb{Q}$ and $f(x)=0$ for $x \notin \mathbb{Q}$. We show that no partition can make the upper and lower rectangular estimates approach one another.
Let $P=(x_0,x_1,\ldots,x_n)$ be any partition of $[0,1]$. For each $i \in \{1,\ldots,n\}$, the interval $[x_{i-1},x_i]$ has positive length, so it contains at least one rational point and at least one irrational point. Hence the set of values of $f$ on $[x_{i-1},x_i]$ contains both $0$ and $1$, and since $0 \le f(x) \le 1$ for every $x \in [0,1]$, we have
\begin{align*}
m_i(f,P)=\inf\{f(x):x \in [x_{i-1},x_i]\}=0.
\end{align*}
Similarly,
\begin{align*}
M_i(f,P)=\sup\{f(x):x \in [x_{i-1},x_i]\}=1.
\end{align*}
Therefore the lower sum is
\begin{align*}
L(P,f)=\sum_{i=1}^n 0\cdot (x_i-x_{i-1})=0.
\end{align*}
The upper sum is
\begin{align*}
U(P,f)=\sum_{i=1}^n 1\cdot (x_i-x_{i-1})=\sum_{i=1}^n (x_i-x_{i-1}).
\end{align*}
The subinterval lengths telescope:
\begin{align*}
\sum_{i=1}^n (x_i-x_{i-1})=(x_1-x_0)+(x_2-x_1)+\cdots+(x_n-x_{n-1})=x_n-x_0=1.
\end{align*}
Thus every partition satisfies
\begin{align*}
U(P,f)-L(P,f)=1-0=1.
\end{align*}
Since this gap never becomes smaller than $1$, it cannot be made less than any $\varepsilon$ with $0<\varepsilon<1$. The obstruction is not unboundedness, because $0 \le f \le 1$; it is that the oscillation between rational and irrational points persists on every subinterval.
[/example]
This example is the right warning at the start. The issue is not the size of the function: $f$ is bounded by $1$. The issue is persistent oscillation. Riemann integration asks whether refining a partition can make the total uncertainty between upper and lower rectangles as small as desired.
## Definition
The page is about one central question: when do finite rectangle estimates determine a unique area? We state the primary concept first, using the Darboux gap as the defining test. The supporting objects that make the notation precise are unpacked immediately afterward.
[definition: Riemann Integrable Function]
Let $a,b \in \mathbb{R}$ with $a < b$, and let $f: [a,b] \to \mathbb{R}$ be bounded. The function $f$ is Riemann integrable on $[a,b]$ if for every $\varepsilon > 0$ there exists a partition $P$ of $[a,b]$ such that
\begin{align*}
U(P,f)-L(P,f) < \varepsilon,
\end{align*}
where $U(P,f)$ and $L(P,f)$ are the upper and lower sums of $f$ with respect to $P$.
[/definition]
This definition is deliberately narrow: bounded function, compact interval, finite partitions. Its strength is that it turns a geometric idea into a precise finite-approximation test. Its limitation is that it does not cover many functions that modern measure theory can integrate.
### Partitions and Mesh
The definition refers to partitions, so we now make the finite observation scheme precise. A partition records the finitely many vertical cuts where the interval is inspected. The more refined the partition, the more local information the upper and lower rectangles can use.
[definition: Partition of a Compact Interval]
Let $a,b \in \mathbb{R}$ with $a < b$. A partition of $[a,b]$ is a finite ordered tuple
\begin{align*}
P = (x_0,x_1,\ldots,x_n)
\end{align*}
such that
\begin{align*}
a = x_0 < x_1 < \cdots < x_n = b.
\end{align*}
The subintervals of $P$ are $[x_{i-1},x_i]$ for $i \in \{1,\ldots,n\}$.
[/definition]
A partition by itself only names intervals. To compare coarse and fine observations, we need a number measuring the largest unresolved interval left by the partition; that number controls the worst local oscillation that a rectangle may hide.
[definition: Mesh of a Partition]
Let $a,b \in \mathbb{R}$ with $a < b$, and let $\mathcal{P}([a,b])$ be the set of partitions of $[a,b]$. The mesh is the map
\begin{align*}
|\cdot|: \mathcal{P}([a,b]) &\to \mathbb{R}.
\end{align*}
For $P=(x_0,x_1,\ldots,x_n) \in \mathcal{P}([a,b])$, define
\begin{align*}
|P| = \max_{1 \le i \le n}(x_i-x_{i-1}).
\end{align*}
[/definition]
The mesh is useful when comparing Riemann sums along sequences of partitions. The Darboux definition below uses all partitions at once, but the mesh formulation later explains why ordinary rectangle approximations converge to the same value. To define those Darboux estimates, we now need the best lower and upper rectangle heights on each interval.
### Upper and Lower Estimates
A bounded function has a highest and lowest visible value on each subinterval after replacing maximum and minimum by [supremum and infimum](/page/Supremum%20and%20Infimum). These are the rectangle heights that give the best possible upper and lower estimates relative to a chosen partition.
[definition: Upper and Lower Sums]
Let $a,b \in \mathbb{R}$ with $a < b$. Let $\mathcal{B}([a,b])$ be the set of bounded functions $f: [a,b] \to \mathbb{R}$, and let $\mathcal{P}([a,b])$ be the set of partitions of $[a,b]$. The upper-sum functional and lower-sum functional are maps
\begin{align*}
U,L: \mathcal{P}([a,b]) \times \mathcal{B}([a,b]) &\to \mathbb{R}.
\end{align*}
For $f \in \mathcal{B}([a,b])$ and $P=(x_0,x_1,\ldots,x_n) \in \mathcal{P}([a,b])$, define $U(P,f)$ and $L(P,f)$ as follows. For each $i \in \{1,\ldots,n\}$, set
\begin{align*}
M_i(f,P) = \sup\{f(x):x \in [x_{i-1},x_i]\}.
\end{align*}
Set
\begin{align*}
m_i(f,P) = \inf\{f(x):x \in [x_{i-1},x_i]\}.
\end{align*}
The upper sum of $f$ with respect to $P$ is
\begin{align*}
U(P,f) = \sum_{i=1}^n M_i(f,P)(x_i-x_{i-1}).
\end{align*}
The lower sum of $f$ with respect to $P$ is
\begin{align*}
L(P,f) = \sum_{i=1}^n m_i(f,P)(x_i-x_{i-1}).
\end{align*}
[/definition]
The upper sum is the cost of covering the graph from above using rectangles adapted to $P$; the lower sum is the guaranteed area captured from below. The integral should exist exactly when the gap between what is forced and what is possible can be squeezed away, so we take the best upper and lower estimates over all finite partitions.
[definition: Upper and Lower Riemann Integrals]
Let $a,b \in \mathbb{R}$ with $a < b$, and let $\mathcal{B}([a,b])$ be the set of bounded functions $f: [a,b] \to \mathbb{R}$. The upper Riemann integral and lower Riemann integral are functionals
\begin{align*}
\overline{I}_{[a,b]},\underline{I}_{[a,b]}: \mathcal{B}([a,b]) &\to \mathbb{R}.
\end{align*}
For $f \in \mathcal{B}([a,b])$, the upper Riemann integral of $f$ over $[a,b]$ is
\begin{align*}
\overline{I}_{[a,b]}(f) = \inf\{U(P,f):P \text{ is a partition of } [a,b]\}.
\end{align*}
The lower Riemann integral of $f$ over $[a,b]$ is
\begin{align*}
\underline{I}_{[a,b]}(f) = \sup\{L(P,f):P \text{ is a partition of } [a,b]\}.
\end{align*}
[/definition]
There is always an inequality $\underline{I}_{[a,b]}(f) \le \overline{I}_{[a,b]}(f)$, because every lower sum lies below every upper sum after passing to a common refinement. The theory becomes interesting when this inequality collapses to equality: then all sufficiently fine rectangular estimates are being forced toward one number rather than toward an interval of possible values.
### The Common Value
The upper and lower integrals package all possible finite rectangular estimates into two numbers. If these numbers differ, the unresolved area between them is not a defect of a particular partition; it is a permanent ambiguity in the rectangle method. When the Darboux gap can be made arbitrarily small, that ambiguity disappears, and the upper and lower integrals have the same value. For a Riemann integrable function $f: [a,b] \to \mathbb{R}$, this common value
\begin{align*}
\overline{I}_{[a,b]}(f) = \underline{I}_{[a,b]}(f)
\end{align*}
is denoted by
\begin{align*}
\int_a^b f(x)\,dx.
\end{align*}
The notation records the number forced by all Darboux estimates, not the choice of any single partition.
## Darboux Squeezing
### Refinement and the Darboux Gap
Some sources use Darboux-sum notation rather than the partition notation established above. In this section, if a quoted theorem writes $S(f,\mathcal{D})$ and $s(f,\mathcal{D})$, these mean the upper and lower sums over the partition $\mathcal{D}$ respectively: $S(f,\mathcal{D})=U(\mathcal{D},f)$ and $s(f,\mathcal{D})=L(\mathcal{D},f)$.
The definition uses finite partitions, while the upper and lower integrals use global infimum and supremum operations over all partitions. The Darboux criterion above is the working engine of the subject because it lets us move between these viewpoints: equality of the global bounds is witnessed by partitions whose upper-lower gap is as small as desired. To use that engine, we need to know why adding more cut points improves the estimates rather than destabilizing them.
[definition: Refinement of a Partition]
Let $a,b \in \mathbb{R}$ with $a < b$, and let $P$ and $Q$ be partitions of $[a,b]$. The partition $Q$ refines $P$ if every point of $P$ is also a point of $Q$.
[/definition]
Refinement is the formal version of looking more closely. It does not change the function; it only reduces the size of the intervals on which we are forced to use a single upper or lower height. The next result records the order structure that makes refinement useful.
[quotetheorem:192]
This monotonicity explains why upper and lower integrals are not arbitrary definitions. As partitions become finer, lower sums climb upward and upper sums descend downward, leaving the integral as the only possible meeting point when they meet.
[example: Integrating a Monotone Function]
Let $f: [a,b] \to \mathbb{R}$ be increasing and bounded, and let $P_n=(x_0,\ldots,x_n)$ be the uniform partition with $x_i=a+i(b-a)/n$. For each $i$, if $x \in [x_{i-1},x_i]$, then increasingness gives $f(x_{i-1}) \le f(x) \le f(x_i)$. Hence
\begin{align*}
m_i(f,P_n)=f(x_{i-1})
\end{align*}
and
\begin{align*}
M_i(f,P_n)=f(x_i).
\end{align*}
Therefore
\begin{align*}
L(P_n,f)=\sum_{i=1}^n f(x_{i-1})(x_i-x_{i-1})
\end{align*}
and
\begin{align*}
U(P_n,f)=\sum_{i=1}^n f(x_i)(x_i-x_{i-1}).
\end{align*}
Subtracting the two sums term by term gives
\begin{align*}
U(P_n,f)-L(P_n,f)=\sum_{i=1}^n (f(x_i)-f(x_{i-1}))(x_i-x_{i-1}).
\end{align*}
Since $x_i-x_{i-1}=(b-a)/n$ for every $i$, we get
\begin{align*}
U(P_n,f)-L(P_n,f)=\frac{b-a}{n}\sum_{i=1}^n (f(x_i)-f(x_{i-1})).
\end{align*}
The sum in parentheses telescopes:
\begin{align*}
\sum_{i=1}^n (f(x_i)-f(x_{i-1}))=(f(x_1)-f(x_0))+\cdots+(f(x_n)-f(x_{n-1}))=f(x_n)-f(x_0).
\end{align*}
Because $x_0=a$ and $x_n=b$, this becomes
\begin{align*}
U(P_n,f)-L(P_n,f)=\frac{b-a}{n}(f(b)-f(a)).
\end{align*}
Given $\varepsilon>0$, choose $n$ so large that $\frac{b-a}{n}(f(b)-f(a))<\varepsilon$; if $f(b)=f(a)$, any $n$ works. Thus the Darboux gap can be made arbitrarily small, so every bounded increasing function on $[a,b]$ is Riemann integrable.
[/example]
This example is important because monotone functions can have jumps. Riemann integration does not require continuity everywhere; it requires the contribution of oscillation to become negligible after partitioning. The same principle should also explain why ordinary sampled rectangle sums converge once the Darboux gap is under control.
### Tagged Sums
A tagged sum chooses not only a partition but also one sample point in each subinterval. If the page writes an expression such as $\int f\,d\mathcal{L}^1$, then $\mathcal{L}^1$ denotes one-dimensional [Lebesgue measure](/page/Lebesgue%20Measure); this is [Lebesgue integral](/page/Lebesgue%20Integral) notation. In this Riemann discussion it is used only as a compatible way to name ordinary length on intervals, so $\int_a^b f(x)\,dx$ remains the primary notation. A set $E \subseteq [a,b]$ has Lebesgue measure zero if for every $\varepsilon>0$ it can be covered by countably many open intervals whose total lengths add to less than $\varepsilon$. Informally, such a set can be surrounded by intervals with arbitrarily small total length, even if it is infinite.
The Darboux definition avoids choosing sample points, but numerical and geometric calculations usually choose one height per subinterval. Tags record this extra sampling choice while keeping the underlying partition visible.
[definition: Tagged Partition]
Let $P=(x_0,x_1,\ldots,x_n)$ be a partition of $[a,b]$. A tagged partition is a pair $(P,t)$ where $t=(t_1,\ldots,t_n)$ and
\begin{align*}
t_i \in [x_{i-1},x_i]
\end{align*}
for each $i \in \{1,\ldots,n\}$.
[/definition]
Tags let the rectangle height come from an actual sampled value rather than from a supremum or infimum. Once tags are chosen, the finite approximation itself needs a name so that we can compare sampled sums with upper and lower Darboux sums.
[definition: Riemann Sum]
Let $a,b \in \mathbb{R}$ with $a < b$. Let $\mathcal{B}([a,b])$ be the set of bounded functions $f: [a,b] \to \mathbb{R}$, and let $\mathcal{T}([a,b])$ be the set of tagged partitions of $[a,b]$. The Riemann-sum functional is the map
\begin{align*}
S: \mathcal{T}([a,b]) \times \mathcal{B}([a,b]) &\to \mathbb{R}.
\end{align*}
For $f \in \mathcal{B}([a,b])$ and a tagged partition $(P,t) \in \mathcal{T}([a,b])$ with $P=(x_0,x_1,\ldots,x_n)$, define
\begin{align*}
S(P,t;f) = \sum_{i=1}^n f(t_i)(x_i-x_{i-1}).
\end{align*}
[/definition]
A Riemann sum lies between the lower and upper sums for the same partition. The remaining issue is whether arbitrary tag choices can still produce different limiting values as the partition is refined. The Darboux gap rules this out: once upper and lower sums are forced close together, every tagged rectangle sum is trapped in the same narrow interval.
[quotetheorem:9239]
This theorem is why the Riemann integral feels canonical. It says that once integrability is known, the integral is not an artifact of a special sampling scheme.
## Continuity and Discontinuity
### Continuous and Piecewise Continuous Functions
The first large class of Riemann integrable functions comes from continuity. A [continuous function](/page/Continuous%20Function) on a compact interval cannot oscillate too much on sufficiently short intervals, and compactness lets one control the whole interval at once.
[quotetheorem:282]
This result explains why the Riemann integral works so well in first calculus courses, but it would be too restrictive to stop at continuous functions. Applications often contain switching laws, step inputs, and formulas that change at finitely many thresholds, so we need a definition that allows controlled breaks while keeping oscillation localized.
[definition: Piecewise Continuous Function]
Let $a,b \in \mathbb{R}$ with $a < b$. A bounded function $f: [a,b] \to \mathbb{R}$ is piecewise continuous on $[a,b]$ if there exists a partition $P=(x_0,x_1,\ldots,x_n)$ such that for each $i \in \{1,\ldots,n\}$, the restriction of $f$ to $(x_{i-1},x_i)$ is continuous and has finite one-sided limits at the endpoints.
[/definition]
This definition captures functions whose bad behaviour is confined to finitely many cut points, which can be covered by intervals of arbitrarily small total length. The natural theorem to prove next is that such finite localization of discontinuity is enough for the Darboux gap to shrink.
[quotetheorem:9240]
The theorem shows that isolated discontinuities are harmless. The next example shows how the Darboux criterion handles a single jump by isolating it inside a short interval.
[example: A Jump Discontinuity]
Let $f: [-1,1] \to \mathbb{R}$ be given by $f(x)=0$ for $-1 \le x < 0$ and $f(x)=1$ for $0 \le x \le 1$. Fix $0<\eta<1$, and use the partition
\begin{align*}
P_\eta=(-1,-\eta,0,\eta,1).
\end{align*}
On $[-1,-\eta]$ and $[-\eta,0]$, the infimum is $0$, because each interval contains points $x<0$. On $[0,\eta]$ and $[\eta,1]$, the infimum is $1$, because every point in those intervals is nonnegative. Thus
\begin{align*}
L(P_\eta,f)=0\cdot(1-\eta)+0\cdot\eta+1\cdot\eta+1\cdot(1-\eta).
\end{align*}
Combining the terms gives
\begin{align*}
L(P_\eta,f)=\eta+1-\eta=1.
\end{align*}
For the upper sum, the supremum is $0$ on $[-1,-\eta]$, since $f$ is identically $0$ there. On $[-\eta,0]$, the interval contains $0$, and $f(0)=1$, while $0 \le f \le 1$, so the supremum is $1$. On $[0,\eta]$ and $[\eta,1]$, the function is identically $1$, so the supremum is $1$. Therefore
\begin{align*}
U(P_\eta,f)=0\cdot(1-\eta)+1\cdot\eta+1\cdot\eta+1\cdot(1-\eta).
\end{align*}
Combining the terms gives
\begin{align*}
U(P_\eta,f)=\eta+\eta+1-\eta=1+\eta.
\end{align*}
Hence
\begin{align*}
U(P_\eta,f)-L(P_\eta,f)=(1+\eta)-1=\eta.
\end{align*}
Given $\varepsilon>0$, choose $0<\eta<\min\{1,\varepsilon\}$. Then $U(P_\eta,f)-L(P_\eta,f)=\eta<\varepsilon$, so the jump at $0$ can be isolated inside an interval whose contribution to the Darboux gap is arbitrarily small.
[/example]
The example also shows the geometry of removable, jump, and finite discontinuities: the bad part must be compressible into intervals of small total length. To state the general boundary between acceptable and unacceptable discontinuity, we need a pointwise measure of how much oscillation remains after every zoom-in.
### Oscillation and the Lebesgue Criterion
Persistent oscillation is the local obstruction to continuity and to Riemann integration. The oscillation at a point records how much vertical variation remains in every sufficiently small neighbourhood of that point.
[definition: Oscillation at a Point]
Let $a,b \in \mathbb{R}$ with $a < b$, and let $f: [a,b] \to \mathbb{R}$ be bounded. The oscillation of $f$ is the map
\begin{align*}
\omega_f: [a,b] &\to [0,\infty).
\end{align*}
For $x_0 \in [a,b]$, define
\begin{align*}
\omega_f(x_0) = \inf_{\delta > 0}\left(\sup\{f(x):x \in [a,b] \cap (x_0-\delta,x_0+\delta)\}-\inf\{f(x):x \in [a,b] \cap (x_0-\delta,x_0+\delta)\}\right).
\end{align*}
[/definition]
Oscillation records the amount of variation that remains no matter how closely we zoom in at a point. Continuity at $x_0$ is the case $\omega_f(x_0)=0$. The global integrability question becomes whether the points with positive oscillation occupy a set too small to affect area.
[quotetheorem:9241]
This criterion explains both the success and the limits of the Riemann integral. Countably many discontinuities can be acceptable, but a dense set of discontinuities can still be acceptable if its total measure is zero; what matters is size in the measure-theoretic sense, not visual density alone.
[example: Thomae's Function]
Let $f: [0,1] \to \mathbb{R}$ be defined by $f(x)=0$ for irrational $x$, by $f(0)=1$, and by $f(p/q)=1/q$ when $p/q \in \mathbb{Q}\cap(0,1]$ is written in lowest terms.
First we identify the discontinuities. If $r=p/q \in \mathbb{Q}\cap(0,1]$ is in lowest terms, then $f(r)=1/q$. Every interval around $r$ contains an irrational point $y$, and for such a point $f(y)=0$, so values of $f$ arbitrarily close to $r$ differ from $f(r)$ by $1/q$. Thus $f$ is discontinuous at $r$. At $0$, every interval around $0$ contains irrational points $y$ with $f(y)=0$, while $f(0)=1$, so $f$ is discontinuous at $0$.
Now let $\alpha \in [0,1]$ be irrational. Fix $\varepsilon>0$, and choose $N \in \mathbb{N}$ with $1/N<\varepsilon$. The set
\begin{align*}
A_N=\{0\}\cup\{p/q \in \mathbb{Q}\cap[0,1]: \gcd(p,q)=1 \text{ and } 1\le q<N\}
\end{align*}
is finite, because for each $q<N$ there are only finitely many integers $p$ with $0\le p\le q$. Since $\alpha$ is not in $A_N$, the positive distances $|\alpha-a|$ for $a\in A_N$ have a positive minimum; choose $\delta>0$ smaller than that minimum. If $|x-\alpha|<\delta$, then $x\notin A_N$. Hence either $x$ is irrational and $f(x)=0$, or $x=p/q$ in lowest terms with $q\ge N$ and
\begin{align*}
0<f(x)=\frac{1}{q}\le \frac{1}{N}<\varepsilon.
\end{align*}
Thus $|f(x)-f(\alpha)|=|f(x)-0|<\varepsilon$, so $f$ is continuous at every irrational point.
It remains to see why the Riemann integral is $0$. Every subinterval of $[0,1]$ contains an irrational point, so every lower rectangle height is $0$, and therefore every lower sum is $0$. For the upper sums, fix $\varepsilon>0$ and choose $N$ with $1/N<\varepsilon/2$. The finite set $A_N$ can be covered by finitely many open intervals whose total length is less than $\varepsilon/2$. Choose a partition $P$ containing all endpoints of these covering intervals that lie in $[0,1]$. On the pieces contained in the cover, the supremum of $f$ is at most $1$, so their total contribution to $U(P,f)$ is less than $\varepsilon/2$. On the remaining pieces, no rational with denominator $<N$ occurs, so the supremum is at most $1/N$, and their total length is at most $1$. Hence
\begin{align*}
U(P,f)\le 1\cdot \frac{\varepsilon}{2}+\frac{1}{N}\cdot 1<\frac{\varepsilon}{2}+\frac{\varepsilon}{2}=\varepsilon.
\end{align*}
Since the lower sums are always $0$ and the upper sums can be made smaller than every $\varepsilon>0$, the Darboux gap can be squeezed to $0$, and the Riemann integral of Thomae's function over $[0,1]$ is $0$.
[/example]
Thomae's function is a useful counterweight to the first example. Both functions have dense rational structure, but the size of the persistent discontinuity set is different.
## Algebra of Riemann Integrable Functions
A useful integral must behave well under the operations used to build functions. The standard algebraic package is collected in one place: sums, scalar multiples, products, order comparisons, and absolute values all remain inside the class of Riemann integrable functions, with the expected identities and inequalities for their integrals.
[quotetheorem:209]
Linearity makes the integral compatible with superposition. It lets us decompose complicated functions into simpler pieces and integrate the pieces separately. Monotonicity turns pointwise comparison into integral estimates, which are often more useful than exact evaluation. The absolute-value estimate is the Riemann version of the triangle inequality for integration, and it is the basic tool for controlling errors in approximation.
Products deserve separate emphasis because inner products, energies, variances, and weighted averages all require multiplying functions before integrating. Closure under products is not just another formula for evaluating an integral; it says that the ordinary algebra of functions stays compatible with the Riemann integrability condition.
[quotetheorem:9242]
These closure properties say that Riemann integrable functions form a stable class for elementary analysis on compact intervals. They do not remove the boundedness requirement in the definition, but they show that once functions are integrable, routine algebraic manipulation is legitimate.
## Step Functions and Approximation
The Riemann integral is built from rectangles, so step functions are the simplest exact models. Understanding them explains why upper and lower sums are the right quantities and why approximation by rectangular functions is the natural language of the theory.
[definition: Step Function on an Interval]
Let $a,b \in \mathbb{R}$ with $a < b$. A function $s: [a,b] \to \mathbb{R}$ is a step function if there exists a partition $P=(x_0,x_1,\ldots,x_n)$ such that $s$ is constant on each open interval $(x_{i-1},x_i)$.
[/definition]
Step functions are finite linear combinations of interval indicators, up to endpoint values, but to use them as approximating objects we need an exact area assigned to each one. Since these functions are made of finitely many rectangles, their integral should be the corresponding finite rectangle sum.
[definition: Integral of a Step Function]
Let $a,b \in \mathbb{R}$ with $a < b$, and let $\mathcal{S}([a,b])$ be the set of step functions $s: [a,b] \to \mathbb{R}$. The step-function integral is the map
\begin{align*}
\int_a^b \cdot\,dx: \mathcal{S}([a,b]) &\to \mathbb{R}.
\end{align*}
For $s \in \mathcal{S}([a,b])$, suppose $P=(x_0,x_1,\ldots,x_n)$ is a partition such that $s(x)=c_i$ for all $x \in (x_{i-1},x_i)$. The Riemann integral of $s$ is
\begin{align*}
\int_a^b s(x)\,dx = \sum_{i=1}^n c_i(x_i-x_{i-1}).
\end{align*}
[/definition]
This definition agrees with the Darboux definition for step functions and gives exact lower and upper rectangular models. The next question is whether ordinary bounded functions are integrable precisely when they can be trapped between such models with only a small excess area.
[quotetheorem:281]
This characterization turns integrability into approximation from above and below. It is a predecessor of the measure-theoretic idea of approximating [measurable functions](/page/Measurable%20Functions) by simple functions.
[example: Approximating $x^2$ by Step Functions]
Let $f: [0,1] \to \mathbb{R}$ be given by $f(x)=x^2$, and let $P_n=(0,1/n,2/n,\ldots,1)$. The function $x \mapsto x^2$ is increasing on $[0,1]$, because if $0 \le u \le v \le 1$, then
\begin{align*}
v^2-u^2=(v-u)(v+u)\ge 0.
\end{align*}
Therefore, on the subinterval $[(i-1)/n,i/n]$, the lower rectangle height is $((i-1)/n)^2$ and the upper rectangle height is $(i/n)^2$. Since each subinterval has length $1/n$,
\begin{align*}
L(P_n,f)=\sum_{i=1}^n \left(\frac{i-1}{n}\right)^2\frac{1}{n}.
\end{align*}
Equivalently,
\begin{align*}
L(P_n,f)=\frac{1}{n^3}\sum_{j=0}^{n-1}j^2.
\end{align*}
Using $\sum_{j=1}^{m}j^2=m(m+1)(2m+1)/6$ with $m=n-1$, this becomes
\begin{align*}
L(P_n,f)=\frac{(n-1)n(2n-1)}{6n^3}.
\end{align*}
Expanding the numerator gives
\begin{align*}
(n-1)n(2n-1)=n(2n^2-3n+1)=2n^3-3n^2+n.
\end{align*}
Hence
\begin{align*}
L(P_n,f)=\frac{2n^3-3n^2+n}{6n^3}=\frac{1}{3}-\frac{1}{2n}+\frac{1}{6n^2}.
\end{align*}
Similarly,
\begin{align*}
U(P_n,f)=\sum_{i=1}^n \left(\frac{i}{n}\right)^2\frac{1}{n}.
\end{align*}
Thus
\begin{align*}
U(P_n,f)=\frac{1}{n^3}\sum_{i=1}^n i^2.
\end{align*}
Using $\sum_{i=1}^{n}i^2=n(n+1)(2n+1)/6$, we get
\begin{align*}
U(P_n,f)=\frac{n(n+1)(2n+1)}{6n^3}.
\end{align*}
Expanding the numerator gives
\begin{align*}
n(n+1)(2n+1)=n(2n^2+3n+1)=2n^3+3n^2+n.
\end{align*}
Therefore
\begin{align*}
U(P_n,f)=\frac{2n^3+3n^2+n}{6n^3}=\frac{1}{3}+\frac{1}{2n}+\frac{1}{6n^2}.
\end{align*}
The Darboux gap is
\begin{align*}
U(P_n,f)-L(P_n,f)=\left(\frac{1}{3}+\frac{1}{2n}+\frac{1}{6n^2}\right)-\left(\frac{1}{3}-\frac{1}{2n}+\frac{1}{6n^2}\right)=\frac{1}{n}.
\end{align*}
Also,
\begin{align*}
\lim_{n\to\infty}L(P_n,f)=\frac{1}{3}
\end{align*}
and
\begin{align*}
\lim_{n\to\infty}U(P_n,f)=\frac{1}{3}.
\end{align*}
The lower step approximations and upper step approximations therefore squeeze to the same value, so the Riemann integral of $x^2$ over $[0,1]$ is $1/3$.
[/example]
The calculation shows the basic rhythm of Riemann integration: identify local oscillation, multiply it by interval length, and make the total contribution small.
## Improper Behaviour and Limits of the Theory
### Unbounded Intervals
The Riemann definition is intentionally tied to bounded functions on compact intervals. Many familiar integrals fall outside this definition and require an extension. On an unbounded interval, the natural extension is to integrate over larger compact intervals and then take a limit.
[definition: Improper Riemann Integral over an Unbounded Interval]
Let $f: [a,\infty) \to \mathbb{R}$ be such that $f$ is Riemann integrable on $[a,R]$ for every $R>a$. The improper Riemann integral of $f$ over $[a,\infty)$ exists if the limit
\begin{align*}
\lim_{R \to \infty}\int_a^R f(x)\,dx
\end{align*}
exists as a finite real number.
[/definition]
This is no longer the original Riemann integral on a compact interval. It is a limiting construction built from compact-interval Riemann integrals, so convergence of the limiting process is an additional requirement.
[example: An Improper Integral That Converges]
Let $f: [1,\infty) \to \mathbb{R}$ be $f(x)=x^{-2}$. For each $R>1$, the restriction of $f$ to $[1,R]$ is continuous, because $x\neq 0$ on $[1,R]$ and $x\mapsto x^{-2}$ is a quotient of continuous functions with nonzero denominator. Define $G(x)=-x^{-1}$ on $[1,R]$. Then
\begin{align*}
G'(x)=\frac{d}{dx}(-x^{-1})=-(-1)x^{-2}=x^{-2}.
\end{align*}
By the Newton-Leibniz formula on the compact interval $[1,R]$,
\begin{align*}
\int_1^R x^{-2}\,dx=G(R)-G(1).
\end{align*}
Substituting the endpoint values gives
\begin{align*}
G(R)-G(1)=-\frac{1}{R}-(-1)=1-\frac{1}{R}.
\end{align*}
Therefore
\begin{align*}
\int_1^R x^{-2}\,dx=1-\frac{1}{R}.
\end{align*}
Taking the improper limit,
\begin{align*}
\lim_{R\to\infty}\int_1^R x^{-2}\,dx=\lim_{R\to\infty}\left(1-\frac{1}{R}\right)=1-0=1.
\end{align*}
Thus the improper Riemann integral over $[1,\infty)$ converges to $1$, but this value comes from a limiting process over compact intervals, not from applying the compact-interval Riemann definition directly to the unbounded interval $[1,\infty)$.
[/example]
Unbounded domains are not the only reason an ordinary Riemann integral can fail. A function may live on a compact interval but become unbounded near an endpoint, so we need a second limiting construction that approaches the singular point from inside the interval.
### Singular Endpoints
Unboundedness creates a different kind of failure. The partition method uses finite upper and lower rectangle heights, so a function with a vertical asymptote does not fit the bounded compact-interval definition even when an improper limit exists.
[definition: Improper Riemann Integral at a Singularity]
Let $f: (a,b] \to \mathbb{R}$ be such that $f$ is Riemann integrable on $[c,b]$ for every $c \in (a,b)$. The improper Riemann integral of $f$ over $(a,b]$ exists if the limit
\begin{align*}
\lim_{c \downarrow a}\int_c^b f(x)\,dx
\end{align*}
exists as a finite real number.
[/definition]
This definition separates local boundedness away from the singular endpoint from the limiting question at the endpoint. It is useful, but it is not the same as Riemann integrability on $[a,b]$.
[example: A Function Outside the Riemann Definition]
Let $f:(0,1]\to\mathbb{R}$ be $f(x)=x^{-1/2}$. For each $c\in(0,1)$, the restriction of $f$ to $[c,1]$ is continuous because $x>0$ on $[c,1]$ and $x\mapsto x^{-1/2}$ is continuous on $(0,\infty)$. Define $G(x)=2\sqrt{x}$ on $[c,1]$. Then, for $x\in[c,1]$,
\begin{align*}
G'(x)=2\cdot \frac{1}{2\sqrt{x}}=\frac{1}{\sqrt{x}}=x^{-1/2}.
\end{align*}
By the *Newton-Leibniz formula* on the compact interval $[c,1]$,
\begin{align*}
\int_c^1 x^{-1/2}\,dx=G(1)-G(c).
\end{align*}
Substituting the endpoint values gives
\begin{align*}
G(1)-G(c)=2\sqrt{1}-2\sqrt{c}=2-2\sqrt{c}.
\end{align*}
Hence
\begin{align*}
\int_c^1 x^{-1/2}\,dx=2-2\sqrt{c}.
\end{align*}
Taking the improper limit,
\begin{align*}
\lim_{c\downarrow 0}\int_c^1 x^{-1/2}\,dx=\lim_{c\downarrow 0}(2-2\sqrt{c})=2-0=2.
\end{align*}
This does not make $f$ Riemann integrable on $[0,1]$. The compact-interval Riemann definition applies only to bounded functions on the whole interval $[0,1]$, while $f$ is not even defined at $0$ and is unbounded near $0$. Indeed, for any $M>0$, choose $x\in(0,1]$ with $x<1/M^2$; then $\sqrt{x}<1/M$, so
\begin{align*}
f(x)=\frac{1}{\sqrt{x}}>M.
\end{align*}
Thus the value $2$ comes from an improper limiting process, not from ordinary Riemann integrability on the compact interval $[0,1]$.
[/example]
These examples clarify a common ambiguity. When someone writes an integral sign, the underlying theory matters. Riemann integrability is a precise compact-interval condition, not a synonym for every convergent limiting integral.
## Fundamental Theorem Connections
Riemann integration was designed to interact with differentiation. For a function $f$ on $[a,b]$, an accumulated-area function has the form
\begin{align*}
A(x)=\int_a^x f(t)\,dt.
\end{align*}
Here the integral is the Riemann integral just developed; when other notation such as $d\mathcal{L}^1$ appears, $\mathcal{L}^1$ denotes one-dimensional Lebesgue measure, so $\int f\,d\mathcal{L}^1$ is Lebesgue integral notation rather than the defining Riemann notation. On functions that are Riemann integrable, the two notations agree in the standard situations considered here, but this page keeps the Riemann interpretation in view.
The fundamental theorem explains when accumulated area differentiates back to the original integrand and when an antiderivative evaluates an integral by endpoint subtraction.
[quotetheorem:632]
For continuous functions, the accumulated-area construction recovers the integrand by differentiation. In the reverse direction, the endpoint formula requires more than the existence of a formal derivative: the derivative being integrated must be Riemann integrable. That hypothesis is not cosmetic, because derivatives can be discontinuous in complicated ways, and the Riemann integral only accepts them when their discontinuities are small enough in the Riemann sense.
[example: Recovering Area from an Antiderivative]
Let $F:[0,1]\to\mathbb{R}$ be given by $F(x)=x^3$. For $x\in(0,1)$ and $h\neq 0$ with $x+h\in[0,1]$,
\begin{align*}
\frac{F(x+h)-F(x)}{h}=\frac{(x+h)^3-x^3}{h}.
\end{align*}
Expanding $(x+h)^3$ gives
\begin{align*}
(x+h)^3=x^3+3x^2h+3xh^2+h^3.
\end{align*}
Therefore
\begin{align*}
\frac{(x+h)^3-x^3}{h}=\frac{3x^2h+3xh^2+h^3}{h}=3x^2+3xh+h^2.
\end{align*}
Taking $h\to 0$ gives
\begin{align*}
F'(x)=3x^2.
\end{align*}
The derivative $F'(x)=3x^2$ is continuous on $[0,1]$, so the hypotheses of the *Newton-Leibniz formula* apply. Hence
\begin{align*}
\int_0^1 3x^2\,dx=F(1)-F(0).
\end{align*}
The endpoint values are
\begin{align*}
F(1)=1^3=1.
\end{align*}
Also,
\begin{align*}
F(0)=0^3=0.
\end{align*}
Substituting these values gives
\begin{align*}
\int_0^1 3x^2\,dx=1-0=1.
\end{align*}
This matches the step-function computation for $x^2$: multiplying every rectangle height by $3$ changes the common limiting value from $1/3$ to $3\cdot(1/3)=1$.
[/example]
The fundamental theorem also shows why Riemann integration remains central even after measure theory. For continuous integrands on compact intervals, the Riemann integral gives exactly the calculus integral and connects directly to differentiation.
## Beyond and Connected Topics
Riemann integrability is the natural compact-interval entry point into integration, but it is not the end of the story. The first next direction is Lebesgue integration, a broader form of integrability where the partitioning is done by values and measurable sets rather than by subintervals of the domain. This extension integrates many limits of Riemann integrable functions that are not themselves Riemann integrable in the compact-interval sense.
A second direction is [uniform convergence](/page/Uniform%20Convergence) and interchange of limits. Riemann integration behaves well under uniform limits: a uniform limit of Riemann integrable functions is Riemann integrable, and the integrals converge. This belongs naturally with [Cambridge II Analysis of Functions](/page/Cambridge%20II%20Analysis%20of%20Functions), where functions are studied as elements of function spaces rather than isolated formulas.
A third direction is complex integration. On contours in the plane, the integral is built from limits of sums along curves, and the Riemann integral of real and imaginary parts is part of the foundation. This connects to [Cambridge IB Complex Analysis](/page/Cambridge%20IB%20Complex%20Analysis), where contour integrals become the main object.
A fourth direction is topology and compactness. The theorem that continuous functions on compact intervals are Riemann integrable depends on [uniform continuity](/page/Uniform%20Continuity), which is a compactness phenomenon. The surrounding ideas appear in [Cambridge IB Analysis and Topology](/page/Cambridge%20IB%20Analysis%20and%20Topology).
Finally, the Riemann integral is the calculus-level model for later integrals in analysis. It teaches the central habit of controlling error by approximation, and that habit survives in Lebesgue integration, Sobolev spaces, distribution theory, numerical quadrature, and functional analysis.
## References
Androma, [Cambridge IA Analysis Notes](/page/Cambridge%20IA%20Analysis%20Notes).
Androma, [Cambridge IB Analysis and Topology](/page/Cambridge%20IB%20Analysis%20and%20Topology).
Androma, [Cambridge IB Complex Analysis](/page/Cambridge%20IB%20Complex%20Analysis).
Androma, [Cambridge II Analysis of Functions](/page/Cambridge%20II%20Analysis%20of%20Functions).
Tom M. Apostol, *Mathematical Analysis* (1974).
Walter Rudin, *Principles of Mathematical Analysis* (1976).
Michael Spivak, *Calculus* (2008).
Riemann Integrability
Also known as: Riemann criterion, Darboux integrability, Riemann integrable functions