Skip to content
Prev 325473 / 398503 Next

problem with input of integrate function

On Jun 16, 2013, at 7:15 PM, David Winsemius wrote:

            
Can also use '..." argument:

?integrate

 integrand <- function(x,a)
 {
 exp(-0.5*a*(1+x^2))/(1+x^2)
 }
 
 integrate(integrand,0,Inf, a=2)
# 0.247085 with absolute error < 3e-05
David Winsemius
Alameda, CA, USA