integrand <- function(arg, weight) {
x <- arg[1]
y <- arg[2]
z <- arg[3]
ff <- sin(x)*cos(y)*exp(z);
return(ff)
} # end integrand
suave(3, 1, integrand, rel.tol=1e-3, abs.tol=1e-12,
flags=list(verbose=2, final=0))
Run the code above in your browser using DataLab