coefficient directeur a

ordonnée à l'origine b

A_1

A_2

A_3

A_4

A_5

A_6

Fixer la droite passant par G

A_1

A_2

A_3

A_4

A_5

A_6

M_1 = (0.4, 8.5)
M_2 = (0.8, 6.5)
M_3 = (1.2, 3)
M_4 = (1.5, 1.5)
M_5 = (1.9, -1)
M_6 = (2, -2)
a_1 = Line(M_1, M_6)
b_1 = FitLineX({M_1, M_2, M_3, M_4, M_5, M_6})
a = -5 (slider from -10 to -1, step 0.1)
b = 11.2 (slider from 1 to 21, step 0.1)
G: (M_1 + M_2 + M_3 + M_4 + M_5 + M_6) / 6
c: y = a * x + b
Z_1: (0.4, c(0.4))
Z_2: (0.8, c(0.8))
Z_3: (1.2, c(1.2))
Z_4: (1.5, c(1.5))
Z_5: (1.9, c(1.9))
Z_6: (2, c(2))
d = Segment(M_1, Z_1)
e = Segment(M_2, Z_2)
f = Segment(Z_3, M_3)
g = Segment(M_4, Z_4)
h = Segment(M_5, Z_5)
i = Segment(Z_6, M_6)
E: d^(2) + e^(2) + f^(2) + g^(2) + h^(2) + i^(2)
texte1: "E=" + E + ""
j: y = a * (x - x(G)) + y(G)
k = false
J_1: (x(M_1), j(x(M_1)))
J_2: (x(M_2), j(x(M_2)))
J_3: (x(M_3), j(x(M_3)))
J_4: (x(M_4), j(x(M_4)))
J_5: (x(M_5), j(x(M_5)))
J_6: (x(M_6), j(x(M_6)))
l = Segment(M_1, J_1)
m = Segment(M_2, J_2)
n = Segment(J_3, M_3)
q = Segment(J_4, M_4)
r = Segment(J_5, M_5)
s = Segment(J_6, M_6)
Résidus: l^(2) + m^(2) + n^(2) + q^(2) + r^(2) + s^(2)
texte2: "E=" + Résidus + ""
texte3: "" + (LaTeX[j]) + ""