Click or drag to resize

CubicRealRoots Method

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).

Namespace: Altaxo.Calc.RootFinding
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntax
C#
public static (double , double , double ) RealRoots(
	double a0,
	double a1,
	double a2
)

Parameters

a0  Double
The constant coefficient.
a1  Double
The coefficient of the linear term.
a2  Double
The coefficient of the quadratic term.

Return Value

ValueTupleDouble, Double, Double
A tuple (x1, x2, x3) containing the real roots. Values may be NaN when fewer than three real roots exist.
See Also