Command Palette

Search for a command to run...

Integrals

Riemann Sum

The Basic Idea of Riemann Sums

Imagine you have a plot of land with one side that is an irregular curve. How would you calculate its area? One of the most practical ways is to divide the land into several rectangular pieces of the same width, calculate the area of each piece, and then add them all up.

That's the basic idea behind a Riemann Sum. It is a method to approximate the area of a region under a curve by dividing it into multiple rectangles and summing up their areas. The more rectangles we use, the more accurate our area approximation becomes.

Key Components

To perform a Riemann Sum, we need to understand its main components:

  • Interval [a,b][a, b]: This is the left and right boundary of the region whose area we want to calculate.

  • Partitions (nn): This is the number of rectangles we will use to divide the region.

  • Subinterval Width (Δx\Delta x): This is the width of each rectangle. If we divide the interval evenly, its width is calculated by the formula:

    Δx=ban\Delta x = \frac{b-a}{n}
  • Sample Point (xix_i^*): This is a point in each subinterval whose height we will use to determine the height of the rectangle (f(xi)f(x_i^*)). There are several common ways to choose a sample point, such as the left endpoint, right endpoint, or midpoint.

The Riemann Sum Formula

If we combine all these components, we get the general formula for a Riemann Sum:

Rn=i=1nf(xi)ΔxR_n = \sum_{i=1}^{n} f(x_i^*) \Delta x

The sigma notation (\sum) simply means "sum up all the areas of the rectangles," where the area of each rectangle is its height (f(xi)f(x_i^*)) times its width (Δx\Delta x).

Visual Calculation Example

Let's apply this concept to an example.

Problem: Determine the Riemann Sum for the function f(x)=xf(x) = x on the interval [0,7][0, 7] by dividing it into 7 subintervals of equal length and using the left endpoint as the sample point.

Riemann Sum Visualization
Graph of the function f(x)=xf(x)=x with 7 rectangular partitions using the left endpoint.

Solution:

  1. Identify Components:

    • Function: f(x)=xf(x) = x
    • Interval: a=0,b=7a=0, b=7
    • Number of partitions: n=7n=7
  2. Calculate Subinterval Width (Δx\Delta x):

    Δx=707=1\Delta x = \frac{7 - 0}{7} = 1

    Each rectangle will have a width of 1.

  3. Determine the Sample Points (Left Endpoint):

    Our subintervals are:

    [0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7][0,1], [1,2], [2,3], [3,4], [4,5], [5,6], [6,7]

    For the left-endpoint method, we take the x-value from the left side of each subinterval as the sample point:

    x1=0,x2=1,x3=2,x4=3,x5=4,x6=5,x7=6x_1=0, x_2=1, x_3=2, x_4=3, x_5=4, x_6=5, x_7=6
  4. Calculate the Height of Each Rectangle:

    The height of each rectangle is determined by the function's value f(x)=xf(x) = x at the chosen sample points:

    f(x1)=f(0)=0f(x_1) = f(0) = 0
    f(x2)=f(1)=1f(x_2) = f(1) = 1
    f(x3)=f(2)=2f(x_3) = f(2) = 2
    f(x4)=f(3)=3f(x_4) = f(3) = 3
    f(x5)=f(4)=4f(x_5) = f(4) = 4
    f(x6)=f(5)=5f(x_6) = f(5) = 5
    f(x7)=f(6)=6f(x_7) = f(6) = 6
  5. Calculate the Riemann Sum:

    Now we can calculate the total area by summing the areas of all rectangles. Remember that the area of each rectangle is height times width:

    R7=i=17f(xi)ΔxR_7 = \sum_{i=1}^{7} f(x_i^*) \Delta x
    =[f(0)+f(1)+f(2)+f(3)+f(4)+f(5)+f(6)]1= [f(0) + f(1) + f(2) + f(3) + f(4) + f(5) + f(6)] \cdot 1
    =(0+1+2+3+4+5+6)1= (0 + 1 + 2 + 3 + 4 + 5 + 6) \cdot 1
    =21= 21

    Thus, the estimated area under the curve f(x)=xf(x)=x from 0 to 7 is 21.

Note that because the function f(x)=xf(x)=x is always increasing (monotonically increasing), using the left endpoint will always produce rectangles that are under the curve, resulting in an area approximation that is smaller than the actual area (an underestimate). Conversely, if we use the right endpoint on a monotonically increasing function, the result will always be an overestimate.

Exercises

  1. Calculate the Riemann Sum for the function f(x)=x2+1f(x) = x^2 + 1 on the interval [0,4][0, 4] using 4 subintervals of equal width and the right endpoint as the sample point.

Answer Key

  1. We will calculate the Riemann Sum for f(x)=x2+1f(x) = x^2+1 on [0,4][0,4] with n=4n=4.

    Riemann Sum Exercise Visualization
    Graph of the function f(x)=x2+1f(x)=x^2+1 with 4 rectangular partitions using the right endpoint.

    Step 1: Determine the main components.

    • Function: f(x)=x2+1f(x) = x^2 + 1
    • Interval: a=0,b=4a=0, b=4
    • Number of partitions: n=4n=4
    • Sample point: Right endpoint

    Step 2: Calculate the subinterval width.

    Δx=ban=404=1\Delta x = \frac{b-a}{n} = \frac{4-0}{4} = 1

    Step 3: Determine the right endpoint sample points.

    The subintervals are:

    [0,1],[1,2],[2,3],[3,4][0,1], [1,2], [2,3], [3,4]

    For the right-endpoint method, we take the x-value from the right side of each subinterval:

    x1=1,x2=2,x3=3,x4=4x_1=1, x_2=2, x_3=3, x_4=4

    Step 4: Calculate the height of each rectangle.

    The height of each rectangle is determined by the function's value f(x)=x2+1f(x) = x^2 + 1 at the right endpoint sample points:

    f(x1)=f(1)=12+1=2f(x_1) = f(1) = 1^2 + 1 = 2
    f(x2)=f(2)=22+1=5f(x_2) = f(2) = 2^2 + 1 = 5
    f(x3)=f(3)=32+1=10f(x_3) = f(3) = 3^2 + 1 = 10
    f(x4)=f(4)=42+1=17f(x_4) = f(4) = 4^2 + 1 = 17

    Step 5: Calculate the total Riemann Sum.

    Now we sum the areas of all rectangles (height × width):

    R4=i=14f(xi)ΔxR_4 = \sum_{i=1}^{4} f(x_i^*) \Delta x
    =[f(1)+f(2)+f(3)+f(4)]1= [f(1) + f(2) + f(3) + f(4)] \cdot 1
    =(2+5+10+17)1= (2 + 5 + 10 + 17) \cdot 1
    =34= 34

    Thus, the Riemann Sum for the function is 34.