Hubbry Logo
Riemann sumRiemann sumMain
Open search
Riemann sum
Community hub
Riemann sum
logo
8 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Riemann sum
Riemann sum
from Wikipedia
Four of the methods for approximating the area under curves. Left and right methods make the approximation using the right and left endpoints of each subinterval, respectively. Upper and lower methods make the approximation using the largest and smallest endpoint values of each subinterval, respectively. The values of the sums converge as the subintervals halve from top-left to bottom-right.

In mathematics, a Riemann sum is a certain kind of approximation of an integral by a finite sum. It is named after nineteenth century German mathematician Bernhard Riemann. One very common application is in numerical integration, i.e., approximating the area of functions or lines on a graph, where it is also known as the rectangle rule. It can also be applied for approximating the length of curves and other approximations.

The sum is calculated by partitioning the region into shapes (rectangles, trapezoids, parabolas, or cubics—sometimes infinitesimally small) that together form a region that is similar to the region being measured, then calculating the area for each of these shapes, and finally adding all of these small areas together. This approach can be used to find a numerical approximation for a definite integral even if the fundamental theorem of calculus does not make it easy to find a closed-form solution.

Because the region by the small shapes is usually not exactly the same shape as the region being measured, the Riemann sum will differ from the area being measured. This error can be reduced by dividing up the region more finely, using smaller and smaller shapes. As the shapes get smaller and smaller, the sum approaches the Riemann integral.

Definition

[edit]

Let be a function defined on a closed interval of the real numbers, , and as a partition of , that is A Riemann sum of over with partition is defined as where and .[1] One might produce different Riemann sums depending on which 's are chosen. In the end this will not matter, if the function is Riemann integrable, when the difference or width of the summands approaches zero.

Types of Riemann sums

[edit]

Specific choices of give different types of Riemann sums:

  • If for all i, the method is the left rule[2][3] and gives a left Riemann sum.
  • If for all i, the method is the right rule[2][3] and gives a right Riemann sum.
  • If for all i, the method is the midpoint rule[2][3] and gives a middle Riemann sum.
  • If (that is, the supremum of over ), the method is the upper rule and gives an upper Riemann sum or upper Darboux sum.
  • If (that is, the infimum of f over ), the method is the lower rule and gives a lower Riemann sum or lower Darboux sum.

All these Riemann summation methods are among the most basic ways to accomplish numerical integration. Loosely speaking, a function is Riemann integrable if all Riemann sums converge as the partition "gets finer and finer".

While not derived as a Riemann sum, taking the average of the left and right Riemann sums is the trapezoidal rule and gives a trapezoidal sum. It is one of the simplest of a very general way of approximating integrals using weighted averages. This is followed in complexity by Simpson's rule and Newton–Cotes formulas.

Any Riemann sum on a given partition (that is, for any choice of between and ) is contained between the lower and upper Darboux sums. This forms the basis of the Darboux integral, which is ultimately equivalent to the Riemann integral.

Riemann summation methods

[edit]

The four Riemann summation methods are usually best approached with subintervals of equal size. The interval [a, b] is therefore divided into subintervals, each of length

The points in the partition will then be

Left rule

[edit]
Left Riemann sum of xx3 over [0, 2] using 4 subintervals

For the left rule, the function is approximated by its values at the left endpoints of the subintervals. This gives multiple rectangles with base Δx and height f(a + iΔx). Doing this for i = 0, 1, ..., n − 1, and summing the resulting areas gives

The left Riemann sum amounts to an overestimation if f is monotonically decreasing on this interval, and an underestimation if it is monotonically increasing. The error of this formula will be where is the maximum value of the absolute value of over the interval.

Right rule

[edit]
Right Riemann sum of xx3 over [0, 2] using 4 subintervals

For the right rule, the function is approximated by its values at the right endpoints of the subintervals. This gives multiple rectangles with base Δx and height f(a + iΔx). Doing this for i = 1, ..., n, and summing the resulting areas gives

The right Riemann sum amounts to an underestimation if f is monotonically decreasing, and an overestimation if it is monotonically increasing. The error of this formula will be where is the maximum value of the absolute value of over the interval.

Midpoint rule

[edit]
Middle Riemann sum of xx3 over [0, 2] using 4 subintervals

For the midpoint rule, the function is approximated by its values at the midpoints of the subintervals. This gives f(a + Δx/2) for the first subinterval, f(a + 3Δx/2) for the next one, and so on until f(b − Δx/2). Summing the resulting areas gives

The error of this formula will be where is the maximum value of the absolute value of over the interval. This error is half of that of the trapezoidal sum; as such the middle Riemann sum is the most accurate approach to the Riemann sum.

Generalized midpoint rule

[edit]

A generalized midpoint rule formula, also known as the enhanced midpoint integration, is given by where is the number of intervals denotes even derivative.

For a function defined over interval , its integral is Therefore, we can apply this generalized midpoint integration formula by assuming that . This formula is particularly efficient for the numerical integration when the integrand is a highly oscillating function.

Trapezoidal rule

[edit]
Trapezoidal sum of xx3 over [0, 2] using 4 subintervals

For the trapezoidal rule, the function is approximated by the average of its values at the left and right endpoints of the subintervals. Using the area formula for a trapezium with parallel sides b1 and b2, and height h, and summing the resulting areas gives

The error of this formula will be where is the maximum value of the absolute value of .

The approximation obtained with the trapezoidal sum for a function is the same as the average of the left hand and right hand sums of that function.

Connection with integration

[edit]

For a one-dimensional Riemann sum over domain , as the maximum size of a subinterval shrinks to zero (that is the limit of the norm of the subintervals goes to zero), some functions will have all Riemann sums converge to the same value. This limiting value, if it exists, is defined as the definite Riemann integral of the function over the domain,

For a finite-sized domain, if the maximum size of a subinterval shrinks to zero, this implies the number of subinterval goes to infinity. For finite partitions, Riemann sums are always approximations to the limiting value and this approximation gets better as the partition gets finer. The following animations help demonstrate how increasing the number of subintervals (while lowering the maximum subinterval size) better approximates the "area" under the curve:

Since the red function here is assumed to be a smooth function, all three Riemann sums will converge to the same value as the number of subintervals goes to infinity.

Example

[edit]
Comparison of the right Riemann sum with the integral of xx2 over .
A visual representation of the area under the curve y = x2 over [0, 2]. Using antiderivatives this area is exactly .
Approximating the area under the curve y = x2 over [0, 2] using the right Riemann sum. Notice that because the function is monotonically increasing, the right Riemann sum will always overestimate the area contributed by each term in the sum (and do so maximally).
The value of the right Riemann sum of xx2 over . As the number of rectangles increases, it approaches the exact area of .

Taking an example, the area under the curve y = x2 over [0, 2] can be procedurally computed using Riemann's method.

The interval [0, 2] is firstly divided into n subintervals, each of which is given a width of ; these are the widths of the Riemann rectangles (hereafter "boxes"). Because the right Riemann sum is to be used, the sequence of x coordinates for the boxes will be . Therefore, the sequence of the heights of the boxes will be . It is an important fact that , and .

The area of each box will be and therefore the nth right Riemann sum will be:

If the limit is viewed as n → ∞, it can be concluded that the approximation approaches the actual value of the area under the curve as the number of boxes increases. Hence:

This method agrees with the definite integral as calculated in more mechanical ways:

Because the function is continuous and monotonically increasing over the interval, a right Riemann sum overestimates the integral by the largest amount (while a left Riemann sum would underestimate the integral by the largest amount). This fact, which is intuitively clear from the diagrams, shows how the nature of the function determines how accurate the integral is estimated. While simple, right and left Riemann sums are often less accurate than more advanced techniques of estimating an integral such as the Trapezoidal rule or Simpson's rule.

The example function has an easy-to-find anti-derivative so estimating the integral by Riemann sums is mostly an academic exercise; however it must be remembered that not all functions have anti-derivatives so estimating their integrals by summation is practically important.


Higher dimensions

[edit]

The basic idea behind a Riemann sum is to "break-up" the domain via a partition into pieces, multiply the "size" of each piece by some value the function takes on that piece, and sum all these products. This can be generalized to allow Riemann sums for functions over domains of more than one dimension.

While intuitively, the process of partitioning the domain is easy to grasp, the technical details of how the domain may be partitioned get much more complicated than the one dimensional case and involves aspects of the geometrical shape of the domain.[4]

Two dimensions

[edit]

In two dimensions, the domain may be divided into a number of two-dimensional cells such that . Each cell then can be interpreted as having an "area" denoted by .[5] The two-dimensional Riemann sum is where .

Three dimensions

[edit]

In three dimensions, the domain is partitioned into a number of three-dimensional cells such that . Each cell then can be interpreted as having a "volume" denoted by . The three-dimensional Riemann sum is[6] where .

Arbitrary number of dimensions

[edit]

Higher dimensional Riemann sums follow a similar pattern. An n-dimensional Riemann sum is where , that is, it is a point in the n-dimensional cell with n-dimensional volume .

Generalization

[edit]

In high generality, Riemann sums can be written where stands for any arbitrary point contained in the set and is a measure on the underlying set. Roughly speaking, a measure is a function that gives a "size" of a set, in this case the size of the set ; in one dimension this can often be interpreted as a length, in two dimensions as an area, in three dimensions as a volume, and so on.

See also

[edit]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
A Riemann sum is a finite sum that approximates the value of a definite by partitioning an interval [a,b][a, b] into nn subintervals, each of width Δxi\Delta x_i, selecting a sample point xix_i^* in the ii-th subinterval, and computing i=1nf(xi)Δxi\sum_{i=1}^n f(x_i^*) \Delta x_i, where ff is the function being integrated. This approach represents the area under the curve y=f(x)y = f(x) as the total area of nn rectangles, providing an estimate that improves as nn increases and the partition becomes finer. Named after the German mathematician (1826–1866), the concept was formalized in his 1854 paper, where he provided a rigorous definition of the definite as the limit of such sums for functions on a closed interval, extending the earlier work of . Riemann's work built on earlier ideas from pioneers like , , and , who used similar summation methods intuitively, but Riemann's ε-δ limit-based approach established integrability conditions, allowing integration of continuous functions and certain discontinuous ones. This , known as the , remains a cornerstone of undergraduate and . Riemann sums can be constructed in various ways depending on the choice of sample points, leading to different approximations: left Riemann sums use the left endpoint of each subinterval (xi=xi1x_i^* = x_{i-1}), right Riemann sums use the right endpoint (xi=xix_i^* = x_i), and midpoint Riemann sums use the (xi=xi1+xi2x_i^* = \frac{x_{i-1} + x_i}{2}). For monotonically increasing or decreasing functions, left and right sums provide under- or overestimates, while midpoint sums often yield more accurate results for smoother functions. In the limit as the maximum subinterval width approaches zero, these sums converge to the same value—the definite abf(x)dx\int_a^b f(x) \, dx—provided ff is Riemann integrable, a property that holds for all continuous functions on [a,b][a, b]. Beyond approximation, Riemann sums form the basis for techniques in and illustrate fundamental theorems like the , linking differentiation and integration. They also extend to higher dimensions for multiple integrals and appear in for expected values, underscoring their versatility in applied fields such as physics and .

Fundamentals

Definition

In mathematics, a Riemann sum provides a finite approximation to the definite of a function over an interval by discretizing the domain into subintervals and evaluating the function at selected points within each. For a function ff continuous on the closed interval [a,b][a, b], consider a partition P={x0=a,x1,,xn=b}P = \{x_0 = a, x_1, \dots, x_n = b\} of [a,b][a, b] into nn subintervals [xi1,xi][x_{i-1}, x_i] for i=1,,ni = 1, \dots, n, where each subinterval has length Δxi=xixi1\Delta x_i = x_i - x_{i-1}. The Riemann sum associated with this partition and a choice of points ti[xi1,xi]t_i^* \in [x_{i-1}, x_i] (known as tag points) is defined as i=1nf(ti)Δxi.\sum_{i=1}^n f(t_i^*) \Delta x_i. This summation computes the total of products of function values at the tag points and corresponding subinterval widths, yielding an estimate of the net signed area under the curve of ff. Geometrically, the Riemann sum corresponds to the combined area of nn rectangles, each with base Δxi\Delta x_i and height f(ti)f(t_i^*), positioned beneath (or above, depending on the sign of ff) the graph of ff over [a,b][a, b]. These rectangles approximate the bounded by the , the x-axis, and the vertical lines at aa and bb, with the accuracy improving as the subintervals become narrower. Although continuity of ff ensures well-behaved approximations in introductory contexts, the formal definition of a Riemann sum applies more broadly to any on the closed interval [a,b][a, b], where boundedness guarantees that f(x)M|f(x)| \leq M for some M>0M > 0 and all x[a,b]x \in [a, b], preventing the sum from diverging.

Partitions and Tags

A partition PP of a closed interval [a,b][a, b] is a finite ordered set of points a=x0<x1<<xn=ba = x_0 < x_1 < \cdots < x_n = b, where nn is a positive integer, dividing the interval into nn subintervals [xi1,xi][x_{i-1}, x_i] for i=1,,ni = 1, \dots, n. The length of each subinterval is denoted Δxi=xixi1\Delta x_i = x_i - x_{i-1}, which may vary across the partition. The norm of the partition, denoted P\|P\|, is defined as the maximum length among these subintervals: P=max1inΔxi\|P\| = \max_{1 \leq i \leq n} \Delta x_i. This measure quantifies the coarseness of the partition, with smaller norms indicating finer divisions of the interval. To form a , each subinterval [xi1,xi][x_{i-1}, x_i] is associated with a tag point ti[xi1,xi]t_i^* \in [x_{i-1}, x_i], which can be chosen arbitrarily within the subinterval; the collection of these points is called a tagging of the partition. This flexibility allows the evaluation of the function ff at any point in each subinterval, enabling various approximation strategies. Partitions can be regular (or uniform), where all subinterval lengths are equal, Δxi=(ba)/n\Delta x_i = (b - a)/n for all ii, or irregular, where the Δxi\Delta x_i differ, accommodating non-uniform sampling of the interval. Uniform partitions simplify computations, particularly in introductory examples, while irregular ones provide greater adaptability for complex functions. Refinement of a partition involves adding additional points to an existing partition PP, creating a new partition QQ that includes all points of PP plus the new ones, which necessarily reduces the norm QP\|Q\| \leq \|P\|. This process allows for increasingly precise approximations by systematically decreasing the maximum subinterval length.

Approximation Rules

Left Riemann Sum

The left Riemann sum is a specific type of Riemann sum where the sample point, or tag, tit_i^*, in each subinterval [xi1,xi][x_{i-1}, x_i] of a partition of [a,b][a, b] is chosen as the left endpoint xi1x_{i-1}. This choice aligns the approximation with the function value at the start of each subinterval. For a uniform partition where the interval [a,b][a, b] is divided into nn equal subintervals of width Δx=ban\Delta x = \frac{b - a}{n}, the left Riemann sum is given by the formula i=1nf(xi1)Δx,\sum_{i=1}^n f(x_{i-1}) \Delta x, where xi=a+iΔxx_i = a + i \Delta x. This sum represents the total area of nn rectangles, each with base Δx\Delta x and height f(xi1)f(x_{i-1}). Geometrically, the left Riemann sum constructs rectangles that touch the curve at their left edges, providing a stepwise approximation to the area under f(x)f(x) from aa to bb. If ff is monotonically increasing on [a,b][a, b], this method underestimates the integral because the left endpoints yield smaller heights than the curve's average over each subinterval; conversely, for a monotonically decreasing ff, it overestimates the integral. The left Riemann sum offers computational simplicity, resembling a forward difference scheme in numerical analysis, which facilitates easy implementation in basic algorithms for integral approximation.

Right Riemann Sum

In the right Riemann sum, the tag point tit_i^* for each subinterval [xi1,xi][x_{i-1}, x_i] is chosen as the right endpoint xix_i. For a uniform partition of the interval [a,b][a, b] into nn subintervals, each of width Δx=ban\Delta x = \frac{b - a}{n}, the right Riemann sum is given by i=1nf(xi)Δx,\sum_{i=1}^n f(x_i) \Delta x, where xi=a+iΔxx_i = a + i \Delta x. Geometrically, this approximation constructs rectangles with bases Δx\Delta x and heights f(xi)f(x_i), aligned such that each rectangle touches the curve at its right edge; for an increasing function ff, this typically overestimates the area under the curve, while for a decreasing function, it underestimates it. The right Riemann sum relates to backward difference methods in numerical analysis, where the endpoint evaluation mirrors the structure of backward approximations for integrals in solving differential equations. As the number of subintervals nn approaches infinity, the right Riemann sum converges to the definite integral abf(x)dx\int_a^b f(x) \, dx provided that ff is Riemann integrable on [a,b][a, b]. In practical implementations, such as numerical programming, the right Riemann sum is computed using loops that evaluate ff at the end of each subinterval, facilitating straightforward iteration from left to right across the partition.

Midpoint Riemann Sum

In the midpoint Riemann sum, the sample point, or tag, in each subinterval [xi1,xi][x_{i-1}, x_i] of a partition of the interval [a,b][a, b] is selected as the midpoint ti=xi1+xi2t_i^* = \frac{x_{i-1} + x_i}{2}. This choice evaluates the function ff at the center of each subinterval, providing a representative value that balances the endpoints. For a uniform partition where the subintervals each have width Δx=ban\Delta x = \frac{b - a}{n}, the midpoints are ti=a+(i12)Δxt_i^* = a + \left(i - \frac{1}{2}\right) \Delta x for i=1,2,,ni = 1, 2, \dots, n, and the midpoint Riemann sum is given by i=1nf(a+(i12)Δx)Δx.\sum_{i=1}^n f\left( a + \left(i - \frac{1}{2}\right) \Delta x \right) \Delta x. Geometrically, this constructs approximating rectangles centered beneath the curve, with heights determined by ff at the midpoint; for slowly varying functions, this centering reduces systematic bias compared to endpoint selections by capturing a more average behavior over the subinterval. The midpoint rule offers advantages over left and right endpoint rules, particularly in accuracy for non-linear functions. It is exact for linear functions, as the value at the midpoint equals the average value over the interval, yielding the precise integral without error. For concave or convex functions, the midpoint evaluation typically produces lower error bounds than endpoint methods, since it avoids the over- or underestimation at the edges where curvature effects are more pronounced. Additionally, the midpoint Riemann sum relates to tangent line approximations at the midpoints, where the rectangle height aligns with the linear tangent, providing a local linearization that enhances precision for mildly curved functions.

Trapezoidal Rule

The trapezoidal rule provides an approximation to the definite integral of a continuous function ff over an interval [a,b][a, b] by treating the area under the curve as a series of trapezoids. It is constructed as the average of the left and right over a partition of the interval, which symmetrically weights the function values at the endpoints of each subinterval. For a general partition a=x0<x1<<xn=ba = x_0 < x_1 < \cdots < x_n = b, the approximation is given by i=1nf(xi1)+f(xi)2Δxi,\sum_{i=1}^n \frac{f(x_{i-1}) + f(x_i)}{2} \Delta x_i, where Δxi=xixi1\Delta x_i = x_i - x_{i-1}. This formula arises from applying the single-interval trapezoidal approximation to each subinterval and summing the results, forming the composite trapezoidal rule. Geometrically, the rule interprets the area under f(x)f(x) as the union of trapezoids, where each trapezoid spans a subinterval [xi1,xi][x_{i-1}, x_i] and has parallel sides of lengths f(xi1)f(x_{i-1}) and f(x_i}, connected by a straight line segment that linearly interpolates between the function values at the endpoints. The area of each such trapezoid is exactly f(xi1)+f(xi)2Δxi\frac{f(x_{i-1}) + f(x_i)}{2} \Delta x_i, providing a piecewise linear approximation to the curve. For a uniform partition where Δxi=h=ban\Delta x_i = h = \frac{b-a}{n} for all ii, the composite trapezoidal rule simplifies to h2[f(a)+2i=1n1f(a+ih)+f(b)].\frac{h}{2} \left[ f(a) + 2 \sum_{i=1}^{n-1} f(a + i h) + f(b) \right]. This form weights the interior points with a factor of 2 while halving the contributions at the endpoints aa and bb. The trapezoidal rule is exact for any linear function f(x)=mx+cf(x) = mx + c, as the piecewise linear interpolation matches the function itself, resulting in zero error. More generally, the local truncation error in each subinterval is proportional to h3h^3 times the second derivative f(ξ)f''(\xi) for some ξ\xi in that subinterval, while the global error for the composite rule scales with (ba)h212maxf(x)\frac{(b-a) h^2}{12} \max |f''(x)|. This quadratic convergence in hh stems from the rule's reliance on linear approximation, which captures constant and linear terms precisely but deviates for higher-order curvature captured by the second derivative.

Convergence and Integration

Riemann Integrability

A bounded function f:[a,b]Rf: [a, b] \to \mathbb{R} is Riemann integrable if the upper and lower Darboux integrals coincide. For a partition P={x0=a,x1,,xn=b}P = \{x_0 = a, x_1, \dots, x_n = b\} of [a,b][a, b], the upper Darboux sum is defined as U(f,P)=i=1nMiΔxi,U(f, P) = \sum_{i=1}^n M_i \Delta x_i, where Mi=sup{f(x):x[xi1,xi]}M_i = \sup\{f(x) : x \in [x_{i-1}, x_i]\} and Δxi=xixi1\Delta x_i = x_i - x_{i-1}, while the lower Darboux sum is L(f,P)=i=1nmiΔxi,L(f, P) = \sum_{i=1}^n m_i \Delta x_i, with mi=inf{f(x):x[xi1,xi]}m_i = \inf\{f(x) : x \in [x_{i-1}, x_i]\}. The upper Darboux integral is the infimum of U(f,P)U(f, P) over all partitions PP, and the lower Darboux integral is the supremum of L(f,P)L(f, P) over all PP; ff is integrable if these values are equal, and the common value is the integral. The Darboux formulation using upper and lower sums is equivalent to the original Riemann definition, which considers the limit of Riemann sums f(ti)Δxi\sum f(t_i) \Delta x_i as the mesh P=maxΔxi0\|P\| = \max \Delta x_i \to 0, independent of the choice of tags tit_i in each subinterval. Specifically, ff is Riemann integrable if and only if, for every ε>0\varepsilon > 0, there exists a partition PP such that U(f,P)L(f,P)<εU(f, P) - L(f, P) < \varepsilon. This criterion ensures that the oscillation of ff can be controlled arbitrarily well by refining the partition. A fundamental characterization, known as Lebesgue's criterion, states that a bounded function ff on [a,b][a, b] is Riemann integrable if and only if its set of discontinuities has Lebesgue measure zero. This result highlights that Riemann integrability allows for discontinuities but only on sets of "negligible size," extending the class of integrable functions beyond continuous ones while excluding highly oscillatory or pathological cases.

Limit as Definite Integral

The definite integral of a Riemann integrable function ff over the closed interval [a,b][a, b] is given by the limit of its Riemann sums as the mesh (or norm) of the partition approaches zero. Specifically, if ff is Riemann integrable on [a,b][a, b], then limP0i=1nf(ti)Δxi=abf(x)dx,\lim_{\|P\| \to 0} \sum_{i=1}^n f(t_i^*) \Delta x_i = \int_a^b f(x) \, dx, where P={x0=a,x1,,xn=b}P = \{x_0 = a, x_1, \dots, x_n = b\} is a partition of [a,b][a, b] with mesh P\|P\|, Δxi=xixi1\Delta x_i = x_i - x_{i-1}, and ti[xi1,xi]t_i^* \in [x_{i-1}, x_i] are arbitrary tags; this limit exists and is independent of the choice of tags and partitions, provided the mesh tends to zero. A sketch of the proof relies on the definitions of upper and lower Darboux sums associated with the partition PP: for any choice of tags, the S(P,f,t)S(P, f, t^*) satisfies L(P,f)S(P,f,t)U(P,f)L(P, f) \leq S(P, f, t^*) \leq U(P, f), where L(P,f)L(P, f) and U(P,f)U(P, f) are the lower and upper sums, respectively. Riemann integrability implies that both the upper integral abf(x)dx=supL(P,f)\underline{\int_a^b} f(x) \, dx = \sup L(P, f) and lower integral abf(x)dx=infU(P,f)\overline{\int_a^b} f(x) \, dx = \inf U(P, f) equal the common value abf(x)dx\int_a^b f(x) \, dx, and as P0\|P\| \to 0, both L(P,f)L(P, f) and U(P,f)U(P, f) approach this value. By the squeeze theorem, the S(P,f,t)S(P, f, t^*) converges to the same limit. The notation abf(x)dx\int_a^b f(x) \, dx explicitly denotes this limit of Riemann sums taken over all sequences of partitions with mesh approaching zero; it represents the net signed area under the curve of ff and generalizes the antiderivative-based definition from calculus to a broader class of functions. This formalization of the definite integral as a limit of sums originated in Bernhard Riemann's 1854 habilitation thesis at the University of Göttingen, where he extended Augustin's Cauchy's earlier concepts of integrability to handle a wider range of functions, including those with discontinuities, by emphasizing the role of partition refinement. For continuous functions ff on the compact interval [a,b][a, b], uniform continuity (guaranteed by the Heine-Borel theorem) ensures that the oscillation of ff on each subinterval [xi1,xi][x_{i-1}, x_i] is bounded by ϵ>0\epsilon > 0 whenever P<δ\|P\| < \delta, for some δ>0\delta > 0. This uniformity implies that U(P,f)L(P,f)<ϵ(ba)U(P, f) - L(P, f) < \epsilon (b - a), so ff is Riemann integrable, and the Riemann sums converge to abf(x)dx\int_a^b f(x) \, dx independently of the tag selection rule.

Applications and Examples

One-Dimensional Numerical Example

To illustrate the practical computation of Riemann sums, consider the function f(x)=x2f(x) = x^2 defined on the interval [0,1][0, 1]. The exact value of the definite is 01x2dx=[x33]01=130.3333\int_0^1 x^2 \, dx = \left[ \frac{x^3}{3} \right]_0^1 = \frac{1}{3} \approx 0.3333. For a uniform partition with n=4n = 4 subintervals, the width of each subinterval is Δx=104=0.25\Delta x = \frac{1 - 0}{4} = 0.25, and the partition points are xi=i4x_i = \frac{i}{4} for i=0,1,2,3,4i = 0, 1, 2, 3, 4, or 0,0.25,0.5,0.75,10, 0.25, 0.5, 0.75, 1. The left Riemann sum uses the function values at the left endpoints of each subinterval: L4=Δxi=14f(xi1)=0.25[f(0)+f(0.25)+f(0.5)+f(0.75)]=0.25[02+0.252+0.52+0.752]=0.25[0+0.0625+0.25+0.5625]=0.25×0.875=0.21875.L_4 = \Delta x \sum_{i=1}^4 f(x_{i-1}) = 0.25 \left[ f(0) + f(0.25) + f(0.5) + f(0.75) \right] = 0.25 \left[ 0^2 + 0.25^2 + 0.5^2 + 0.75^2 \right] = 0.25 \left[ 0 + 0.0625 + 0.25 + 0.5625 \right] = 0.25 \times 0.875 = 0.21875. This underestimates the , as f(x)f(x) is increasing on [0,1][0, 1]. The right Riemann sum uses the right endpoints: R4=Δxi=14f(xi)=0.25[f(0.25)+f(0.5)+f(0.75)+f(1)]=0.25[0.0625+0.25+0.5625+1]=0.25×1.875=0.46875.R_4 = \Delta x \sum_{i=1}^4 f(x_i) = 0.25 \left[ f(0.25) + f(0.5) + f(0.75) + f(1) \right] = 0.25 \left[ 0.0625 + 0.25 + 0.5625 + 1 \right] = 0.25 \times 1.875 = 0.46875. This overestimates the for the same reason. The midpoint Riemann sum uses the midpoints of each subinterval (0.125,0.375,0.625,0.8750.125, 0.375, 0.625, 0.875): M4=Δxi=14f(xi1+xi2)=0.25[(0.125)2+(0.375)2+(0.625)2+(0.875)2]=0.25[0.015625+0.140625+0.390625+0.765625]=0.25×1.3125=0.328125.M_4 = \Delta x \sum_{i=1}^4 f\left( \frac{x_{i-1} + x_i}{2} \right) = 0.25 \left[ (0.125)^2 + (0.375)^2 + (0.625)^2 + (0.875)^2 \right] = 0.25 \left[ 0.015625 + 0.140625 + 0.390625 + 0.765625 \right] = 0.25 \times 1.3125 = 0.328125. This provides a closer to the exact value. The approximates the area using trapezoids formed by connecting the function values at the endpoints: T4=Δx2[f(0)+2f(0.25)+2f(0.5)+2f(0.75)+f(1)]=0.252[0+2(0.0625)+2(0.25)+2(0.5625)+1]=0.125×2.75=0.34375.T_4 = \frac{\Delta x}{2} \left[ f(0) + 2f(0.25) + 2f(0.5) + 2f(0.75) + f(1) \right] = \frac{0.25}{2} \left[ 0 + 2(0.0625) + 2(0.25) + 2(0.5625) + 1 \right] = 0.125 \times 2.75 = 0.34375. This slightly overestimates the . The following table shows the approximations for increasing values of nn (1, 2, 4, 8), demonstrating convergence toward the exact of 13\frac{1}{3}:
nnLeft Riemann SumRight Riemann Sum Riemann Sum
1010.250.5
20.1250.6250.31250.375
40.218750.468750.3281250.34375
80.27343750.39843750.332031250.3359375
As nn increases, all methods converge to 13\frac{1}{3}, with the midpoint and trapezoidal rules generally providing better approximations for this convex function. Visually, plotting these approximations on the parabola y=x2y = x^2 reveals how the rectangles (for left, right, and midpoint sums) or trapezoids hug the curve. The left rectangles lie entirely below the curve, the right ones extend above it, and the midpoint rectangles straddle the curve more symmetrically. For the trapezoidal rule, the slanted tops of the trapezoids connect consecutive points on the curve, forming a polygonal approximation that smooths the area under the parabola. Increasing nn refines these geometric figures, reducing the gaps or overlaps with the actual curve. For larger nn, manual computation becomes impractical, but software such as Python with libraries like NumPy can efficiently calculate these sums. For instance, a script can generate the partition points, evaluate f(x)f(x) at the appropriate tags, and sum the areas, allowing visualization of convergence even for n=1000n = 1000 or more.

Error Analysis

The error between a Riemann sum approximation and the definite integral abf(x)dx\int_a^b f(x) \, dx depends on the selection of sample points within each subinterval and the granularity of the partition. For left and right endpoint rules with uniform partitions of nn subintervals, the absolute error satisfies E(ba)22nmaxaxbf(x)|E| \leq \frac{(b-a)^2}{2n} \max_{a \leq x \leq b} |f'(x)|, assuming ff is continuously differentiable on [a,b][a, b]. This bound arises from applying the mean value theorem to the difference between the function value at the endpoint and the average over the subinterval. In contrast, the midpoint rule achieves a higher for smoother functions. If ff is twice continuously differentiable, the error is O(1/n2)O(1/n^2), with the bound EM(ba)324n2maxaxbf(x)|E_M| \leq \frac{(b-a)^3}{24 n^2} \max_{a \leq x \leq b} |f''(x)|. Similarly, the , which averages left and right endpoints, has error ET=(ba)312n2f(ξ)E_T = -\frac{(b-a)^3}{12 n^2} f''(\xi) for some ξ[a,b]\xi \in [a, b], yielding the bound ET(ba)312n2maxaxbf(x)|E_T| \leq \frac{(b-a)^3}{12 n^2} \max_{a \leq x \leq b} |f''(x)|. These O(1/n2)O(1/n^2) rates reflect the quadratic convergence enabled by the second , making both methods superior to endpoint rules for twice-differentiable functions. Key factors influencing the error include the norm of the partition, defined as the maximum subinterval length, and the smoothness of ff. Convergence to the is guaranteed for continuous ff as the partition norm approaches zero, but the error rate accelerates with higher-order bounded derivatives; for instance, mere continuity yields no specific rate beyond o(1)o(1), while differentiability provides the O(1/n)O(1/n) bound for endpoint rules. Non-uniform partitions can exacerbate errors if the norm does not decrease uniformly. The following table compares the error bounds for the rules on a uniform partition, highlighting the advantages of and trapezoidal approximations for smooth functions:
RuleError BoundAsymptotic Order
Left/Right$\frac{(b-a)^2}{2n} \maxf'(x)
$\frac{(b-a)^3}{24 n^2} \maxf''(x)
Trapezoidal$\frac{(b-a)^3}{12 n^2} \maxf''(x)
For a representative example like f(x)=x2f(x) = x^2 on [0,1][0, 1], where maxf(x)=2\max |f'(x)| = 2 and maxf(x)=2\max |f''(x)| = 2, the endpoint bound is 12n2=1n\frac{1}{2n} \cdot 2 = \frac{1}{n}, while and trapezoidal bounds are 124n22=112n2\frac{1}{24 n^2} \cdot 2 = \frac{1}{12 n^2} and 112n22=16n2\frac{1}{12 n^2} \cdot 2 = \frac{1}{6 n^2}, respectively, demonstrating the quadratic improvement. and trapezoidal rules thus offer better accuracy for large nn when ff has bounded second derivatives.

Multidimensional Extensions

Double Riemann Sums

To approximate the double integral of a f(x,y)f(x,y) over a rectangular R=[a,b]×[c,d]R = [a,b] \times [c,d], partition the x-interval [a,b][a,b] into nn subintervals with lengths Δxi=xixi1\Delta x_i = x_i - x_{i-1} for i=1i=1 to nn, where a=x0<x1<<xn=ba = x_0 < x_1 < \cdots < x_n = b, and similarly partition the y-interval [c,d][c,d] into mm subintervals Δyj=yjyj1\Delta y_j = y_j - y_{j-1} for j=1j=1 to mm, where c=y0<y1<<ym=dc = y_0 < y_1 < \cdots < y_m = d. This grid division creates mnmn subrectangles Rij=[xi1,xi]×[yj1,yj]R_{ij} = [x_{i-1}, x_i] \times [y_{j-1}, y_j], each with area ΔAij=ΔxiΔyj\Delta A_{ij} = \Delta x_i \Delta y_j. The double Riemann sum is then formed by selecting a tag point (ti,sj)(t_i^*, s_j^*) in each subrectangle RijR_{ij} and computing i=1nj=1mf(ti,sj)ΔAij.\sum_{i=1}^n \sum_{j=1}^m f(t_i^*, s_j^*) \Delta A_{ij}. This sum provides an approximation to the integral, analogous to the one-dimensional Riemann sum but extended to two dimensions. Choice of tags follows rules similar to those in one dimension: for instance, the lower-left tag uses (ti,sj)=(xi1,yj1)(t_i^*, s_j^*) = (x_{i-1}, y_{j-1}), the upper-right tag uses (xi,yj)(x_i, y_j), and the center tag uses the (xi1+xi2,yj1+yj2)\left( \frac{x_{i-1} + x_i}{2}, \frac{y_{j-1} + y_j}{2} \right). These selections determine whether the sum under- or overestimates the depending on the monotonicity of ff. If ff is continuous on the compact RR, the double Riemann sums converge to the double integral Rf(x,y)dA\iint_R f(x,y) \, dA as the norm of the partition—which is the maximum of all Δxi\Delta x_i and Δyj\Delta y_j—approaches zero, independent of the specific tag choices or partition refinements. In practice, double Riemann sums approximate the volume under the surface z=f(x,y)z = f(x,y) over RR by erecting vertical prisms with heights f(ti,sj)f(t_i^*, s_j^*) atop each subrectangle, or by employing bilinear patches that interpolate values at subrectangle corners, akin to the trapezoidal rule's in one dimension.

Multiple Riemann Sums

Multiple Riemann sums extend the concept of Riemann sums to integrals over regions in three or more dimensions, particularly for approximating triple and higher-dimensional integrals over hyper-rectangular domains. For a function f(x,y,z)f(x, y, z) continuous on the closed box R=[a,b]×[c,d]×[e,f]R = [a, b] \times [c, d] \times [e, f], a partition of RR divides each interval into subintervals: [a,b][a, b] into Δxi=xixi1\Delta x_i = x_i - x_{i-1} for i=1,,mi = 1, \dots, m, [c,d][c, d] into Δyj=yjyj1\Delta y_j = y_j - y_{j-1} for j=1,,nj = 1, \dots, n, and [e,f][e, f] into Δzk=zkzk1\Delta z_k = z_k - z_{k-1} for k=1,,pk = 1, \dots, p. The sub-boxes are then Rijk=[xi1,xi]×[yj1,yj]×[zk1,zk]R_{ijk} = [x_{i-1}, x_i] \times [y_{j-1}, y_j] \times [z_{k-1}, z_k], each with volume element ΔVijk=ΔxiΔyjΔzk\Delta V_{ijk} = \Delta x_i \Delta y_j \Delta z_k. The triple Riemann sum is formed by selecting a sample point (ti,sj,uk)(t_i^*, s_j^*, u_k^*) in each sub-box RijkR_{ijk} and computing S=i=1mj=1nk=1pf(ti,sj,uk)ΔxiΔyjΔzk,S = \sum_{i=1}^m \sum_{j=1}^n \sum_{k=1}^p f(t_i^*, s_j^*, u_k^*) \Delta x_i \Delta y_j \Delta z_k, which approximates the volume under the graph of ff over RR. Tag points (ti,sj,uk)(t_i^*, s_j^*, u_k^*) can be chosen using products of one-dimensional rules, such as the left endpoint (ti=xi1t_i^* = x_{i-1}), right endpoint (ti=xit_i^* = x_i), or (ti=(xi1+xi)/2t_i^* = (x_{i-1} + x_i)/2) in each dimension independently; for instance, using midpoints in all three yields a midpoint rule for the triple sum. For continuous ff, as the norm of the partition (maximum of Δxi,Δyj,Δzk\Delta x_i, \Delta y_j, \Delta z_k) approaches zero, the triple Riemann sum converges to the triple integral Rf(x,y,z)dV\iiint_R f(x, y, z) \, dV, independent of tag choices. This extends analogously to quadruple integrals over [a,b]×[c,d]×[e,f]×[g,h][a,b] \times [c,d] \times [e,f] \times [g,h] via i,j,k,lf(ti,sj,uk,vl)ΔxiΔyjΔzkΔwl\sum_{i,j,k,l} f(t_i^*, s_j^*, u_k^*, v_l^*) \Delta x_i \Delta y_j \Delta z_k \Delta w_l, converging to \idotsintfdV\idotsint f \, dV under the same conditions. In practice, computing these sums incurs a cost scaling as O(n3)O(n^3) for three dimensions with nn subdivisions per axis, escalating to O(nd)O(n^d) in dd dimensions and suffering from the curse of dimensionality, which motivates alternatives like methods for higher-dimensional approximations.

General Form in n Dimensions

In n-dimensional Euclidean space Rn\mathbb{R}^n, the Riemann integral is defined over a closed and bounded rectangular domain D=[a1,b1]××[an,bn]D = [a_1, b_1] \times \cdots \times [a_n, b_n], which is a product of closed intervals along each coordinate axis. A partition PP of DD divides each interval [ai,bi][a_i, b_i] into finitely many subintervals, resulting in a finite collection of sub-rectangles DkD_k, where each Dk=Ik,1××Ik,nD_k = I_{k,1} \times \cdots \times I_{k,n} and the DkD_k cover DD without overlap except on boundaries. The volume of each sub-rectangle is ΔVk=i=1n(bk,iak,i)\Delta V_k = \prod_{i=1}^n (b_{k,i} - a_{k,i}), where [ak,i,bk,i][a_{k,i}, b_{k,i}] are the endpoints of Ik,iI_{k,i}. For a f:DRf: D \to \mathbb{R}, a tagged partition selects a point xk=(xk,1,,xk,n)x_k^* = (x_{k,1}^*, \dots, x_{k,n}^*) in each DkD_k, often chosen arbitrarily or according to a rule generalizing one-dimensional conventions, such as the "lower-left" corner where each xk,i=ak,ix_{k,i}^* = a_{k,i} (analogous to the left endpoint). The corresponding Riemann sum is then S(f,P)=kf(xk)ΔVk,S(f, P) = \sum_k f(x_k^*) \Delta V_k, which approximates the integral by weighting function values at the tags by sub-rectangle volumes. The norm of the partition, P\|P\|, is the maximum Euclidean diameter of the sub-rectangles DkD_k, defined as diam(Dk)=i=1n(bk,iak,i)2\operatorname{diam}(D_k) = \sqrt{\sum_{i=1}^n (b_{k,i} - a_{k,i})^2}
Add your contribution
Related Hubs
User Avatar
No comments yet.