f(x) = ((((-1 / 16 * (x + 4)) * (x + 1)) * (x - 1)) * (x - 2)) + 2
A, B = Intersect(f, xAxis)
n = 13 (slider from 1 to 25, step 1)
integraal = Integral(f, x(A), x(B))
d: x(B - A) / n
vs = Sequence(f(k), k, x(A), x(B), d)
riemann = Sum((vs * d))
rts = Sequence(Polygon[{(x(A) + (k * d) - d, 0), (x(A) + (k * d), 0), (x(A) + (k * d), vs(k)), (x(A) + (k * d) - d, vs(k))}], k, 1, n)
tekst1: "Riemanni summa pindala arvutamiseks.
Integraal = " + integraal + "
Riemanni summa = " + riemann + ""