Riemann Sum Calculator

Type a function, an interval and a number of rectangles to estimate the area under the curve.

Use x. Type powers with ^, and functions with brackets: sin(x), e^(2x), ln(x), sqrt(x).

A number such as 0 or 1/2, pi, e, inf or -inf.

A number larger than the lower limit, pi, e, inf or -inf.

A whole number of equal intervals, 1 or more.

Method

Which end of each interval gives the height of the rectangle.

Try

Result

You entered∫02x2 dx≈L4\int_{0}^{2} x^{2}\,dx \approx L_{4}

S≈1.75\displaystyle S \approx 1.75

Exact integral

83≈2.666667\displaystyle \frac{8}{3} \approx 2.666667
Show the work
  1. Left Riemann sum

    Cut [0,2][0, 2] into 4 equal intervals and add up the areas of 4 rectangles; each rectangle is as tall as the curve at its left end.

    Using Δx=b−an\Delta x = \frac{b - a}{n}

    Sn=Δx∑f(xi)xi=a+i Δx, i=0,…,n−1\begin{gathered} S_n = \Delta x \sum f(x_i) \\ x_i = a + i\,\Delta x,\ i = 0, \ldots, n-1 \end{gathered}
  2. Width of each interval

    Divide the length of the interval by the number of rectangles.

    Δx=2−04=0.5\begin{aligned} \Delta x &= \frac{2 - 0}{4} \\ &= 0.5 \end{aligned}
  3. Heights

    Evaluate ff at each of the 4 points.

    xi: 0, 0.5, 1, 1.5f(xi): 0, 0.25, 1, 2.25\begin{gathered} x_i:\ 0,\ 0.5,\ 1,\ 1.5 \\ f(x_i):\ 0,\ 0.25,\ 1,\ 2.25 \end{gathered}
  4. Add up

    Multiply the sum of the heights by the width.

    S=0.5(0+0.25+1+2.25)=1.75\begin{aligned} S &= 0.5\left(0 + 0.25 + 1 + 2.25\right) \\ &= 1.75 \end{aligned}
  5. Result

    The left Riemann sum with 4 intervals.

    S≈1.75S \approx 1.75
02
Left Riemann sum of y = x^2 with 4 rectangles

Worked examples