# Double Infinite Integration

4 messages
Open this post in threaded view
|

## Double Infinite Integration

 Hello all, I need to perform the following integration where the integrand is the product of three functions: f(x)g(y)z(x,y) the limits of x are(0,inf) and the limits of y are(-inf,inf). Could this be done using R? I tried using the function integrate 2 times, but it didn't work: z<- function(x,y) { } f<-function(x){ rr<-"put here the function in x" *integrate(function(y) z(x, y), -Inf,Inf)\$value return(rr) } rr2<-integrate(function(x) f(x), 0, Inf)\$value print(rr2)    I didn't get any output at all!!! Thanks, Aya -- Best Regards Faculty of Economics & Political Science Cairo University Tel:(202)35728055-(202)35728116-(202)35736608-(202)35736605 Fax:(202)35711020 Follow us on twitter:https://twitter.com/fepsnews        [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: Double Infinite Integration

 > -----Original Message----- > I need to perform the following integration where the integrand is the > product of three functions: > f(x)g(y)z(x,y) > > the limits of x are(0,inf) and the limits of y are(-inf,inf). > > Could this be done using R? I tried using the function integrate 2 times, but it > didn't work: > z<- function(x,y) { > > > } ..... > >    I didn't get any output at all!!! The function z() you provided is not doing anything; it is defined in your post as z<-function(x,y){} Surprised you didn't get at least NULL, though. ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}} ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.