Chapter 16: Plots and Calculations

As we have seen, the discriminant Δ of a real cubic

f(x) = (x^3) + ax + b

is given by

Δ = -4 (a^3)- 27  (b^2).

Here is a plot of the semicubical parabola  Δ = 0 . The regions Δ > 0 , respectively 
Δ < 0 , correspond to values of a and b for which f has three real roots, respectively one real root and a pair of complex conjugate roots. The package ImplicitPlot is used.

<< Graphics`ImplicitPlot`

disc  =  
        ImplicitPlot[-4 a^3 - 27  b^2 == 0, {a, -2, 0},  
          DisplayFunction -> Identity];
Show[disc, 
      Graphics[{Text[Δ  <  0, {-0.7, 0.7}], 
          Text[Δ  >  0, {-1.5, 0.25}],  
          Text["a", {-2, 0.1}],  Text["b", {0.1, 1.0}]}], 
      DisplayFunction -> $DisplayFunction]

Here is a demonstration showing how the discriminant controls the behavior of the roots of a 1-parameter family of real cubics. First choose a real cubic with two real critical points, for example  x^3 - 3x. .
Here is its graph:

Plot[x^3 - 3x,{x,-2,2}]

The critical values are 2 and -2. Any value greater than 2 is taken on 
at 1 real point and 2 complex conjugate points. A value between 2 and 
-2 is taken on at 3 real points and one less than -2 at 1 real and 2 
complex conjugate points. Equivalently one can look at the roots of  x^3 - 3x + a = 0. In the picture below they are plotted, in black, in the complex plane for  a  running from -3 to 3. The discriminant  -a^2 + 4  is also shown, in grey. One sees that when it is negative, for a between -2 and 2, there is a pair of complex conjugate roots and 1 real root. When it is positive, for a greater than 2 or less than -2 there are 3 real roots. And when it vanishes there is a double root.

Do[CubicRoots[f,x,PlotRange->{{-6,6},{-1,1}}],
									{a,-3,3,0.2}]

(This demonstration looks best when run cyclically).

Mathematica has a built-in function EulerPhi[n] which computes φ(n):

EulerPhi[105]

The function  Cyclotomic[n, x]  calculates the nth cyclotomic polynomial. Here is the example given in Remark 16.2:

Cyclotomic[105, x]