線性函數
Author: 藍邦偉  老師

線性函數

的線性函數(直線)為

$ A $

$ B $

D = (5.736291172209455, 7.1389775624722995)
B = DynamicCoordinates(D, floor(x(D)), floor(y(D)))
C = (-4.57663565917822, -3.982806275298722)
A = DynamicCoordinates(C, floor(x(C)), floor(y(C)))
A_2 = (-5, -3)
B_2 = (3, 5)
a = Line(A, B)
u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
Q_2: 0.3 * Corner[2] + 0.7 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
poly1, b, q_2, q_3, c = Polygon(Corner[1], Q_2, Q_3, Corner[4])
text1: "通過A" + (LaTeX[A]) + ",B" + (LaTeX[B]) + "兩點"
A2 = 0
B2 = 0
q_1: (x(A) * y(B) - x(B) * y(A)) / (x(A) - x(B))
text3: "$" + (LaTeX[If[x(A) ≟ x(B), "未定義", If[y(A) ≟ y(B), "f(x)=" * y(A), "f(x)=" * If[Slope[a] ≟ 1, "x", If[Slope[a] ≟ -1, "-x", FractionText[Slope[a]] * "x"]]]]]) + " " + (LaTeX[If[x(A) ≠ x(B), If[y(A) ≠ y(B), If[q_1 ≟ 0, "", If[q_1 > 0, "+" * FractionText[q_1], "-" * FractionText[abs(q_1)]]]]]]) + "$"