In algebra, a cubic function is a function of the form
where a is nonzero.
Setting f(x) = 0 produces a cubic equation of the form:
The solutions of this equation are called roots of the polynomial f(x). If all of the coefficients a, b, c, and d of the cubic equation are real numbers then there will be at least one real root (this is true for all odd degree polynomials). All of the roots of the cubic equation can be found algebraically. (This is also true of a quadratic or quartic (fourth degree) equation, but no higher-degree equation, by the Abel–Ruffini theorem). The roots can also be found trigonometrically. Alternatively, numerical approximations of the roots can be found using root-finding algorithms like Newton's method.
The coefficients do not need to be complex numbers. Much of what is covered below is valid for coefficients of any field with characteristic 0 or greater than 3. The solutions of the cubic equation do not necessarily belong to the same field as the coefficients. For example, some cubic equations with rational coefficients have roots that are non-rational (and even non-real) complex numbers.