Consider having a cubic of the form
f(x) = a x^3 + b x^2 + c x + d
and you want to know if this cubic has a local minimum and if so, where that minimum is.
Then do the following in your code (make sure that a
isn't equal to zero):
// Calculate the discriminant of the derivative of the cubic.