二次函數的平移
Author: 藍邦偉  老師

$ O $

$ f_1(x)=x^2+$

1

Reset

$ f_2(x)=x^2-$

$ f_3(x)= (x-\;\;\;\;\;\;\;)²$

1

$ f_4(x)=(x+\;\;\;\;\;\;\;)² $

4

$ 二次函數的平移 $

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])
f(x) = x^(2)
k = 0
h = 0
t_f: "$ f(x)=" + (LaTeX[f]) + " $"
inputBox1 = Textfield(k)
f_1(x) = x^(2) + k
t = 0 (slider from 0 to 1, step 0.01)
n = 0 (slider from 0 to 4, step 1)
inputBox2 = Textfield(k)
f_2(x) = x^(2) - k
f_3(x) = (x - h)^(2)
s = 0 (slider from 0 to 1, step 0.01)
g_2 = Translate(f, Vector[s * Vector[(0, 0), (If[n ≟ 3, h, If[n ≟ 4, -h]], 0)]])
g_1 = Translate(f, Vector[t * Vector[(0, 0), (0, If[n ≟ 1, k, If[n ≟ 2, -k]])]])
inputBox3 = Textfield(h)
inputBox4 = Textfield(h)
f_4(x) = (x + h)^(2)
Main: "$f(x)向平移" + (LaTeX[If[n ≟ 1, "上", If[n ≟ 2, "下", If[n ≟ 3, "左", "右"]]]]) + " " + (LaTeX[If[n ≟ 1 ∨ n ≟ 2, k, h]]) + "單位，\;得f" + (LaTeX[If[n ≟ 1, "_1", If[n ≟ 2, "_2", If[n ≟ 3, "_3", If[n ≟ 4, "_4"]]]]]) + "(x)$"
a: n ≟ 0
f_0: f