This function computes the vector of roots, roots=(x1, x2, x3}, of third order polynom P(x):
The process to get the roots derives from CARDAN's method
available at the following
link.
To sum up:
The discriminant of the second order polynom derives:
The first root derives:
In case where a roots has no assigned value, its default value is 0.
function rootsPolyOrder3 extends Modelica.Icons.Function; input Real a "Polynom coefficients"; input Real b "Polynom coefficients"; input Real c "Polynom coefficients"; input Real d "Polynom coefficients"; output Real roots[3]; end rootsPolyOrder3;