nombre de subdivisions :

Cf

n = 4 (slider from 2 to 200, step 1)
f = Function(x^(2), 0, 1)
a = LowerSum(f, 0, 1, n)
b = Segment((1, f(1)), (1, f((n - 1) / n)))
A: (round(n / 2) / n, -0.05)
B: (x(A) + 1 / n, -0.05)
l = Segment(A, B)
C: (0, f(round(n / 2) / n))
D: (0, f((round(n / 2) + 1) / n))
T2: "\frac{i}{" + n + "}"
c = Segment(C, D)
d = Segment((x(A), f(x(A))), C)
e = Segment((x(B), f(x(B))), D)
T3: "\frac{i+1}{" + n + "}"
T4: "f\left(\frac{i+1}{" + n + "}\right)"
T5: "f\left(\frac{i}{" + n + "}\right)"
T1: "Somme des aires des rectangles=" + a
E: (x(A), 0)
F: (x(B), 0)
g = Segment(A, E)
h = Segment(B, F)
T8: "\frac{1}{" + n + "}"