Date: 22 3 月 2013

Input f(x)

Tangent Line

Extremum

f'(x)

f''(x)

d = 4 (slider from -10 to 10, step 1)
c = 3 (slider from -10 to 10, step 1)
b = -2 (slider from -10 to 10, step 1)
a = -1 (slider from -10 to 10, step 1)
D_1 = (-0.3, 1.14)
C_1 = (1.3, 1.26)
B_1 = (-2.54, 1.94)
A_1 = (0.46, -0.44)
A = DynamicCoordinates(A_1, floor(x(A_1)), floor(y(A_1)))
B = DynamicCoordinates(B_1, floor(x(B_1)), floor(y(B_1)))
D = DynamicCoordinates(D_1, floor(x(D_1)), floor(y(D_1)))
C = DynamicCoordinates(C_1, floor(x(C_1)), floor(y(C_1)))
f(x) = a * x^(3) + b * x^(2) + c * x + d
text1: "f(x)=" + (LaTeX[f]) + ""
E, F = Extremum(f)
a_1 = false
G = Point(f)
L = Tangent(G, f)
text2: "" + (LaTeX[L]) + ""
b_1 = false
c_1 = false
f' = Derivative(f)
H, I = Root(f')
d_1: x = x(H)
d_2: x = x(I)
g_1 = false
h_1 = false
f'' = Derivative(f')
J = TurningPoint(f)
i: x = x(J)
K = Intersect(f'', xAxis)
text5: "$f''(x)=" + (LaTeX[f'']) + "=0$
$⇒x=" + (LaTeX[x(J)]) + "$"
v = 2 (slider from 1 to 2, step 1)
f_1 = Function(f, x(Corner[1]), Min[x(E), x(F)])
f_2 = Function(f, Min[x(E), x(F)], Max[x(E), x(F)])
f_3 = Function(f, Max[x(E), x(F)], x(Corner[2]))
g_4 = Function(f', x(Corner[1]), Min[x(H), x(I)])
g_2 = Function(f', Min[x(I), x(H)], Max[x(I), x(H)])
g_3 = Function(f', Max[x(I), x(H)], x(Corner[2]))
h_5 = Function(f, x(Corner[1]), x(J))
h_2 = Function(f, x(J), x(Corner[2]))
h_3 = Function(f'', x(Corner[1]), x(J))
h_4 = Function(f'', x(J), x(Corner[2]))
list2 = Coefficients(f')
Delta: Element[list2, 2]^(2) - 4 * Element[list2, 1] * Element[list2, 3]
text4: "$f'(x)=" + (LaTeX[f']) + "=0$
$⇒" + (LaTeX[If[Delta > 0, "x=" + (x(H)) + "," + (x(I)), If[Delta ≟ 0, "x=" + (x(H)), "x無實根"]]]) + "$
$" + (LaTeX[If[Delta > 0, "⇒f(" + (x(H)) + ")=" + (f(x(H))) + ",f(" + (x(I)) + ")=" + (f(x(I))), If[Delta ≟ 0, "⇒f(" + (x(H)) + ")=" + (f(x(H))), "⇒f(x)無極值"]]]) + "$"