## 1. Cubic Function

The general cubic equation results by equating to zero the general cubic polynomial
f (x) = ax3+bx2+cx+d.
The graph of such a function is given below. For genuine cubics with non-zero coefficient a, dividing through a and deleting the primes from b' = b/a, c' = c/a, d' = d/a leads to
x3 + bx2 +cx + d = 0.

## 2. Reduced cubic equation

The reduced cubic equation has the form
x3 + px - q = 0,
and results from the previous one by eliminating the quadratic term. This is done by translating the origin through the change of variable
x = x' - (b/3).
Introducing this into the equation of the previous section and doing the calculation gives                                                                p = (3c-b2)/3,
q = (9bc - 2b3 - 27d)/27.
The graph of the function f(x) = x3+p*x-q has a single inflection point at K=(0, -q), which is also a center of symmetry of the curve represented by the graph. Regarding the equation f(x)=0, we may assume that p<0, the function's relative minimum then occuring at sqrt(-p/3).  The condition that the equation x3+p*x-q =0 has only one real root is equivalent to the condition that the minimum at this point is greater than zero, this leading to the inequality
D = (p/3)3+(q/2)2 > 0.
Consequently the equation has three real roots only when
(p/3)3+(q/2)2 <= 0.
Substitution of the expressions for (p,q) results to the equation
(27*d2+(4*b3-18*b*c)*d+4*c3-b2*c2)<=0.

An interesting application of this inequality occurs in the problem of constructing a triangle from the so-called fundamental invariants, which are the numbers {s,r,R} (half-perimeter, inradius, circumradius), handled in Fundamental_Invariants.html .
In this case the side-lengths of the triangle appear as the three real solutions of a cubic equation (see section-4 of GIO_Cnstruction.html ). The coefficients of this cubic are
b = -2s,
c = (s2+r2+4Rr),
d = -4Rrs.
Substitution of these into the above inequality leads to the necessary condition for the three {s,r,R} in order to determine a triangle:

(64*r*R3-4*s2*R2+48*r2*R2-20*r*s2*R+12*r3*R+s4+2*r2*s2+r4)<=0.

The graph of the function  above depends on the position of the red point. The coordinates of this point serve to define the pair (p,q).