In mathematics, a Riemann sum is a method for approximating the total area underneath a curve on a graph, otherwise known as an integral. Mathematics is the body of Knowledge and Academic discipline that studies such concepts as Quantity, Structure, Space and The European Space Agency 's INTErnational Gamma-Ray Astrophysics Laboratory ( INTEGRAL) is detecting some of the most energetic radiation that comes from space It may also be used to define the integration operation. The sums are named after the German mathematician Bernhard Riemann.
Contents |
Consider a function f: D → R, where D is a subset of the real numbers R, and let I = [a, b] be a closed interval contained in D. The Mathematical concept of a function expresses dependence between two quantities one of which is given (the independent variable, argument of the function In Mathematics, the real numbers may be described informally in several different ways In Mathematics, an interval is a set of Real numbers with the property that any number that lies between two numbers in the set is also included in the set A finite set of points {x0, x1, x2, . . . xn} such that a = x0 < x1 < x2 . . . < xn = b creates a partition
of I.
If P is a partition with n elements of I, then the Riemann sum of f over I with the partition P is defined as

where xi-1 ≤ yi ≤ xi. The choice of yi in this interval is arbitrary. If yi = xi-1 for all i, then S is called a left Riemann sum. If yi = xi, then S is called a right Riemann sum. If yi = (xi+xi-1)/2, then S is called a middle Riemann sum. By averaging the left and right Riemann sum one obtains the so-called trapezoidal sum.
Suppose we have

where vi is the supremum of f over [xi-1, xi]; then S is defined to be an upper Riemann sum. Similarly, if vi is the infimum of f over [xi−1, xi], then S is a lower Riemann sum. In Mathematics the infimum of a Subset of some set is the Greatest element, not necessarily in the subset that is less than or equal to all elements of
Any Riemann sum on a given partition (that is, for any choice of yi between xi-1 and xi) is contained between the lower and the upper Riemann sums. A function is defined to be Riemann integrable if the lower and upper Riemann sums get ever closer as the partition gets finer and finer. In the branch of Mathematics known as Real analysis, the Riemann integral, created by Bernhard Riemann, was the first rigorous definition of the Integral This fact can also be used for numerical integration. In Numerical analysis, numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite Integral, and by extension
As stated above, there are four common methods to compute a Riemann sum: left, right, middle, and trapezoidal. We will elaborate on them in the simple case when the partition is made up of intervals of equal size. Thus, divide the interval [a, b] into n subintervals, each of length Q = (b − a) / n. The points in the partition will then be
For the left Riemann sum, we will approximate the function by its value at the left-end point. This gives multiple rectangles with base Q and height f(a + iQ). Doing this for i = 0, 1, . . . , n−1, and adding up the resulting areas gives us
![Q\left[f(a) + f(a + Q) + f(a + 2Q)+\cdots+f(b - Q)\right].\,](../../../../math/3/d/b/3db38a258ab7a2ea8d4a3e8d36822c8f.png)
The left-hand Riemann sum will be an overestimation if f is monotonically decreasing on this interval, and an underestimation if it is monotonically increasing.
Here, for each interval we will approximate f by the value at the right endpoint. This gives multiple rectangles with base Q and height f(a + iQ). Doing this for i = 1, 2, . . . , n−1, n, and adding up the resulting areas gives us
![Q\left[f(a + Q) + f(a + 2Q)+\cdots+f(b)\right].\,](../../../../math/f/5/0/f50bf5efe355d2db7678e43cb50ea29c.png)
The right-hand Riemann sum will be an overestimation if the function f is monotonically increasing, and an underestimation if it is monotonically decreasing.
In this case we will take as approximation for f in each interval its value at the midpoint. For the first interval we will thus have f(a + Q/2), for the next one f(a + 3Q/2), and so on until f(b-Q/2) is reached. Summing up the areas, we find
![Q\left[f(a + Q/2) + f(a + 3Q/2)+\cdots+f(b-Q/2)\right].](../../../../math/6/5/7/6577b8e73777fd7eb32405c08618596a.png)
The error of this formula will be

where M2 is the maximum value of the absolute value of
on the interval. In Mathematics, the absolute value (or modulus) of a Real number is its numerical value without regard to its sign.
In this case, the values of the function f on an interval will be approximated by the average of the values at the left and right endpoints. In the same manner as above, a simple calculation using the area formula A = h(b1 + b2) / 2 for a trapezium with parallel sides b1, b2 and height h one calculates the Riemann sum to be
![\frac{1}{2}Q\left[f(a) + 2f(a+Q) + 2f(a+2Q) + 2f(a+3Q)+\cdots+f(b)\right].](../../../../math/8/8/8/888c6bf9b41956b7a401223610b91ce1.png)
The error of this approximation for the integral is

where M2 is the maximum value of the absolute value of 