f(x) = If[x  <  2, 1,If[2 ≤ x  <  3, x - 1,2]]
n = 50 (slider from 1 to 50, step 1)
flächeninhalt = Integral(f, 0, 4)
integral: y = flächeninhalt
obersumme = UpperSum(f, 0, 4, n)
untersumme = LowerSum(f, 0, 4, n)
Obersummen = Sequence((i, UpperSum[f, 0, 4, i]), i, 1, n)
Untersummen = Sequence((i, LowerSum[f, 0, 4, i]), i, 1, n)