中間值定理
Author: 藍邦偉  老師

$ O $

$ 中間值定理 $

$ 已知函數f(x)在閉區間[a,b]上$
$連續，且f(a)≠f(b).若k為介於$
$f(a)與f(b)之間的實數.$
$則在(a,b)之中至少存在一實數$
$c，使得f(c)=k.$
$即\;y=f(x)的圖形 ，必定與水$
$平線y=k至少交於一點.$

$ (a,f(a))$

$ (b,f(b)) $

$ y=k $

$ c $

$ y=f(x) $

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])
A = (-2.163901585407758, -1.868051557519693)
B = (5.933689238677279, 4.472514842471417)
C = (1.4838339037437562, 1.0539564521147644)
D = (3.699212525427398, 1.2831335509096238)
f_1 = Function(Polynomial[{A, B, C, D}], x(A), x(B))
k = -1.868051557519693 (slider from If[y(A) < y(B), y(A), y(B)] to If[y(A) < y(B), y(B), y(A)], step 0.0010)
L_1: y = k
P: (5, k)
G_1, E, F = Intersect(f_1, L_1)
G_2: (x(G_1), 0)
a = Segment(G_1, G_2)