Skip to content
Prev 314863 / 398506 Next

Integration in R

On Jan 8, 2013, at 10:51 AM, Naser Jamil wrote:

            
Multiply the function by the conditional expression:

 > f<-function(x) { 2/3 * (x[1] + x[2] )*(x[1] < x[2]) }
 > adaptIntegrate(f, lowerLimit = c(0, 0), upperLimit = c(7,7))
$integral
[1] 114.3333