Riemann Sums
Author: Jamie Mulholland

To approximate the area under a graph we split the region up into many thin rectangles. Drag the slider labeled n to increase the number of rectangles used.

The height of the approximating rectangle can be taken to be the height of the left endpoint, the height of the right endpoint, or the height of any point in the subinterval. Drag the slider labeled "position" to change the point used for the height of the rectangle.

The sum of the areas of all the thin rectangles is the Riemann Sum displayed.

If you wish to change the function f, say to sin(x), then just type f(x)=sin(x) in the input field at the bottom of the applet.

Soma, vértice esquerdo

Centro

Soma vértice direito

retângulos

Número de retângulos

área real

f(x)=

p = 0 (slider from 0 to 1, step 0.1)
B = Point(xAxis)
A = Point(xAxis)
f(x) = x^(2)
a: x(A)
n = 50 (slider from 1 to 80, step 1)
b: x(B)
c = LowerSum(f, a, b, n)
g(x) = f(a + (p * (b - a) / n) + (floor(((x - a) * n / (b - a)) + 1.0E-4) * (b - a) / n))
d = LowerSum(g, a, b, n)
T6: "a = " + a
T7: "b = " + b
LA = Segment(A, (a, f(a)))
LB = Segment(B, (b, f(b)))
e = true
L = Sequence(f(a + ((i - 1 + p) * (b - a) / n)), i, 1, n)
RS: (Sum[L] * (b - a) / n)
actualarea = Integral(f, a, b)
h = false
InputBox1 = Textfield(f)
T1: "posição=" + p + ""
text2: "Área real = " + actualarea + ""
T5: "Soma de Riemann = " + RS + ""