 
 
 
 
 
 
Problem with NIntegrate -- Monte Carlo
- To: mathgroup at smc.vnet.net
- Subject: [mg39179] Problem with NIntegrate -- Monte Carlo
- From: "Alan Lewis" <alanlewis at optioncity.net>
- Date: Sun, 2 Feb 2003 01:13:43 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
I have a rather complicated function that Mathematica can't seem to handle
with
NIntegrate, Method->MonteCarlo.
This is not my function, but it shows the essence of the problem.
Suppose we have
   ComplicatedF[x_] :=  Re [NIntegrate [E^(- (I x+y+I)^2), {y,0,1}] ]
Then, if you try:
NIntegrate[ComplicatedF[x], {x,0,2}, Method->MonteCarlo]
Mathematica will complain that the integrand is not numerical.
But of course it is numerical and removing the Method->MonteCarlo option
will generate an answer.
Now my actual function is quite complicated which is why
I want to try the MonteCarlo method. Any suggestions?

