|
Pinteg
Integral of a polynomial.
|
|
Loading LOADSUB ALL FROM "PDERIV.HTS"
or LOADSUB FROM "MATHLIB.HTS"
Usage INTEGER N
REAL A,B,P(*),Y
Y=FNPinteg(N,P(*),A,B)
Description
FNPinteg calculates the definite integral of the real polynomial function p(x) over the interval x (a,b). It does this by using the polynomial antiderivative function used by the Paderiv subroutine and returning the difference of the antiderivatives at the points b and a.
The first element in the array P represents the constant term in the polynomial; the second element represents the linear term; the third the quadratic term, etc. The interpretation of the elements in P is without regard to the OPTION BASE in effect or any lower bound specified when P was declared.
Errors
Pinteg causes an HTBasic error if n > 10 or if P contains fewer than n + 1 elements.
See Also
Paderiv
|
|