functionintegralValue

Evaluate integral of polynomial from x_low to x_high

Information

Syntax

integral = Polynomial.integralValue(p, x_high, x_low);

Description

Calculate value of integral of a polynomial p at a given range between x_low and x_high.

Example

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

See also

Polynomial.evaluate, Polynomial.derivativeValue.

Inputs

TypeNameDefaultDescription
PolynomialpPolynomial to be integrated
Realx_highHigh integrand value
Realx_low0Low integrand value, default 0

Outputs

TypeNameDefaultDescription
Realintegral0.0Integral of polynomial p from x_low to x_high