二次函數的圖形(2)
Author: 藍邦偉　老師

.

/

2

f(x)=ax²+bx+c

f(x)=a(x-h)²+k

$ f(x)=a(x-α)(x-β) $

$ 二次函數的圖形 (2)$

a = 0.4 (slider from -5 to 5, step 0.1)
b = -1.5 (slider from -5 to 5, step 0.1)
c = 0 (slider from -10 to 10, step 0.1)
f(x) = a * x^(2) + b * x + c
A, B = Root(f)
d = false
u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
h = 0 (slider from -5 to 5, step 0.1)
k = 0 (slider from -5 to 5, step 0.1)
V: (h, k)
e = true
α = -2 (slider from -5 to 5, step 0.1)
β = 4 (slider from -5 to 5, step 0.1)
f_3(x) = a * (x - α) * (x - β)
C: (α, 0)
D: (β, 0)
g = false
Q_1 = Corner(1)
Q_4 = Corner(4)
Q_2: (7.2 * Corner[1] + 2.8 * Corner[2]) / 10
Q_3: (7.2 * Corner[4] + 2.8 * Corner[3]) / 10
多邊形1, t_1, t_2, t_3, t_4 = Polygon(Q_1, Q_2, Q_3, Q_4)
f_2(x) = a * (x - h)^(2) + k
i = Segment(Q_2, Q_3)
ba: b * a
ab: a * b
text5: "f(x)=" + (LaTeX[If[abs(a) ≠ 1, FractionText[a], If[a ≟ 1, "", "-"]]]) + "" + (LaTeX[If[h ≟ 0, "", "("]]) + "\;x" + (LaTeX[If[h > 0, "-", If[h < 0, "+", ""]]]) + "" + (LaTeX[If[h ≠ 0, FractionText[abs(h)], ""]]) + "" + (LaTeX[If[h ≟ 0, "", ")"]]) + "^2" + (LaTeX[If[k > 0, "+", If[k < 0, "-", ""]]]) + "" + (LaTeX[If[k ≠ 0, FractionText[abs(k)], ""]]) + ""
text6: "$f(x)=" + (LaTeX[If[abs(a) ≠ 1, FractionText[a], If[a ≟ 1, "", "-"]]]) + "\;" + (LaTeX[If[α ≠ 0, "(", ""]]) + "x" + (LaTeX[If[α > 0, "-", If[α < 0, "+"]]]) + "" + (LaTeX[If[α ≠ 0, FractionText[abs(α)], ""]]) + "" + (LaTeX[If[α ≠ 0, ")", ""]]) + "" + (LaTeX[If[β ≠ 0, "(", ""]]) + "x" + (LaTeX[If[β > 0, "-", If[β < 0, "+"]]]) + "" + (LaTeX[If[β ≠ 0, FractionText[abs(β)], ""]]) + "" + (LaTeX[If[β ≠ 0, ")", ""]]) + "$"
text4: "f(x)=" + (LaTeX[If[abs(a) ≠ 1, FractionText[a], If[a ≟ 1, "", "-"]]]) + "\;x²" + (LaTeX[If[b ≟ 0, "", If[(b > 0) ∧ (b ≠ 1), "+" * abs(b) * "x", If[b ≟ 1, "+x", If[b ≟ -1, "-x", If[(b < 0) ∧ (b ≠ -1), "-" * FractionText[abs(b)] * "x"]]]]]]) + "" + (LaTeX[If[c ≟ 0, "", If[c > 0, "+" * FractionText[abs(c)], If[c < 0, "-" * FractionText[abs(c)]]]]]) + ""