der_y = Polynomial.derivativeValue(p, x, i);
Evaluate an i
-th derivative of a polynomial p
at a given Real abszissa value x
.
import Modelica_LinearSystems2.Math.Polynomial; x = Polynomial.x(); p1 = -6*x^2 + 4*x -3; Polynomial.derivativeValue(p1, 1, 2); // = -12.0
Polynomial.evaluate, Polynomial.integralValue.
encapsulated function derivativeValue import Modelica_LinearSystems2.Math.Polynomial; import Modelica.Utilities.Streams.print; input Polynomial p "Polynomial"; input Real x "Abszissa value"; input Integer i(min = 1) = 1 "i-th derivative to be evaluated; i=1 is first derivative"; output Real der_y "Value of i-th derivative of polynomial at x"; end derivativeValue;