I received the solution... Hi:
This is what David means: f <- function(x, p) x^p integrate(f, lower = -1, upper = 1, p = 2) 0.6666667 with absolute error < 7.4e-15 integrate(f, lower = -1, upper = 1, p = 3) 0 with absolute error < 5.6e-15 # this is correct -- View this message in context: http://r.789695.n4.nabble.com/integrate-one-single-variable-functions-with-constant-parameters-tp3336066p3336702.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.