Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

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?



  • Prev by Date: Re: Coordinates from an ImplicitPlot
  • Next by Date: Re: Writing a program to hunt for a prime between n^2 and (n+1)^2
  • Previous by thread: RE: Coordinates from an ImplicitPlot
  • Next by thread: Re: Problem with NIntegrate -- Monte Carlo