Riemann Sum Approximation Examples for Beginners
Riemann sums approximate the area under a curve. Understanding how these approximations work is necessary for developing a deeper understanding of integration. In this article, we will explore several Riemann sum approximation examples to show how left, right, and middle Riemann sums estimate the area under a curve.
Each method uses rectangles to approximate the area over a given interval, but the location of the sample points determines the height of each rectangle. We will work through examples of each method, showing how to divide an interval into subintervals, calculate their widths, and evaluate the corresponding function values.
Finally, we will connect Riemann sums to the definition of the definite integral. By allowing the number of subintervals to approach infinity, we can move from an approximation of the area under a curve to its exact value. We will demonstrate this process by evaluating a definite integral directly from its definition, including the use of summation formulas and limits.
By the end of this article, you will understand how to calculate Riemann sums and how they form the foundation of definite integration.
Understanding the Riemann Sum Formula
A Riemann sum approximates the area under a curve by dividing an interval into smaller subintervals and calculating the area of a rectangle over each subinterval. The sum of these rectangular areas approximates the total area.
The general Riemann sum formula is
$$\sum_{i = 1}^{n}f(x_i^*)\Delta x.$$
Where \( n \) represents the number of subintervals, \( \Delta x \) represents the width of each subinterval, and \( x_i^* \) represents the sample point selected within the \( i \)-th subinterval.
Calculating the Width of Each Subinterval
To calculate a Riemann sum, we first determine the width of each rectangle. When an interval is divided into \( n \) equal subintervals, the width is calculated using:
$$\Delta x = \frac{b – a}{n}$$
Where \( a \) is the left endpoint of the interval, \( b \) is the right endpoint of the interval, and \( n \) is the number of subintervals.
Identifying the Sample Points
Once the width of each subinterval has been determined, we need to identify the sample points used to calculate the height of each rectangle.
The sample points depend on the type of Riemann sum being calculated:
- Left Riemann sums use the left endpoint of each subinterval.
- Right Riemann sums use the right endpoint of each subinterval
- Middle Riemann sums use the midpoint of each subinterval.
Calculating the Area of Each Rectangle
The area of a rectangle is calculated by multiplying its width by its height:
$$A = \text{width} \times \text{height}$$
For a Riemann sum, the width is \( \Delta x \), and the height is determined by evaluating the function at the selected sample point.
Therefore, the area of each rectangle is
$$A_i = f(x_i^*)\Delta x.$$
Adding the areas of all \( n \) rectangles gives the Riemann sum
$$R_n = \sum_{i = 1}^{n}f(x_i^*)\Delta x.$$
The resulting value approximates the area under the curve over the given interval.
In the following sections, we will apply this formula to calculate left, right, and middle Riemann sums.
Left Riemann Sums
To calculate a left Riemann sum, we evaluate the function at the left endpoint of each subinterval and multiply each function value by the width of the subinterval. Adding these rectangular areas approximates the area under the curve.
The formula for a left Riemann sum is
$$L_n = \sum_{i = 0}^{n – 1}f(a + i\Delta x)\Delta x.$$
Where \( L_n \) represents the left Riemann sum, \( a \) is the left endpoint of the interval, \( n \) is the number of subintervals, and \( \Delta x \) is the width of each subinterval.
Example
Example 1: Approximate the area under the curve of the function \( f(x) = x^2 + 1 \), on the interval \( [0,4] \) using a left Riemann sum with four equal subintervals.
Solution: The length of the subintervals is
$$\Delta x = \frac{4 – 0}{4}.$$
Subtracting gives
$$\Delta x = \frac{4}{4}.$$
Dividing we obtain
$$\Delta x = 1.$$
The subintervals are then
$${[0,1],[1,2],[2,3],[3,4]}.$$
The first endpoint is
$$x_0^* = 0.$$
Consider the function
$$f(x) = x^2 + 1.$$
Evaluating the function at \( x_0^* = 0 \) we obtain
$$f(0) = 0^2 + 1.$$
Squaring we find
$$f(0) = 0 + 1.$$
Adding gives
$$f(0) = 1.$$
The second endpoint is
$$x_1^* = 1.$$
Evaluating the function at \( x_1^* = 1 \) we obtain
$$f(1) = 1^2 + 1.$$
Squaring we find
$$f(1) = 1 + 1.$$
Adding gives
$$f(1) = 2.$$
The third endpoint is
$$x_2^* = 2.$$
Evaluating the function at \( x_2^* = 2 \) we obtain
$$f(2) = 2^2 + 1.$$
Squaring we find
$$f(2) = 4 + 1.$$
Adding gives
$$f(2) = 5.$$
The fourth endpoint is
$$x_3^* = 3.$$
Evaluating the function at \( x_3^* = 3 \) we obtain
$$f(3) = 3^2 + 1.$$
Squaring we find
$$f(3) = 9 + 1.$$
Adding gives
$$f(3) = 10.$$
The left Riemann sum is then
$$L_4 = 1(1) + 1(2) + 1(5) + 1(10).$$
Multiplying gives
$$L_4 = 1 + 2 + 5 + 10.$$
Adding we arrive at a final answer of
$$L_4 = 18.$$
Because the function \( f(x) = x^2 + 1 \) is increasing over the interval, the left Riemann sum underestimates the actual area. This occurs because the height of each rectangle is determined by the function value at the left endpoint, which is smaller than the function values at the remaining points in each subinterval. For a review of increasing and decreasing functions, please refer to the article How to Find Intervals of Increase and Decrease: A Step-by-Step Guide.
In the next section, we will use the right endpoints of each subinterval to calculate a right Riemann sum.
Right Riemann Sums
To calculate a right Riemann sum, we evaluate the function at the right endpoint of each subinterval and multiply each function value by the width of the subinterval. Adding the areas of the rectangles approximates the area under the curve.
The formula for a right Riemann sum is
$$R_n = \sum_{i =1}^{n}f(a + i\Delta x)\Delta x.$$
Where \( R_n \) represents the right Riemann sum, \( a \) is the left endpoint of the interval, \( n \) is the number of subintervals, and \( \Delta x \) is the width of each subinterval.
Example
Example 2: Approximate the area under the curve of the function \( f(x) = x^2 +1 \), on the interval \( [0,4] \) using a right Riemann sum with four equal subintervals.
Solution: The length of the subintervals is
$$\Delta x = \frac{4 – 0}{4}.$$
Subtracting gives
$$\Delta x = \frac{4}{4}.$$
Dividing we obtain
$$\Delta x = 1.$$
The subintervals are then
$${[0,1],[1,2],[2,3],[3,4]}.$$
The first endpoint is
$$x_1^* = 1.$$
Consider the function
$$f(x) = x^2 + 1.$$
Evaluating the function at \( x_1^* = 1 \) we obtain
$$f(1) = 1^2 + 1.$$
Squaring we find
$$f(1) = 1 + 1.$$
Adding gives
$$f(1) = 2.$$
The second endpoint is
$$x_2^* = 2.$$
Evaluating the function at \( x_2^* = 2 \) we obtain
$$f(2) = 2^2 + 1.$$
Squaring we find
$$f(2) = 4 + 1.$$
Adding gives
$$f(2) = 5.$$
The third endpoint is
$$x_3^* = 3.$$
Evaluating the function at \( x_3^* = 3 \) we obtain
$$f(3) = 3^2 + 1.$$
Squaring we find
$$f(3) = 9 + 1.$$
Adding gives
$$f(3) = 10.$$
The fourth endpoint is
$$x_4^* = 4.$$
Evaluating the function at \( x_4^* = 4 \) we obtain
$$f(4) = 4^2 + 1.$$
Squaring we find
$$f(4) = 16 + 1.$$
Adding gives
$$f(4) = 17.$$
The right Riemann sum is then
$$R_4 = 1(2) + 1(5) + 1(10) + 1(17).$$
Multiplying gives
$$R_4 = 2 + 5 + 10 + 17.$$
Adding we arrive at a final answer of
$$R_4 = 34.$$
Because the function \( f(x) = x^2 + 1 \) is increasing over the interval, the right Riemann sum overestimates the actual area. This occurs because the height of each rectangle is determined by the function value at the right endpoint, which is greater than the function values at the remaining points in each subinterval.
In the next section, we will explore middle Riemann sums, which use the midpoint of each subinterval to determine the height of each rectangle.
Middle Riemann Sums
To calculate a middle Riemann sum, we evaluate the function at the midpoint of each subinterval and multiply each function value by the width of the subinterval. Adding the areas of the rectangles approximates the area under the curve.
The formula for a middle Riemann sum is
$$M_n = \sum_{i = 1}^{n}f(a + (i – \frac{1}{2})\Delta x)\Delta x.$$
Where \( M_n \) represents the middle Riemann sum, \( a \) is the left endpoint of the interval, \( n \) is the number of subintervals, and \( \Delta x \) is the width of each subinterval.
Example
Example 3: Approximate the area under the curve of the function \( f(x) = x^2+1 \), on the interval \( [0,4] \) using a middle Riemann sum with four equal subintervals.
Solution: The length of the subintervals is
$$\Delta x = \frac{4 – 0}{4}.$$
Subtracting gives
$$\Delta x = \frac{4}{4}.$$
Dividing we obtain
$$\Delta x = 1.$$
The subintervals are then
$${[0,1],[1,2],[2,3],[3,4]}.$$
The first midpoint is
$$x_1^* = \frac{0 + 1}{2}.$$
Adding gives
$$x_1^* = \frac{1}{2}.$$
Consider the function
$$f(x) = x^2 + 1.$$
Evaluating the function at \( x_1^* = \frac{1}{2} \) we obtain
$$f(\frac{1}{2}) = (\frac{1}{2})^2 + 1.$$
Squaring we find
$$f(\frac{1}{2}) = \frac{1}{4} + 1.$$
Obtaining a common denominator, we get
$$f(\frac{1}{2}) = \frac{1}{4} + \frac{4}{4}.$$
Adding gives
$$f(\frac{1}{2}) = \frac{5}{4}.$$
The second midpoint is
$$x_2^* = \frac{1 + 2}{2}.$$
Adding gives
$$x_2^* = \frac{3}{2}.$$
Evaluating the function at \( x_2^* = \frac{3}{2} \) we obtain
$$f(\frac{3}{2}) = (\frac{3}{2})^2 + 1.$$
Squaring we find
$$f(\frac{3}{2}) = \frac{9}{4} + 1.$$
Obtaining a common denominator, we get
$$f(\frac{3}{2}) = \frac{9}{4} + \frac{4}{4}.$$
Adding gives
$$f(\frac{3}{2}) = \frac{13}{4}.$$
The third midpoint is
$$x_3^* = \frac{2 + 3}{2}.$$
Adding gives
$$x_3^* = \frac{5}{2}.$$
Evaluating the function at \( x_3^* = \frac{5}{2} \) we obtain
$$f(\frac{5}{2}) = (\frac{5}{2})^2 + 1.$$
Squaring we find
$$f(\frac{5}{2}) = \frac{25}{4} + 1.$$
Obtaining a common denominator, we get
$$f(\frac{5}{2}) = \frac{25}{4} + \frac{4}{4}.$$
Adding gives
$$f(\frac{5}{2}) = \frac{29}{4}.$$
The fourth midpoint is
$$x_4^* = \frac{3 + 4}{2}.$$
Adding gives
$$x_4^* = \frac{7}{2}.$$
Evaluating the function at \( x_4^* = \frac{7}{2} \) we obtain
$$f(\frac{7}{2}) = (\frac{7}{2})^2 + 1.$$
Squaring we find
$$f(\frac{7}{2}) = \frac{49}{4} + 1.$$
Obtaining a common denominator, we get
$$f(\frac{7}{2}) = \frac{49}{4} + \frac{4}{4}.$$
Adding gives
$$f(\frac{7}{2}) = \frac{53}{4}.$$
The middle Riemann sum is then
$$M_4 = 1(\frac{5}{4}) + 1(\frac{13}{4}) + 1(\frac{29}{4}) + 1(\frac{53}{4}).$$
Multiplying gives
$$M_4 = \frac{5}{4} + \frac{13}{4} + \frac{29}{4} + \frac{53}{4}.$$
Adding we obtain
$$M_4 = \frac{100}{4}.$$
Dividing, we arrive at a final answer of
$$M_4 = 25.$$
For this example, the middle Riemann sum provides a closer approximation to the actual area than either the left or right Riemann sum. This is because the midpoint method uses the function value at the center of each subinterval rather than at either endpoint.
These three methods show how the choice of sample points affects the accuracy of a Riemann sum approximation. As the number of subintervals increases, the approximations generally become more accurate. In the next section, we will explore how taking the limit as the number of subintervals approaches infinity leads to the definition of the definite integral.
Definition of the Definite Integral Using Riemann Sums
Riemann sums approximate the area under a curve using rectangles. As the number of subintervals increases, their widths become smaller, and the rectangular areas approach the exact area under the curve.
This leads to the definition of the definite integral. A definite integral represents the limit of a Riemann sum as the number of subintervals approaches infinity. For a review of limits, please refer to the article How to Calculate Limits in Calculus: Everything You Need to Know.
The definition of the definite integral is
$$\int_a^b f(x)dx = \lim_{n\to\infty}\sum_{i = 1}^{n}f(x_i^*)\Delta x.$$
Where \( a \) is the lower limit of integration, \( b \) is the upper limit of integration, \( n \) is the number of subintervals, \( \Delta x \) is the width of each subinterval, and \( x_i^* \) is the sample point selected within each subinterval.
As \( n \) approaches infinity, the width of each rectangle approaches zero, and the Riemann sum approaches the exact value of the definite integral.
Example
Example 4: Evaluate the following definite integral using the definition of the definite integral: $$\int_0^4 x^2 + 1 dx.$$
Solution: We will use a right Riemann sum. The length of the subintervals is
$$\Delta x = \frac{4 – 0}{n}.$$
Subtracting gives
$$\Delta x = \frac{4}{n}.$$
The subintervals are then
$${[0, \frac{4}{n}],[\frac{4}{n},\frac{8}{n}],[\frac{8}{n},\frac{12}{n}],…}.$$
The endpoints are thus
$$x_i^* = \frac{4i}{n}.$$
The definite integral is
$$I = \lim_{n \to \infty} \sum_{i =1}^n ((\frac{4i}{n})^2 + 1)\frac{4}{n}.$$
Squaring gives
$$I = \lim_{n \to \infty} \sum_{i =1}^n ((\frac{16i^2}{n^2} + 1)\frac{4}{n}.$$
Distributing we get
$$I = \lim_{n \to \infty} \sum_{i =1}^n (\frac{64i^2}{n^3} + \frac{4}{n}).$$
Using the sum rule, we find
$$I = \lim_{n \to \infty} (\sum_{i =1}^n \frac{64i^2}{n^3} + \sum_{i =1}^n \frac{4}{n}).$$
This is equivalent to
$$I = \lim_{n \to \infty} (\frac{64}{n^3}\sum_{i =1}^n i^2 + \frac{4}{n}\sum_{i =1}^n 1).$$
Evaluating the sums, we obtain
$$I = \lim_{n \to \infty} (\frac{64}{n^3}\frac{n(n + 1)(2n+1)}{6} + \frac{4}{n}(n)).$$
Multiplying gives
$$I = \lim_{n \to \infty} (\frac{32(n + 1)(2n+1)}{3n^2} + 4).$$
Expanding the numerator, we get
$$I = \lim_{n \to \infty} (\frac{32(2n^2 + n + 2n + 1)}{3n^2} + 4).$$
This is equivalent to
$$I = \lim_{n \to \infty} (\frac{32(2n^2 + 3n + 1)}{3n^2} + 4).$$
Distributing we find
$$I = \lim_{n \to \infty} (\frac{64n^2 + 96n + 32}{3n^2} + 4).$$
Splitting up the fraction gives
$$I = \lim_{n \to \infty} (\frac{64n^2}{3n^2} + \frac{96n}{3n^2} + \frac{32}{3n^2} + 4).$$
Simplifying this is
$$I = \lim_{n \to \infty} (\frac{64}{3} + \frac{32}{n} + \frac{32}{3n^2} + 4).$$
This is equivalent to
$$I = \lim_{n \to \infty} \frac{64}{3} + \lim_{n \to \infty} \frac{32}{n} + \lim_{n \to \infty} \frac{32}{3n^2} + \lim_{n \to \infty} 4.$$
Taking the limits, we get
$$I = \frac{64}{3} + 0 + 0 + 4.$$
Obtaining a common denominator, we get
$$I = \frac{64}{3} + 0 + 0 + \frac{12}{3}.$$
Adding we arrive at a final answer of
$$I = \frac{76}{3}.$$
The result demonstrates how a definite integral can be evaluated directly from the definition using the limit of a Riemann sum. Rather than approximating the area with a finite number of rectangles, we allow the number of subintervals to approach infinity to obtain the exact value.
Conclusion
Riemann sums approximate the area under a curve by dividing an interval into smaller subintervals and calculating the areas of corresponding rectangles. As demonstrated by the Riemann sum approximation examples in this article, the choice of sample points determines whether we use a left, right, or middle Riemann sum.
Left Riemann sums use the left endpoint of each subinterval, while right Riemann sums use the right endpoint. Middle Riemann sums use the midpoint of each subinterval to determine the height of each rectangle. Although these methods can produce different approximations, increasing the number of subintervals generally improves their accuracy.
Riemann sums also provide the foundation for understanding definite integrals. By taking the limit of a Riemann sum as the number of subintervals approaches infinity, we obtain the exact value of a definite integral. This connection demonstrates how the process of approximating areas with rectangles leads to one of the fundamental concepts of calculus.
Further Reading
Basic Integration Problems for Beginners – Practice evaluating integrals and applying fundamental integration rules through worked examples.
How to Use the Midpoint Rule to Approximate Definite Integrals – Learn how to approximate definite integrals using the midpoint rule and explore additional applications of Riemann sums.
Frequently Asked Questions
Support The Math Perimeter
If you enjoyed this article, please consider supporting The Math Perimeter on Buy Me a Coffee, so I can keep making more content like it.
