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

平方項係數

$ O $

平方項係數為%v

$ 二次函數的圖形 $

t = 4 (slider from 1 to 14, step 1)
List_1: {-5, -4, -3, -2, -1, -0.5, -0.1, 0.1, 0.5, 1, 2, 3, 4, 5}
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.7 * Corner[1] + 0.3 * 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])
α = 3 (slider from -5 to 7, step 1)
β = -1 (slider from -5 to 5, step 1)
a = Element(List_1, t)
f_1(x) = a * (x - α) * (x - β)
A_1, B_1 = Root(f_1)
C_1 = Extremum(f_1)
n = 0 (slider from 0 to 3, step 1)
h = 3 (slider from -5 to 5, step 1)
k = 1 (slider from -5 to 5, step 1)
f_2(x) = a * (x - h)^(2) + k
A_2 = Extremum(f_2)
text4: "$ " + (LaTeX[A_2]) + " $"
b = 0 (slider from -5 to 5, step 1)
c = 2 (slider from -5 to 5, step 1)
f_3(x) = a * x^(2) + b * x + c
text2: "$( " + (LaTeX[FractionText[x(C_1)]]) + " ," + (LaTeX[FractionText[y(C_1)]]) + ")$"
text3: "$f(x)=" + (LaTeX[If[abs(a) ≠ 1, FractionText[a], If[a ≟ -1, "-", ""]]]) + "\;x² " + (LaTeX[If[b ≟ 0, "", If[b ≟ 1, "+x", If[b ≟ -1, "-x", If[b > 0, "+" * abs(b) * "x", -abs(b) * "x"]]]]]) + "" + (LaTeX[If[c > 0, "+" * c, If[c < 0, "-" * abs(c), ""]]]) + "$"
A_3 = Extremum(f_3)
text6: "$ " + (LaTeX[B_1]) + " $"
text7: "$ " + (LaTeX[A_1]) + " $"
text8: "$( " + (LaTeX[FractionText[x(A_3)]]) + " ," + (LaTeX[FractionText[y(A_3)]]) + ")$"
text1: "$ y=f(x)=" + (LaTeX[FractionText[a]]) + " " + (LaTeX[If[α > 0, "(x-" * α * ")", If[α < 0, "(x+" * abs(α) * ")", "x"]]]) + "" + (LaTeX[If[β > 0, "(x-" * β * ")", If[β < 0, "(x+" * abs(β) * ")", "x"]]]) + "$
$\;\;\;=" + (LaTeX[If[abs(a) ≠ 1, FractionText[a], If[a ≟ -1, "-", ""]]]) + "\;x²" + (LaTeX[If[a * (α + β) > 0, "-", If[a * (α + β) < 0, "+", ""]]]) + "" + (LaTeX[If[α + β ≟ 0, "", If[abs(a * (α + β)) ≠ 1, FractionText[abs((α + β) * a)], ""]]]) + "\;" + (LaTeX[If[α + β ≟ 0, "", "x"]]) + "" + (LaTeX[If[a * α * β < 0, "-", If[a * α * β > 0, "+", ""]]]) + "" + (LaTeX[If[α * β ≠ 0, FractionText[abs(α * β * a)], ""]]) + "$"
text5: "$ y=f(x)=" + (LaTeX[If[abs(a) ≠ 1, FractionText[a], If[a ≟ -1, "-", a]]]) + "\;" + (LaTeX[If[h ≠ 0, "(", ""]]) + "x" + (LaTeX[If[h > 0, "-", If[h < 0, "+", ""]]]) + "" + (LaTeX[If[h ≠ 0, abs(h), ""]]) + "" + (LaTeX[If[h ≠ 0, ")", ""]]) + "² " + (LaTeX[If[k > 0, "+", If[k < 0, "-", ""]]]) + "" + (LaTeX[If[k ≠ 0, abs(k), ""]]) + "$"