Ober- und Untersumme

f(x) = x³ - x² - x + 2
C = (0, -0.5)
s = Segment((-1, 0), (1.7, 0))
A = Point(s)
a: x(A)
B = Point(s)
b: x(B)
c = Segment((0.1, -0.5), (2, -0.5))
D = Point(c)
t = Segment(C, D)
n: floor(exp(2 t))
O = UpperSum(f, a, b, n)
U = LowerSum(f, a, b, n)
g = Function(f, -1.3, 1.8)
T1: "a = " + (x(A))
T2: "b = " + (x(B))
T3: "n = " + n
T4: "Untersumme = " + U
T5: "Obersumme = " + O
T6: "Differenz = " + (abs(O - U))