Dear,
I saw the CDF example "Cubic Equation" at the Wolfram site
http://demonstrations.wolfram.com/CubicEquation/. The author made available the Mathematica code in order the reader could learn a high level development. So I typed all the code (you can not copy because the code is in a .png file) and run to verify my typing. I verify many times but the code did not work well (it did not plot the zeros, inflection points and critical points). Bellow you can see the code and I ask you to help me to understand what happend.
Manipulate[
Plot[a3 x^3 + a2 x^2 + a1 x + a0, {x, -2, 2}, PlotRange -> 10,
PlotLabel -> TraditionalForm[a3 x^3 + a2 x^2 + a1 x + a0],
PlotStyle -> Thickness[.005],
Epilog -> {
PointSize[.015],
(*KEY*)
{RGBColor[1, .26, .0], Point[{1.2, 7}]},
Text[Style["zeros", 12, Italic], {1.3, 7}, {-1, 0}],
{RGBColor[.12, .61, .78], Point[{1.2, 6}]},
Text[Style["critical points", 12, Italic], {1.3, 6}, {-1, 0}],
{RGBColor[.67, .75, .15], Point[{1.2, 5}]},
Text[Style["inflection points", 12, Italic], {1.3, 5}, {-1, 0}],
(*zeros*)
RGBColor[1, .26, .0],
If[Flatten[#] === {}, {},
Point[{#, Function[x, a3 x^3 + a2 x^2 + a1 x + a0][#]}] & /@
{x /. #}] &[{ToRules[
Quiet@Reduce[a3 x^3 + a2 x^2 + a1 x + a0 == 0, x, Reals]]}],
(*critical points*)
RGBColor[.12, .61, .78],
If[Flatten[#] === {}, {},
Point[{#, Function[x, a3 x^3 + a2 x^2 + a1 x + a0][#]}] & /@
{x /. #}] &[{ToRules[
Quiet@Reduce[3 x^2 a3 + 2 a2 x + a2 x^2 + a1 == 0, x, Reals]]}],
(*inflection points*)
RGBColor[.67, .75, .15],
If[Flatten[#] === {}, {},
Point[{#, Function[x, a3 x^3 + a2 x^2 + a1 x + a0][#]}] & /@
{x /. #}] &[{ToRules[
Quiet@Reduce[6 x a3 + 2 a2 x + 2 a2 == 0, x, Reals]]}]
}, ImageSize -> {500, 400}], {a3, -5, 5}, {a2, -5, 5}, {a1, -5,
5}, {a0, -5, 5}]
Thank you,
Ana