
In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, 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
Georg Friedrich Bernhard Riemann (; ; 17September 182620July 1866) was a German mathematician who made profound contributions to analysis, number theory, and differential geometry. In the field of real analysis, he is mostly known for the f ...
. One very common application is in
numerical integration
In analysis, numerical integration comprises a broad family of algorithms for calculating the numerical value of a definite integral.
The term numerical quadrature (often abbreviated to quadrature) is more or less a synonym for "numerical integr ...
, 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 (
rectangle
In Euclidean geometry, Euclidean plane geometry, a rectangle is a Rectilinear polygon, rectilinear convex polygon or a quadrilateral with four right angles. It can also be defined as: an equiangular quadrilateral, since equiangular means that a ...
s,
trapezoid
In geometry, a trapezoid () in North American English, or trapezium () in British English, is a quadrilateral that has at least one pair of parallel sides.
The parallel sides are called the ''bases'' of the trapezoid. The other two sides are ...
s,
parabola
In mathematics, a parabola is a plane curve which is Reflection symmetry, mirror-symmetrical and is approximately U-shaped. It fits several superficially different Mathematics, mathematical descriptions, which can all be proved to define exactl ...
s, 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
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
be a function defined on a
closed interval