勘根定理
Author: 藍邦偉  老師

$ O $

$伸縮變量%v$

$平移變量%v$

$第%v步$

$ 勘根定理 $

$ (a,f(a)) $

$ (b,f(b)) $

$ α_1 $

$ α_2 $

$ α_3 $

$ α_4 $

$ α_5 $

$ A $

$ B $

$ f(x)為一實係數多項式，\;$
$若f(a)\cdot f(b)<0 ，\;則在$
$(a,b)之間，\;f(x)=0至$
$少有一實根.$
$若f(a)\cdot f(b)<0，\;則$
$f(x)=0在(a,b)之間有奇$
$數個實根$
$若f(a)\cdot f(b)>0，\;則$
$f(x)=0在(a,b)之間有偶$
$數個實根$

u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
Q_2: 0.75 * Corner[1] + 0.25 * Corner[2]
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
O = (0, 0)
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])
a = 1.5 (slider from -5 to 5, step 0.1)
k = -0.5 (slider from -5 to 5, step 0.1)
n = 0 (slider from 0 to 4, step 1)
A_1 = (-1, 1)
A_2 = (1.5793243615749477, -1.1232259864364031)
A_3 = (3.107171686874011, -2.1736210225795087)
A_4 = (7.175065190482767, -1.8871496490859345)
A_5 = (5, 1)
A_6 = (-2, -1)
f(x) = a * Polynomial[{A_1, A_2, A_3, A_4, A_5, A_6}] + k
B_1, B_2, B_3, B_4, B_5 = Roots(f, x(Q_2), x(Corner[2]))
A = Point(u)
B = Point(u)
L_1: x = x(A)
L_2: x = x(B)
C = Intersect(f, L_1)
D = Intersect(f, L_2)