有範圍限制的二次函數
Author: 藍邦偉　老師

α

β

$ 有範圍限制的二次函數 $

$ B $

$ V $

$ A $

a = -1 (slider from -5 to 5, step 1)
b = 1 (slider from -7 to 7, step 1)
c = 5 (slider from -7 to 7, step 1)
G: y = a * x^(2) + b * x + c
α = 2.2 (slider from -5 to 5, step 0.1)
β = -1.2 (slider from -5 to 5, step 0.1)
d: x = Max[α, β]
e: x = Min[α, β]
B = Intersect(G, e)
A = Intersect(G, d)
K = (-5, 0)
K_2 = (5, 0)
K_3 = (0, -5)
K_4 = (0, 5)
C = Intersect(d, xAxis)
D = Intersect(e, xAxis)
u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
Q_1 = Corner(1)
Q_4 = Corner(4)
Q_2: (7.5 * Corner[1] + 2.5 * Corner[2]) / 10
Q_3: (7.5 * Corner[4] + 2.5 * Corner[3]) / 10
多邊形1, t_1, t_2, t_3, t_4 = Polygon(Q_1, Q_2, Q_3, Q_4)
f: x = -(b / (2 * a))
M: (4 * a * c - b^(2)) / (4 * a)
p: y(B)
q: y(A)
h = Function(a * x^(2) + b * x + c, Min[α, β], Max[α, β])
V = Extremum(h)
text1: "$A\;" + (LaTeX[B]) + " $
$B\;" + (LaTeX[A]) + "$
$V\;" + (LaTeX[V]) + "$"
t_{Fcn}: "$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), "-" * abs(b) * "x"]]]]]]) + "" + (LaTeX[If[c ≟ 0, "", If[c > 0, "+" * abs(c), If[c < 0, "-" * abs(c)]]]]) + "$
$觀察f(x)的圖形，\;判斷$
$f(x)的最大值與最小值$"