


![[top]](top.gif)
integrate(f,a,b) -- integrate f from a to b numerically, using Gaussian quadrature.
i1 : integrate(sin,0,pi) |
Code:
-- ../../../Macaulay2/m2/integrate.m2:106-114
integrate = (f,a,b) -> (
if class f != Function then error (
"'integrate' expected argument 1 to be a function");
try a = a + 0. else error (
"'integrate' expected argument 2 to be a number");
try b = b + 0. else error (
"'integrate' expected argument 3 to be a number");
gauss(f,a,b,4,6)
)



![[top]](top.gif)