Save resource to class

Loading your classrooms…

Sign in to save

Bookmark this page so you can find it later.

LivePhysics staff accounts use their usual sign-in provider below.

Sign in to save

Bookmark this page so you can find it later.

LivePhysics staff accounts use their usual sign-in provider below.

Report an Error

Reported page · Tool

Riemann Sum & Integration Explorer

/tools/riemann-sum-explorer/

This helps us reproduce what you saw. Clear the link to leave it out.

or drop them here

Up to 3 images or PDFs, 5 MB per file. 0 of 3 attached.

Riemann Sum & Integration Explorer

Type a function, set an interval, and drag the slider to add rectangles. Watch how the Riemann sum converges toward the exact integral as you increase the number of subdivisions.

Graph

01xf(x)f(x) = x^2, n = 10

Parameters

Supports, x^n, sin, cos, tan, sqrt, abs, ln, e^x, pi, +, -, *, /

1100

Results

Left Riemann Sum
0.285
Exact Integral
0.333333
Absolute Error
0.0483333
Relative Error
14.5%
Number of Rectangles
10

Step-by-Step Calculation

1. Width of Each Rectangle

Δx=b−an\Delta x = \frac{b - a}{n}
Δx=1−010\Delta x = \frac{1 - 0}{10}
Δx=0.1\Delta x = 0.1

2. Sample Points (left endpoint)

xi=a+i⋅Δxx_i = a + i \cdot \Delta x
i=0,1,2,…,9i = 0, 1, 2, \ldots, 9
x0=0,  x1=0.1,  …x_0 = 0, \; x_1 = 0.1, \; \ldots

3. Riemann Sum

Sn=∑i=0n−1f(xi∗)⋅ΔxS_n = \sum_{i=0}^{n-1} f(x_i^*) \cdot \Delta x
S10=∑i=09f(xi∗)⋅0.1S_{10} = \sum_{i=0}^{9} f(x_i^*) \cdot 0.1
S10=0.285S_{10} = 0.285

4. Exact Integral

∫01f(x) dx\int_{0}^{1} f(x)\, dx
∫01(x2) dx\int_{0}^{1} (x^2)\, dx
=0.333333= 0.333333

5. Error

∣Exact−Approx∣|\text{Exact} - \text{Approx}|
∣0.333333−0.285∣|0.333333 - 0.285|
=0.0483333= 0.0483333

Reference Guide

Riemann Sums

A Riemann sum approximates the area under a curve by dividing the interval into n subintervals and summing the areas of rectangles.

Sn=∑i=0n−1f(xi∗)⋅ΔxS_n = \sum_{i=0}^{n-1} f(x_i^*) \cdot \Delta x

As n increases, the sum gets closer to the true area. The limit as n goes to infinity is the definite integral.

Methods Compared

Left uses the left endpoint of each subinterval. Right uses the right endpoint. Midpoint uses the center of each subinterval and is generally more accurate.

Trapezoidal connects the two endpoints with a straight line, forming a trapezoid instead of a rectangle. It averages the left and right sums.

The Definite Integral

The definite integral is the exact area under the curve, defined as the limit of Riemann sums.

∫abf(x) dx=lim⁡n→∞∑i=0n−1f(xi∗)Δx\int_a^b f(x)\, dx = \lim_{n \to \infty} \sum_{i=0}^{n-1} f(x_i^*) \Delta x

Error Estimates

For the midpoint and trapezoidal rules, the error decreases proportionally to 1/n21/n^2. Doubling the number of subintervals cuts the error roughly by a factor of four.

Left and right sums converge more slowly, with error proportional to 1/n1/n.

Related Content