Riemann sums help us approximate definite integrals, but they also help us formally define definite integrals. Learn how this is achieved and how we can move between the representation of area as a definite integral and as a Riemann sum.
Definite integrals represent the area under the curve of a function, and Riemann sums help us approximate such areas. The question remains: is there a way to find the exact value of a definite integral?

Riemann sums with "infinite" rectangles

Imagine we want to find the area under the graph of f(x)=15x2f(x)=\dfrac15x^2 between x=2x=2 and x=6x=6.
Using definite integral notation, we can represent the exact area:
2615x2dx\displaystyle\int_2^6 \dfrac15 x^2\,dx
We can approximate this area using Riemann sums. Let R(n)R(n) be the right Riemann sum approximation of our area using nn equal subdivisions (i.e. nn rectangles of equal width).
For example, this is R(4)R(4). You can see it's an overestimation of the actual area.
The area under the curve of ff between x=2x=2 and x=6x=6 is approximated using 44 rectangles of equal width.
We can make our approximation better by dividing our area into further rectangles that are smaller in width, i.e. by using R(n)R(n) for larger values of nn.
You can see how the approximation gets closer to the actual area as the number of rectangles goes from 11 to 100100:
Created with Geogebra.
Of course, using even more rectangles will get us even closer, but an approximation is always just an approximation.
What if we could take a Riemann sum with infinite equal subdivisions? Is that even possible? Well, we can't set n=n=\infty because infinity isn't an actual number, but you might recall we have a way of taking something to infinity...
Limits!
Specifically, this limit:
limnR(n)\Large\displaystyle\lim_{n\to\infty}R(n)
Amazing fact #1: This limit really gives us the exact value of 2615x2dx\displaystyle\int_2^6 \dfrac15 x^2\,dx.
Amazing fact #2: It doesn't matter whether we take the limit of a right Riemann sum, a left Riemann sum, or any other common approximation. At infinity, we will always get the exact value of the definite integral.
(The rigorous proof of these facts is too elaborate to cover in this article, but that's okay because we're just interested in the intuition behind connecting Riemann sums and definite integrals.)
So far we've used R(n)R(n) as a placeholder for the right Riemann sum approximation with nn subdivisions. Now let's find the actual expression.
Quick review: We are looking for Δx\greenD{\Delta x}, the constant width\greenD{\text{width}} of any rectangle, and xi\blueD{x_i}, the xx-value of the right edge of the ithi^{\text{th}} rectangle. Then, f(xi)\goldD{f(\blueD{x_i})} will give us the height\goldD{\text{height}} of each rectangle.
Δx=62n=4nxi=2+Δxi=2+4nif(xi)=15(xi)2=15(2+4ni)2\begin{aligned} \greenD{\Delta x}&=\dfrac{6-2}{n}=\greenD{\dfrac4n} \\\\ \blueD{x_i}&=2+\Delta x\cdot i=\blueD{2+\dfrac4n i} \\\\ \goldD{f(\blueD{x_i})}&=\dfrac15(x_i)^2=\goldD{\dfrac15\left(\blueD{2+\dfrac4n i}\right)^2} \end{aligned}
So the area of the ithi^{\text{th}} rectangle is 4n15(2+4ni)2\greenD{\dfrac4n}\cdot \goldD{\dfrac15\left(\blueD{2+\dfrac4n i}\right)^2}, and we sum that for values of ii from 11 to nn:
R(n)=i=1n(2+4in)245nR(n)=\displaystyle\sum_{i=1}^{n}\left(2+\dfrac{4i}{n}\right)^2\cdot\dfrac{4}{5n}
Now we can represent the actual area as a limit:
=2615x2dx=limnR(n)=limni=1n(2+4in)245n\begin{aligned} &\phantom{=}\displaystyle\int_2^6 {\dfrac15x^2\,}{dx} \\\\ &=\displaystyle\lim_{n\to\infty}R(n) \\\\ &=\displaystyle\lim_{n\to\infty}\sum_{i=1}^{n}\left(2+\dfrac{4i}{n}\right)^2\cdot\dfrac{4}{5n} \end{aligned}

By definition, the definite integral is the limit of the Riemann sum

The above example is a specific case of the general definition for definite integrals:
The definite integral of a continuous function ff over the interval [a,b][a,b], denoted by abf(x)dx\displaystyle\int_a^b f(x)dx, is the limit of a Riemann sum as the number of subdivisions approaches infinity. That is,
abf(x)dx=limni=1nΔxf(xi)\displaystyle\int_a^b {f(x)}{dx}=\lim_{n\to\infty}\sum_{i=1}^n \greenD{\Delta x} \cdot \goldD{f(\blueD{x_i})}
where Δx=ban\greenD{\Delta x}=\dfrac{b-a}{n} and xi=a+Δxi\blueD{x_i=a+\Delta x\cdot i}.

If we're asked to write a Riemann sum from a definite integral...

Imagine we've been asked to write the following definite integral as the limit of a Riemann sum.
π2πcos(x)dx\displaystyle \int_\pi^{2\pi} \cos(x)\,dx
First, let's find Δx\greenD{\Delta x}:
Δx=ban=2ππn=πn\begin{aligned} \greenD{\Delta x}&=\dfrac{ b- a}{n} \\\\ &=\dfrac{{2\pi}- \pi}{n} \\\\ &=\greenD{\dfrac{\pi}{n}} \end{aligned}
Now that we have Δx\greenD{\Delta x}, we can find xi\blueD{x_i}:
xi=a+Δxi=π+πni=π+πin\begin{aligned} \blueD{x_i}&= a+\greenD{\Delta x}\cdot i \\\\ &= \pi+\greenD{\dfrac{\pi}{n}}\cdot i \\\\ &=\blueD{\pi+\dfrac{\pi i}{n}} \end{aligned}
Therefore,
π2πcos(x)dx=limni=1nπncos(π+πin)\displaystyle \int_\pi^{2\pi} \cos(x)\,dx=\lim_{n\to\infty}\sum_{i=1}^n\greenD{\dfrac\pi n}\cdot \goldD{\cos\left(\blueD{\pi+\dfrac{\pi i}n}\right)}

Practice writing Riemann sums from definite integrals

Problem 1
03exdx=?\displaystyle \int_0^3 e^x\,dx=\,?
Choose 1 answer:
Choose 1 answer:
Problem 2
1elnxdx=?\displaystyle \int_1^e \ln x\,dx=\,?
Choose 1 answer:
Choose 1 answer:

Common mistake: Getting the wrong expression for Δx\Delta x

For example, in Problem 2, we can imagine how a student might define Δx\Delta x to be en\dfrac en or 1n\dfrac{1}{n} instead of e1n\dfrac{e-1}{n}. Another example is simply using dxdx for Δx\Delta x. Remember that dxdx is only used in the integral notation, not in the sum. It tells us that the integration is with respect to xx.

Another common mistake: Getting the wrong expression for xix_i

A student might forget to add aa to Δxi\Delta x\cdot i, resulting in a wrong expression. For example, in Problem 2, a student might define xix_i to be e1ni\dfrac{e-1}{n}\cdot i instead of 1+e1ni1+\dfrac{e-1}{n}\cdot i.

If we're asked to write a definite integral from the limit of a Riemann sum...

Imagine we're being asked to find a definite integral that's equivalent to this limit:
limni=1nln(2+5in)5n\displaystyle \lim_{n\to\infty} \sum_{i=1}^n \ln\left(2+\dfrac{5i}n\right)\cdot\dfrac5n
This means we need to find the interval of integration [a,b][\purpleC a,\purpleC b] and the integrand f(x)\goldD{f(x)}. Then, the corresponding definite integral will be abf(x)dx\displaystyle\int_{\purpleC a}^{\purpleC b} \goldD{f(x)}\,dx.
We know that every Riemann sum has two parts: a width Δx\greenD{\Delta x} and a height f(xi)\goldD{f(\blueD{x_i})} for each rectangle in the sum. Looking at this specific limit, we can make reasonable choices for both parts.
limni=1nln(2+5in)5n \displaystyle \lim_{n\to\infty} \sum_{i=1}^n \goldD{\ln\left(\blueD{2+\dfrac{5i}n}\right)}\cdot \greenD{\dfrac5n}
Rectangles of uniform width: The expression 5n\greenD{\dfrac5n} is a reasonable choice for the width of our rectangles, Δx\greenD{\Delta x}, because it doesn't depend on the index ii. This means that Δx\greenD{\Delta x} will be the same for each term in the sum, which is what we'd expect from a Riemann sum where each rectangle has the same width.
Rectangles of varying height: The expression ln(2+5in)\goldD{{\ln\left(\blueD{2+\dfrac{5i}n}\right)}} depends on ii, which makes it a good choice to represent the height, f(xi)\goldD{f(\blueD{x_i})}. The most natural choice for xi\blueD{x_i} is 2+5in\blueD{2+\dfrac{5i}n}, so let's go with that, which means that the function we're integrating is f(x)=ln(x)\goldD{f(x)}=\goldD{\ln(x)}.
To figure out the bounds of integration, aa and bb, let's think back to the general definitions of Δx\greenD{\Delta x} and xi\blueD{x_i} in relation to the definite integral.
As defined above, xi=a+Δxi \blueD{x_i}=\purpleC a+\greenD{\Delta x}\cdot i~. In this specific problem, xi=2+5in\blueD{x_i} = \blueD{2+\dfrac{5i}n}, which can be written as 2+5ni\purpleC 2 + \greenD{\dfrac{5}{n}}i, so a\purpleC a must equal 2\purpleC 2.
As defined above, Δx=ban \greenD{\Delta x}=\dfrac{b-a}{n}~. In this specific problem, Δx=5n\greenD{\Delta x}=\dfrac5n. Both denominators are nn, so the numerators must be equal: ba=5b-a=5. We already know a=2\purpleC{a=2}, so we can conclude that b=7\purpleC{b=7}.
Putting everything together, here's a definite integral that equals the limit of the Riemann sum:
27ln(x)dx\displaystyle \int_{ \purpleC 2}^{ \purpleC 7}\goldD{\ln(x)}\,dx

Practice writing definite integrals from Riemann sums

Problem 3.A
Problem set 3 will walk you through the steps of finding the definite integral that is represented by this expression:
limni=1n(3+4in)24n\displaystyle \lim_{n\to\infty} \sum_{i=1}^n \left(3+\dfrac{4i}{n}\right)^2\cdot\dfrac4n
What is Δx\Delta x in this expression?
Choose 1 answer:
Choose 1 answer:

Common struggle: Difficulty finding Δx\Delta x in the Riemann sum expression

When the summed expression is elaborate and includes many fractions, it can be hard to identify which part of it is Δx\Delta x.
Remember that Δx\Delta x must be a factor of the summed expression, in the form kn\dfrac{k}{n}, where kk doesn't contain the summation index ii.

Another common struggle: Difficulty finding the limits of integration

Notice how in Problem set 3, the fact that Δx=4n\Delta x=\dfrac4n told us that ba=4b-a=4. This is helpful, but without finding aa we will not know what aa and bb are. We were able to find aa by using the fact that xi=3+4inx_i=3+\dfrac{4i}{n}.
A common mistake is to immediately assume that if, for example, Δx=4n\Delta x=\dfrac4n, then the limits of integration are [0,4][0,4].

One last common struggle: General difficulty analyzing the expression

Some students simply don't know where to begin.
Begin with the summed expression. You should be able to identify two factors: One of the form kn\dfrac{k}{n} (where kk doesn't contain the summation index ii) and one that is a function of ii. The first will give you Δx\greenD{\Delta x} and the other will give you f(xi)\blueD{f(\goldD{x_i})}.
Problem 4
limni=1n4+5in5n=?\displaystyle \lim_{n\to\infty} \sum_{i=1}^n \sqrt{4+\dfrac{5i}n}\cdot\dfrac5n=\,?
Choose 1 answer:
Choose 1 answer:
Want more practice? Try this exercise.
Loading