integral = Polynomial.integralValue(p, x_high, x_low);
Calculate value of integral of a polynomial p
at a given range between x_low
and x_high
.
import Modelica_LinearSystems2.Math.Polynomial; x = Polynomial.x(); p1 = -6*x^2 + 4*x -3; Polynomial.integralValue(p1, 2); // = -14.0 Polynomial.integralValue(p1, 2, -2); // = -44.0
Polynomial.evaluate, Polynomial.derivativeValue.
encapsulated function integralValue import Modelica_LinearSystems2.Math.Polynomial; input Polynomial p "Polynomial to be integrated"; input Real x_high "High integrand value"; input Real x_low = 0 "Low integrand value, default 0"; output Real integral = 0.0 "Integral of polynomial p from x_low to x_high"; end integralValue;