The journey starts from the Rieman integral, which is the simplest and most intuitive integral. Simplicity is good, but sometimes it’s not robust enough. Soon we will see, on which occasion, Riemann integration completely fails.

We use integration to solve the problem of the area under a curve, given by function f bounded on the interval [a, b]. To approach this, the Riemann sum gives us an intuitive idea. As shown in Figure 1.1, we use rectangles to approximate a curve. There are two ways to do this, one is to take the lower Rieman sum, shown in (A), another one is to take the upper Rieman sum, shown in (B).

Firstly, we partition the domain into n parts, if we want to integrate from a to b, then the length of every part is (b-a)/n. To take the lower Rieman sum, in every interval with a length (b-a)/n, we pick the infimum of the given function. To calculate the upper Rieman sum, we pick the supremum. To be a bit more formal, the infimum and supremum are defined as

Therefore, naturally the upper and lower Rieman sums are given by

where P = {x₀, x₁, …, xₙ} is a set of breaking points of the partition. The more granular the partition is (this means the rectangles get to be very thin), the more precise the approximation is. And the integral of the given area is defined to be the limit of the Rieman sum when n (the number of the rectangles) goes to infinity.

The reason why we define both upper and lower Rieman sum is to introduce the following concept — Rieman integrability. For a function to be integrable, it can’t explode, which means, in the given interval, the integral of the function should be “smaller than infinity”. For a function to be Rieman integrable, the infimum of the upper Rieman sum and the supremum of the lower Rieman sum should be the same. This shouldn’t be too surprising, since it’s very easy to imagine from Figure [Rie]. When the rectangles get to be thinner, the approximation gets closer to the actual curve, which means the lower Rieman sum gets smaller and the upper Rieman sum gets larger.

From the definition of Rieman integrability, we can see that a continuous (not necessarily differentiable, it’s allowed to have spikes) function is always Rieman integrable.

What should we do when a function is not Rieman integrable? A more powerful tool is the…

Continue reading: https://towardsdatascience.com/lebesgue-measure-and-integration-64f5c45d7888?source=rss—-7f60cf5620c9—4

Source: towardsdatascience.com

## Comments by halbot