Re: multidimensional numeric integration code?

From: Julian V. Noble (jvn_at_virginia.edu)
Date: 06/25/04


Date: Fri, 25 Jun 2004 12:07:17 -0400


"Steven G. Johnson" wrote:
>
> Hi, can anyone point me to free code for adaptive numeric
> multidimensional integration of a user-specified function over a simple
> "box" domain?
>
> Ideally, I'd like to support semi-infinite integration intervals in at
> least one dimension. e.g. by the QUADPACK trick of transforming f(x) to
> f(a + (1-t)/t)/t^2 and integrating from t=0..1 to get x=a..infinity (but
> with a now-singular integrand).
>
> I searched on Google, and I only found a Fortran ADAPT package by Alan
> Genz. However, I tested this out on a simple Gaussian integral of
> exp(-(x^2 + y^2 + ...)) and found it to be fairly unreliable for this
> kind of strongly-peaked function (which, unfortunately, is the kind of
> function I need to integrate). Integrating from x=0..10, y=0..10,
> etcetera it often misses the peak entirely and gives completely
> erroneous results. On the other hand, I tried the (1-t)/t
> transformation to get a semi-infinite integral, and ADAPT actually then
> seemed to work okay for this Gaussian integral test case, but I'm
> worried because of my problems above that it won't work well for my
> "real" cases.
>
> I also tried simply nesting one-dimensional integrals from QUADPACK, but
> got very poor performance. (Many iterations, and it spends way too much
> time integrating low-amplitude regions because the integrals for each
> dimension are independent.)
>
> I'd be grateful for any pointers to other possible codes to try. Thanks!
>
> Cordially,
> Steven G. Johnson

Try factoring out the Gaussians (or near-Gaussians) in the form

        f(x,y,z...) = exp( -ax^2 - by^2 - c z^2 ...) g(x,y,z...)

and using a Gaussian quadrature rule. Depending on what the slowly varying
part, g(x,y,z...) looks like, Gauss-Hermite rules of fairly low order should
work pretty well. At least that has been my experience.

-- 
Julian V. Noble
Professor Emeritus of Physics
jvn@lessspamformother.virginia.edu
    ^^^^^^^^^^^^^^^^^^
http://galileo.phys.virginia.edu/~jvn/
   "For there was never yet philosopher that could endure the 
    toothache patiently."  
        -- Wm. Shakespeare, Much Ado about Nothing. Act v. Sc. 1.


Relevant Pages

  • Re: double/triple numerical integration in Maxima
    ... I'm not familiar with the work of Steven Johnson, ... multidimensional integration are generally more efficient than ... linked into a C or Fortran program. ... The Maxima function "grind" prints ...
    (sci.math.symbolic)
  • Re: double/triple numerical integration in Maxima
    ... I'm not familiar with the work of Steven Johnson, ... multidimensional integration are generally more efficient than ... dimensional adaptive integrators: ... This makes the use of high-order rules for the outer ...
    (sci.math.symbolic)
  • Re: multidimensional numeric integration code?
    ... Steven G. Johnson wrote: ... can anyone point me to free code for adaptive numeric ... > multidimensional integration of a user-specified function over a simple ...
    (sci.math.num-analysis)
  • multidimensional numeric integration code?
    ... can anyone point me to free code for adaptive numeric ... I'd like to support semi-infinite integration intervals in at ... and I only found a Fortran ADAPT package by Alan ... seemed to work okay for this Gaussian integral test case, ...
    (sci.math.num-analysis)
  • Re: multidimensional numeric integration code?
    ... can anyone point me to free code for adaptive numeric ... >multidimensional integration of a user-specified function over a simple ... and I only found a Fortran ADAPT package by Alan ... >seemed to work okay for this Gaussian integral test case, ...
    (sci.math.num-analysis)