dichotomie2
Author: Stéphane Fossé

n = 2 (slider from 0 to 10, step 1)
A = Point(xAxis)
a: x(A)
B = Point(xAxis)
b: x(B)
taille: abs(b - a) / 2.0^(n)
L1 = Sequence(a + k * taille, k, 0.0, 2.0^(n))
C_f(x) = x^(2.0) - 5.0 * x + 4.0
D = Intersect(C_f, xAxis, (0.9999999999998735, 3.7925218521195347E-13))
C = Intersect(C_f, xAxis, (0.9999999999998735, 3.7925218521195347E-13))
L7 = Sequence(If[C_f(Element[L1, k]) * C_f(Element[L1, k + 1.0]) < 0.0, Segment[(Element[L1, k], 0.0), (Element[L1, k + 1.0], 0.0)]], k, 1.0, 2.0^(n) + 1.0)
ListeA = Sequence(If[C_f(Element[L1, k]) * C_f(Element[L1, k + 1.0]) < 0.0, Segment[(Element[L1, k], 0.0), (Element[L1, k], C_f(Element[L1, k]))]], k, 1.0, 2.0^(n) + 1.0)
liste1 = Sequence(If[C_f(Element[L1, k]) * C_f(Element[L1, k + 1.0]) < 0.0, Segment[(Element[L1, k + 1.0], 0.0), (Element[L1, k + 1.0], C_f(Element[L1, k + 1.0]))]], k, 1.0, 2.0^(n) + 1.0)