C: float trapint(float f[],float r[],float dr[],int N)
Fortran: real function trapint(f,r,dr,N)
integer N
real f(N),r(N),dr(N)
which returns the result of using the trapezoidal rule to
perform the integral
from values at the N+1 points
.
As input to this routine, the user supplies the values
,
, and
in the arrays r, dr, and f,
respectively.