Namespaces

Types in MathNet.Numerics.RootFinding

Type Cubic

Namespace MathNet.Numerics.RootFinding

Finds roots to the cubic equation x^3 + a2*x^2 + a1*x + a0 = 0 Implements the cubic formula in http://mathworld.wolfram.com/CubicFormula.html

Static Functions

Public Static Functions

Tuple<double, double, double> RealRoots(double a0, double a1, double a2)

Find all real-valued roots of the cubic equation a0 + a1*x + a2*x^2 + x^3 = 0. Note the special coefficient order ascending by exponent (consistent with polynomials).

Tuple<Complex, Complex, Complex> Roots(double d, double c, double b, double a)

Find all three complex roots of the cubic equation d + c*x + b*x^2 + a*x^3 = 0. Note the special coefficient order ascending by exponent (consistent with polynomials).