線性函數的性質
Author: 藍邦偉  老師

$ O $

$ P $

$ B $

$ A $

$ Q $

$ 設f(x)=mx+k $

1

$ 法一 $

2

$ 法二 $

u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
O = (0, 0)
Q_2: 0.55 * Corner[1] + 0.45 * Corner[2]
Q_3: (x(Q_2), y(Corner[4]))
poly1, q_1, q_2, q_4, q_3 = Polygon(Corner[1], Q_2, Q_3, Corner[4])
C = (20, 40)
D = (70, 60)
B = DynamicCoordinates(D, floor(x(D)), floor(y(D)))
A = DynamicCoordinates(C, floor(x(C)), floor(y(C)))
a: x(A)
b: x(B)
c: y(A)
d: y(B)
k_a = Segment((x(A), 0), (x(B), 0))
P_{ref} = Point(k_a)
P = DynamicCoordinates(P_{ref}, floor(x(P_{ref})), 0)
k_1 = Segment(A, (x(A), 0))
k_2 = Segment(B, (x(B), 0))
k_3 = Segment(A, (0, y(A)))
k_4 = Segment(B, (0, y(B)))
k_5 = Segment(A, B)
L_1 = OrthogonalLine(P, u)
Q = Intersect(k_5, L_1)
k_6 = Segment(P, Q)
k_7 = Segment((0, y(Q)), Q)
n = 0 (slider from 0 to If[e ≟ true, 5, 2], step 1)
Title: "$線性函數的性質$
$ 某次考試，\;班上同學最高分為" + (LaTeX[Max[a, b]]) + "分，\;最低分為$
$" + (LaTeX[Min[a, b]]) + "分，\;藍老師決定用一個線型函數來調整分數$
$，\;使" + (LaTeX[Max[a, b]]) + "分變成" + (LaTeX[Max[c, d]]) + "分，\;" + (LaTeX[Min[a, b]]) + "分變成" + (LaTeX[Min[c, d]]) + "分，\;小明原考$
$" + (LaTeX[x(P)]) + "分，\;調整後應變為幾分？ $
$Sol：$"
t_2: "$⇒ \left\lbrace\begin{array}{ll} f(" + (LaTeX[a]) + ")  =" + (LaTeX[a]) + "\;m+k=" + (LaTeX[c]) + "\\ f(" + (LaTeX[b]) + ") =" + (LaTeX[b]) + "\;m+k=" + (LaTeX[d]) + " \\ \end{array}   \right.\ $"
t_3: "$ ⇒" + (LaTeX[b - a]) + "\;m=" + (LaTeX[d - c]) + " ⇒m=" + (LaTeX[FractionText[(b - a) / (d - c)]]) + "\;,\;k=" + (LaTeX[FractionText[c - a * (d - c) / (b - a)]]) + "$"
k: c - a * (d - c) / (b - a)
m: (b - a) / (d - c)
t_4: "$ ⇒f(x)=" + (LaTeX[FractionText[m]]) + "\;x" + (LaTeX[If[k > 0, "+", If[k < 0, "-", ""]]]) + " " + (LaTeX[If[k ≠ 0, FractionText[abs(k)], ""]]) + "$"
t_5: "$⇒ f(" + (LaTeX[x(P)]) + ") =" + (LaTeX[y(Q)]) + "$"
text1: "$ \frac{x-" + (LaTeX[c]) + "}{" + (LaTeX[d]) + "-" + (LaTeX[c]) + "} =\frac{" + (LaTeX[x(P)]) + "-" + (LaTeX[a]) + "}{" + (LaTeX[b]) + "-" + (LaTeX[a]) + "}$"
text2: "$ ⇒x=" + (LaTeX[c]) + " +\frac{" + (LaTeX[x(P) - a]) + "}{" + (LaTeX[b - a]) + "}=" + (LaTeX[y(Q)]) + "$"
e = true
f = false