Ober- und Untersumme

c = Segment((0.1, -0.5), (2.0, -0.5))
D = Point(c)
C = (0, -0.5)
b = Segment(C, D)
a = Segment((-1.0, 0.0), (1.7, 0.0))
A = Point(a)
B = Point(a)
n: floor(exp(2.0 * b))
f(x) = x^(3.0) - x^(2.0) - x + 2.0
O = UpperSum(f, x(A), x(B), n)
U = LowerSum(f, x(A), x(B), n)
g = Function(f, -1.3, 1.8)
T1: "a = " + (x(A))
T2: "b = " + (x(B))
T3: "n = " + n
T6: "Különbség = " + (abs(O - U))
T4: "Alsó összeg = " + U
T5: "Felső összeg = " + O