Simpson's Rule
Write a function of the following form:
double simpint(double f[],double r[],double dr[],int N)
Return value:
- Simpson's rule approximation to
.
Input:
- f[]: values of
for
(
).
- r[]: values of
.
- dr[]: values of
.
- N: twice the number of integration intervals (i.e., the number
the number of sample points minus one.)
Tomas Arias
2005-01-27