powered by
simp(f, a, b, tol=1e-8, max.step=1000, ...) trap(f, a, b, tol=1e-8, max.step=1000, ...)
f
a
b
tol
integrate
f <- function(x) x*x*(1-x)*sin(x*x) I1 <- trap(f,0,2) I2 <- simp(f,0,2)
Run the code above in your browser using DataLab