#include #include #include "opt.h" #define Debug 0 #define Static static /******************************************************** Trapezoid Integral ********************************************************/ /* */ /* integral of function f over [a,b] */ /* function f should have the following form: */ /* dbl f(dbl x) */ /* */ extern dbl TrapezoidIntegral(f, a, b, n) dbl (*f)(); dbl a, b; int n; { int i; dbl delta, x, sum; delta = (b-a)/n; sum = 0; for (i=0, x=a; i