HOME

TheInfoList



OR:

In
mathematics Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, a Riemann sum is a certain kind of
approximation An approximation is anything that is intentionally similar but not exactly equal to something else. Etymology and usage The word ''approximation'' is derived from Latin ''approximatus'', from ''proximus'' meaning ''very near'' and the prefix ' ...
of an integral by a finite sum. It is named after nineteenth century German mathematician
Bernhard Riemann Georg Friedrich Bernhard Riemann (; 17 September 1826 – 20 July 1866) was a German mathematician who made contributions to analysis, number theory, and differential geometry. In the field of real analysis, he is mostly known for the first ...
. One very common application is approximating the area of functions or lines on a graph, but also the length of curves and other approximations. The sum is calculated by partitioning the region into shapes (
rectangle In Euclidean plane geometry, a rectangle is a quadrilateral with four right angles. It can also be defined as: an equiangular quadrilateral, since equiangular means that all of its angles are equal (360°/4 = 90°); or a parallelogram contain ...
s,
trapezoid A quadrilateral with at least one pair of parallel sides is called a trapezoid () in American and Canadian English. In British and other forms of English, it is called a trapezium (). A trapezoid is necessarily a convex quadrilateral in Eu ...
s,
parabola In mathematics, a parabola is a plane curve which is mirror-symmetrical and is approximately U-shaped. It fits several superficially different mathematical descriptions, which can all be proved to define exactly the same curves. One descri ...
s, or cubics) 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 In mathematics, an integral assigns numbers to functions in a way that describes displacement, area, volume, and other concepts that arise by combining infinitesimal data. The process of finding integrals is called integration. Along with ...
even if the
fundamental theorem of calculus The fundamental theorem of calculus is a theorem that links the concept of differentiating a function (calculating its slopes, or rate of change at each time) with the concept of integrating a function (calculating the area under its graph, ...
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 In the branch of mathematics known as real analysis, the Riemann integral, created by Bernhard Riemann, was the first rigorous definition of the integral of a function on an interval. It was presented to the faculty at the University of G� ...
.


Definition

Let f: , b\rightarrow \mathbb R be a function defined on a
closed interval In mathematics, a (real) interval is a set of real numbers that contains all real numbers lying between any two numbers of the set. For example, the set of numbers satisfying is an interval which contains , , and all numbers in between. Other ...
, b/math> of the real numbers, \mathbb R, and P = (x_0, x_1, \ldots, x_n) a partition of , b/math>, that is : a = x_0 A Riemann sum S of f over , b/math> with partition P is defined as : S = \sum_^ f(x_i^*)\, \Delta x_i, where \Delta x_i = x_i - x_ and x_i^* \in
_, x_i The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline ...
/math>. One might produce different Riemann sums depending on which x_i^*'s are chosen. In the end this will not matter, if the function is Riemann integrable, when the difference or width of the summands \Delta x_i approaches zero.


Types of Riemann sums

Specific choices of x_i^* give different types of Riemann sums: * If x_i^*=x_ for all ''i'', the method is the left rule and gives a left Riemann sum. * If x_i^* = x_i for all ''i'', the method is the right rule and gives a right Riemann sum. * If x_i^* = (x_i + x_)/2 for all ''i'', the method is the midpoint rule and gives a middle Riemann sum. * If f(x_i^*) = \sup f(
_, x_i The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline ...
(that is, the
supremum In mathematics, the infimum (abbreviated inf; plural infima) of a subset S of a partially ordered set P is a greatest element in P that is less than or equal to each element of S, if such an element exists. Consequently, the term ''greatest ...
of ''f'' over
_, x_i The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline ...
/math>), the method is the upper rule and gives an upper Riemann sum or upper Darboux sum. * If f(x_i^*) = \inf f(
_, x_i The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline ...
(that is, the
infimum In mathematics, the infimum (abbreviated inf; plural infima) of a subset S of a partially ordered set P is a greatest element in P that is less than or equal to each element of S, if such an element exists. Consequently, the term ''greatest lo ...
of ''f'' over
_, x_i The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline ...
/math>), 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 In analysis, numerical integration comprises a broad family of algorithms for calculating the numerical value of a definite integral, and by extension, the term is also sometimes used to describe the numerical solution of differential equatio ...
. 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 In numerical integration, Simpson's rules are several approximations for definite integrals, named after Thomas Simpson (1710–1761). The most basic of these rules, called Simpson's 1/3 rule, or just Simpson's rule, reads \int_a^b f(x) \, ...
and
Newton–Cotes formulas In numerical analysis, the Newton–Cotes formulas, also called the Newton–Cotes quadrature rules or simply Newton–Cotes rules, are a group of formulas for numerical integration (also called ''quadrature'') based on evaluating the integrand at ...
. Any Riemann sum on a given partition (that is, for any choice of x_i^* between x_ and x_i) is contained between the lower and upper Darboux sums. This forms the basis of the
Darboux integral In the branch of mathematics known as real analysis, the Darboux integral is constructed using Darboux sums and is one possible definition of the integral of a function. Darboux integrals are equivalent to Riemann integrals, meaning that a functi ...
, which is ultimately equivalent to the Riemann integral.


Riemann summation methods

The five Riemann summation methods are usually best approached with subintervals of equal size. The interval is therefore divided into n subintervals, each of length : \Delta x = \frac. The points in the partition will then be : a, \; a + \Delta x, \; a + 2 \Delta x, \; \ldots, \; a + (n-2) \Delta x, \; a + (n - 1)\Delta x, \; b.


Left rule

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 : S_\mathrm = \Delta x \left (a) + f(a + \Delta x) + f(a + 2 \Delta x) + \ldots + f(b - \Delta x)\right The left Riemann sum amounts to an overestimation if ''f'' is monotonically decreasing on this interval, and an underestimation if it is
monotonically increasing In mathematics, a monotonic function (or monotone function) is a function between ordered sets that preserves or reverses the given order. This concept first arose in calculus, and was later generalized to the more abstract setting of orde ...
. The error of this formula will be : \left\vert\int_^ f(x)\, dx - S_\mathrm\right\vert \le \frac, where M_1 is the maximum value of the
absolute value In mathematics, the absolute value or modulus of a real number x, is the non-negative value without regard to its sign. Namely, , x, =x if is a positive number, and , x, =-x if x is negative (in which case negating x makes -x positive), ...
of f^(x) over the interval.


Right rule

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 : S_\mathrm = \Delta x \left (a + \Delta x) + f(a + 2 \Delta x) + \ldots + f(b)\right The right Riemann sum amounts to an underestimation if ''f'' is monotonically decreasing, and an overestimation if it is
monotonically increasing In mathematics, a monotonic function (or monotone function) is a function between ordered sets that preserves or reverses the given order. This concept first arose in calculus, and was later generalized to the more abstract setting of orde ...
. The error of this formula will be : \left\vert\int_^ f(x)\, dx - S_\mathrm\right\vert \le \frac, where M_1 is the maximum value of the
absolute value In mathematics, the absolute value or modulus of a real number x, is the non-negative value without regard to its sign. Namely, , x, =x if is a positive number, and , x, =-x if x is negative (in which case negating x makes -x positive), ...
of f^(x) over the interval.


Midpoint rule

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 : S_\mathrm = \Delta x\left \left(a + \tfrac\right) + f\left(a + \tfrac\right) + \ldots + f \left(b - \tfrac\right)\right The error of this formula will be : \left\vert\int_a^b f(x)\, dx - S_\mathrm\right\vert \le \frac, where M_2 is the maximum value of the
absolute value In mathematics, the absolute value or modulus of a real number x, is the non-negative value without regard to its sign. Namely, , x, =x if is a positive number, and , x, =-x if x is negative (in which case negating x makes -x positive), ...
of f^(x) 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.


Trapezoidal rule

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 \tfrach(b_1 + b_2) for a trapezium with parallel sides ''b''1 and ''b''2, and height ''h'', and summing the resulting areas gives : S_\mathrm = \tfrac\Delta x\left (a) + 2f(a + \Delta x) + 2f(a + 2\Delta x) + \ldots + f(b)\right The error of this formula will be : \left\vert\int_a^b f(x)\, dx - S_\mathrm\right\vert \le \frac, where M_2 is the maximum value of the absolute value of f^(x). 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

For a one-dimensional Riemann sum over domain , b/math>, 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, : \int_a^b f(x)\, dx = \lim_ \sum_^ f(x_i^*)\, \Delta x_i. 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: Image:Riemann sum (leftbox).gif, Left Riemann sum Image:Riemann sum (rightbox).gif, Right Riemann sum Image:Riemann sum (middlebox).gif, Middle Riemann sum 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

Taking an example, the area under the curve over
, 2 The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline o ...
can be procedurally computed using Riemann's method. The interval
, 2 The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline o ...
is firstly divided into ''n'' subintervals, each of which is given a width of \tfrac; 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 x_1, x_2, \ldots, x_n. Therefore, the sequence of the heights of the boxes will be x_1^2, x_2^2, \ldots, x_n^2. It is an important fact that x_i = \tfrac, and x_n = 2. The area of each box will be \tfrac \times x_i^2 and therefore the ''n''th right Riemann sum will be: : \begin S &= \frac \times \left(\frac\right)^2 + \ldots + \frac \times \left(\frac\right)^2 + \ldots + \frac \times \left(\frac\right)^2\\ &= \frac \left(1 + \ldots + i^2 + \ldots + n^2\right)\\ &= \frac \left(\frac\right)\\ &= \frac \left(\frac\right)\\ &= \frac + \frac + \frac. \end 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: : \lim_ S = \lim_\left(\frac + \frac + \frac\right) = \frac. This method agrees with the definite integral as calculated in more mechanical ways: : \int_0^2 x^2\, dx = \frac. 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 In numerical integration, Simpson's rules are several approximations for definite integrals, named after Thomas Simpson (1710–1761). The most basic of these rules, called Simpson's 1/3 rule, or just Simpson's rule, reads \int_a^b f(x) \, ...
. 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

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.


Two dimensions

In two dimensions, the domain A may be divided into a number of two-dimensional cells A_i such that A = \bigcup_i A_i. Each cell then can be interpreted as having an "area" denoted by \Delta A_i. The two-dimensional Riemann sum is : S = \sum_^n f(x_i^*, y_i^*)\, \Delta A_i, where (x_i^*, y_i^*) \in A_i.


Three dimensions

In three dimensions, the domain V is partitioned into a number of three-dimensional cells V_i such that V = \bigcup_i V_i. Each cell then can be interpreted as having an "volume" denoted by \Delta V_i. The three-dimensional Riemann sum is : S = \sum_^n f(x_i^*, y_i^*, z_i^*)\, \Delta V_i, where (x_i^*, y_i^*, z_i^*) \in V_i.


Arbitrary number of dimensions

Higher dimensional Riemann sums follow a similar pattern. An ''n''-dimensional Riemann sum is : S = \sum_i f(P_i^*)\, \Delta V_i, where P_i^* \in V_i, that is, it is a point in the ''n''-dimensional cell V_i with ''n''-dimensional volume \Delta V_i.


Generalization

In high generality, Riemann sums can be written : S = \sum_i f(P_i^*) \mu(V_i), where P_i^* stands for any arbitrary point contained in the set V_i and \mu 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 V_i; 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

*
Antiderivative In calculus, an antiderivative, inverse derivative, primitive function, primitive integral or indefinite integral of a function is a differentiable function whose derivative is equal to the original function . This can be stated symbolica ...
*
Euler method In mathematics and computational science, the Euler method (also called forward Euler method) is a first-order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit m ...
and midpoint method, related methods for solving differential equations * Lebesgue integral *
Riemann integral In the branch of mathematics known as real analysis, the Riemann integral, created by Bernhard Riemann, was the first rigorous definition of the integral of a function on an interval. It was presented to the faculty at the University of G� ...
, limit of Riemann sums as the partition becomes infinitely fine *
Simpson's rule In numerical integration, Simpson's rules are several approximations for definite integrals, named after Thomas Simpson (1710–1761). The most basic of these rules, called Simpson's 1/3 rule, or just Simpson's rule, reads \int_a^b f(x) \, ...
, a powerful numerical method more powerful than basic Riemann sums or even the Trapezoidal rule * Trapezoidal rule, numerical method based on the average of the left and right Riemann sum


References


External links

*
A simulation showing the convergence of Riemann sums
{{Bernhard Riemann Integral calculus Bernhard Riemann