三次函數的圖形(2)
Author: 藍邦偉　老師

三次函數的圖形

$  f(x)=ax³+bx²+cx+d$

$ f'(x)=3a(x-\alpha)(x-\beta),\alpha<\beta $

f'(x)=3ax²+2bx+c

⇒f'(x)=3a(x-\alpha)²

n=

n=

ZoomIn

s = 0.4 (slider from 0 to 1, step 0.1)
k: Random[-5, 4] + s * 0
b: Random[-4, 4] + s * 0
c: Random[-4, 4] + s * 0
a = If(k ≟ 0, 5, k)
d: Random[-4, 4] + s * 0
D: b^(2) - 3 * a * c
f(x) = a * x^(3) + b * x^(2) + c * x + d
u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
t = If(k ≟ 0, 5, k)
text1: "" + (LaTeX[If[a > 0, "x越大導致y越大，故a>0", "x越大導致y越小，故a<0"]]) + ""
A, B = Extremum(f)
C = TurningPoint(f)
text4: "Δ=b²-3ac" + (LaTeX[If[D > 0, ">0", If[D < 0, "<0", "=0"]]]) + ""
p: x(A) + x(B)
q: x(A) * x(B)
text8: "\left\lbrace \begin{array}{ll} \alpha+\beta=-  \frac{2b}{3a}" + (LaTeX[If[p > 0, ">0", If[p < 0, "<0", "=0"]]]) + "⇒b" + (LaTeX[If[b > 0, ">0", If[b < 0, "<0", "=0"]]]) + "\\ \alpha\beta=\frac{c}{3a}" + (LaTeX[If[q > 0, ">0", If[q < 0, "<0", "=0"]]]) + "  ⇒c" + (LaTeX[If[q > 0, ">0", If[q < 0, "<0", "=0"]]]) + "\\ \end{array}  \right.\"
r: x(C)
text9: "⇒f''(x)=6ax+2b" + (LaTeX[If[r > 0, ">0", If[r < 0, "<0", "=0"]]]) + ""
text11: "⇒f'(0)=c" + (LaTeX[If[c > 0, ">0", If[c < 0, "<0", "=0"]]]) + ""
n = 2
inputBox1 = Textfield(n)
text10: "⇒x=-\frac{2b}{3a}⇒b" + (LaTeX[If[b > 0, ">0", If[b < 0, "<0", "=0"]]]) + ""
text2: "f(0)=" + (LaTeX[If[d > 0, "d>0", If[d < 0, "d<0", "d=0"]]]) + ""
text14: "⇒f''(x)=6ax+2b=0⇒x=-\frac{2b}{3a}=\alpha" + (LaTeX[If[r > 0, ">0", If[r < 0, "<0", "=0"]]]) + ""
text15: "⇒b" + (LaTeX[If[b > 0, ">0", If[b < 0, "<0", "=0"]]]) + ""