從割線斜率到切線斜率
Author: 藍邦偉  老師

$ O $

$ P $

$ Q $

$ 從割線斜率到切線斜率 $

$ x_0 $

x

$ f(x) $

$ f(x_0) $

$ x_0+h $

$ f(x_0+h) $

$ 選擇函數f(x)上的點 $

$ 函數\;y=f(x) $

$ 在f(x)上任取P,Q兩點 $

$ 作割線\overleftrightarrow{PQ} $

$ 觀察直線\overleftrightarrow{PQ} 的斜率變化$

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.73 * Corner[1] + 0.27 * 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_1 = (-1.0562122745659357, 0.27093469789899155)
A_2 = (2.305051841092003, 3.9759644617492182)
A_3 = (4.4631361880769305, 2.6199999605463002)
A_4 = (7.595223204940011, 4.568005300302605)
f = Polynomial({A_1, A_2, A_3, A_4})
n = 0 (slider from 0 to 5, step 1)
s = 5 (slider from 0 to 5, step 0.01)
i = 1 (slider from -1 to 1, step 2)
P = Point(f)
Q: (x(P) + i * s, f(x(P) + i * s))
a = Line(P, Q)
b = Tangent(P, f)
a_1 = Segment(P, (x(P), 0))
a_2 = Segment(Q, (x(Q), 0))
a_3 = Segment(P, (0, y(P)))
a_4 = Segment(Q, (0, y(Q)))
c = 1 (slider from 1 to 2, step 1)
t_{m1}: "$" + (LaTeX[If[x(P) ≠ x(Q), "m_{\overline {PQ}}", "f'(x_0)"]]) + "=\lim_{ x \to x_0 }\frac{f(x)-f(x_0)}{x-x_0}$
$\;\;\;\;\;\;\;\;=" + (LaTeX[If[s ≠ 0, Slope[a], Slope[b]]]) + " $"
t_{m2}: "$ " + (LaTeX[If[x(P) ≠ x(Q), "m_{\overline{PQ}}", "f'(x_0)"]]) + " =\lim_{ h \to 0 }\frac{f(x+h)-f(x)}{h}$
$\;\;\;\;\;\;\;\;\;\;=" + (LaTeX[If[x(P) ≠ x(Q), Slope[a], Slope[b]]]) + "$"
A = (-7.0912092094972365, 1.7796839316318165)
B = (-6.728345469738708, 5.19824232198847)