3.5.2.1.44 Integral

Description

Minimum Origin Version Required: 8.6 SR0

This function performs one dimension integration, and returns the integral value of: $\int_{LowerLimit}^{UpperLimit} f(t, arg1, arg2, ...)dt$

And the function is called as the below form:

integral(integrandName, LowerLimit, UpperLimit [, arg1, arg2, ...])

Where integrandName here is the function name of the integrand $f(t, arg1, arg2, ...)$, LowerLimit and UpperLimit can be used "-inf" and "+inf" as negative infinity and positive infinity respectively.

Syntax

double Integral(integrandName, LowerLimit, UpperLimit [, arg1, arg2, ...])

Parameters

integrandName

The name of the defined function to be integrated.

LowerLimit

The lower limit of integral, "-inf" can be used as negative infinity.

UpperLimit

The upper limit of integral, "+inf" can be used as positive infinity.

arg1, arg2, ...

The arguments defined in the integrand.

Return

Return the integral value of specified integrand.

Example

// define quadratic equation as integrand
function double QuadraticEq(double x, double a, double b, double c) {
return a+b*x+c*x^2;
}

// integrate quadratic equation
Integral(QuadraticEq, 1, 4, 1, 2, 3) = ;  // should return 81
Integral(QuadraticEq, -inf, +inf, 1, 2, 3) = ; // should return --, missing value