三次不等式的圖形
Author: 藍邦偉  老師

三次不等式的圖形

≥0

≤0

u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
a = 1 (slider from -5 to 5, step 0.1)
α = 3.2 (slider from -5 to 5, step 0.1)
β = 2 (slider from -5 to 5, step 0.1)
γ = -2.2 (slider from -5 to 5, step 0.1)
f(x) = a * (x - α) * (x - β) * (x - γ)
A, B, C = Intersect(f, b)
A_1 = Corner(1)
A_2 = Corner(2)
A_3: Corner[1] + (0, 3)
A_4: Corner[2] + (0, 3)
A_0: (4 * Corner[1] + Corner[4]) / 5
多邊形1, a_1, a_3, a_4, a_2 = Polygon(A_1, A_3, A_4, A_2)
w = Vector((x(Corner[1]), y(A_0)), (x(Corner[2]), y(A_0)))
P: (α, y(A_0))
Q: (β, y(A_0))
R: (γ, y(A_0))
c = Segment(A_3, A_4)
d = Segment(Q, R)
g = true
h = false
i = Segment(Q, P)
文字2: γ + "≤x≤" + β + "∨x≥" + α
e = Vector(P, (x(Corner[2]), y(A_0)))
文字3: "x≤" + γ + "∨" + β + "≤x≤" + α
j = Vector(R, (x(Corner[1]), y(A_0)))
文字1: "f(x)=" + (LaTeX[a]) + "(x" + (LaTeX[If[α < 0, "+", "-"]]) + "" + (LaTeX[abs(α)]) + ")(x" + (LaTeX[If[β < 0, "+", "-"]]) + "" + (LaTeX[abs(β)]) + ")(x" + (LaTeX[If[γ < 0, "+", "-"]]) + "" + (LaTeX[abs(γ)]) + ")"