Skip to content
Prev 274779 / 398503 Next

About an integral univariate problem

How about adding an additional argument to fun?

R> fun <- function(x, y) exp(-x)*sum(y^x)
R> y <- c(2,3,5)
R> integrate(fun, 0, 3, y)
[1] 346.853 with absolute error < 3.9e-12
Michael

On Tue, Oct 18, 2011 at 10:01 AM, Freddy Hernandez Barajas
<fhernanb at gmail.com> wrote: