Integration is an operation that corresponds to the informal idea of finding the area under the graph of a function. The first theory of integration was developed by Archimedes with his method of quadratures, but this could be applied only in circumstances where there was a high degree of geometric symmetry. In the seventeenth century, Isaac Newton and Gottfried Leibniz independently discovered the idea that integration was a sort of opposite of differentiation (which they had just invented); this allowed mathematicians to calculate a broad class of integrals for the first time. However, unlike Archimedes' method, which was based on Euclidean geometry, Newton's and Leibniz's integral calculus lacked a secure foundation.
In the nineteenth century, Augustin Cauchy finally developed a rigorous theory of limits, and Bernhard Riemann followed this up by formalizing what is now called the Riemann integral. To define this integral, one fills the area under the graph with smaller and smaller rectangles and takes the limit of the sums of the rectangles at each stage. Unfortunately, some functions don't have well-defined limits to these sums, so they have no Riemann integral. Henri Lebesgue invented another method of integration to solve this problem. He first presented his ideas in Intégrale, longueur, aire (Integral, length, area) in 1902. Instead of using the areas of rectangles, a method that puts the focus on the domain of the function, Lebesgue turned to the codomain of the function for his fundamental unit of area. Lesbesgue's idea was to build first the integral for what he called simple functions – functions that take only finitely many values. Then he defined it for more complicated functions as the upper bound of all the integrals of simple functions smaller than the function in question. Lesbesgue integration has the beautiful property that every function with a Riemann integral also has a Lebesgue integral, and the two integrals agree. But there are many functions with a Lebesgue integral that don't have a Riemann integral. As part of the development of Lebesgue integration, Lebesgue introduced the concept of Lebesgue measure, which measures lengths rather than areas. Lebesgue's technique for turning a measure into an integral generalizes easily to many other situations, leading to the modern field of measure theory.
The Lebesgue integral was deficient in one respect. The Riemann integral had been generalized to the improper Riemann integral to measure functions whose domain of definition was not a closed interval. The Lebesgue integral integrated many of these functions (always reproducing the same answer when it did), but not all of them. The Henstock integral is an even more general notion of integral (based on Riemann's theory rather than Lebesgue's) that subsumes both Lebesgue integration and improper Riemann integration. However, the Henstock integral depends on specific features of the real number line and so doesn't generalize as well as the Lebesgue integral does.