Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*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 2000

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

Search the Archive

Need help with ideas to make NIntegrate a little faster for multiple variables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23031] Need help with ideas to make NIntegrate a little faster for multiple variables
  • From: "Don Taylor" <psu04033 at odin.pdx.edu>
  • Date: Thu, 13 Apr 2000 02:43:21 -0400 (EDT)
  • Organization: Portland State University
  • Sender: owner-wri-mathgroup at wolfram.com

I'm finding probabilities of a Gaussian ball that has been
sliced by some hyperplanes.  Calculations are taking a LONG time.

Would anyone have any advice on how I might find solutions
to problems like the following in a more reasonable amount
of time that it seems to take in the current form?

NIntegrate[
   Exp[-x^2/2-y^2/2-z^2/2
       -r1^2/(2*(1/8)^2)-r2^2/(2*(1/8)^2)
       -r3^2/(2*(1/8)^2)-r4^2/(2*(1/8)^2)]/
     ((2*Pi)^(3/2)*(2*Pi*(1/8)^2)^2),
   {x,-5,5},{y,-5,5},{z,-5,5},
   {r1,-10,y-x},{r2,z-y,10},{r3,y-x,10},{r4,z-y,10}]

The surface is about as smooth as could be expected for a problem.

The real bounds of integration are infinity but I would be able to use
results that have 4 good digits in an answer and thus I have been using
bounds of +/-5 or +/-10 instead of Infinity.  But that doesn't seem to
be able to give results in a few hours (on a 360 Mhz machine with lots
of free memory and nothing else soaking up cycles)

I have tried setting NumPoints->10000000 which gives perhaps 10 points
per dimension plus some spares for the algorithm to use as it sees fit.
But Version 3 claims that it sees an error when NumPoints is set and thus
reverts to not using the compiled version I think.  The calculations
continue, but slowly, in either case.

Does anyone have any ideas about what I might do to get answers with a
handful of good digits in a plausible amount of time?  I believe I have
reduced the problem down to the simplest possible form.  But I am still
left with sixty four such integrals to evaluate, to at least give me
eight good points to plot on a graph.

(Would upgrading to version 4 make a dramatic change in this particular
situation?)

Many Thanks
Don





  • Prev by Date: Re: Speeding up Inverting matrices.
  • Next by Date: Re: Speeding up Inverting matrices.
  • Previous by thread: Re: join/problem
  • Next by thread: Re: Help! Mathematica on my 500MHz outperforms my GHz machine!