MathGroup Archive 1990

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

Search the Archive

2D NIntegrate

  • To: mathgroup at yoda.ncsa.uiuc.edu
  • Subject: 2D NIntegrate
  • From: pkane at Kodak.COM (Paul Kane)
  • Date: Fri, 9 Nov 90 08:20:50 EST

Hello again,

I didn't get many replies to my 2D NIntegrate dilemma, but I did
get a couple that I thought others would find interesting. The problem,
in case you've deleted it from your memories, was that a two dimensional
numerical integration, involving Bessel functions, was taking a prohibitively
long time to execute.

Paul Abbott of wri suggested :

>  One suggestion (which I have not tried in the 2 dimensional case) is that the
>  option Method->DoubleExponential may help for rapidly oscillating functions
>  
>  DoubleExponential is a choice for the option Method
>     of NIntegrate. Method -> DoubleExponential causes
>     a doubly exponentially convergent algorithm to be
>     used.

This was interesting to me since this option is not in the Mathematica
book or the Reference Guide Updates (1.2) that I have. mma seemed to
know about the option, although unfortunately it did not have any impact
on the results.

A colleague of mine at Kodak offered this :

>  I was going to suggest that you simply generate a 2-D array of the bessel function, J1(x)/x and a vector representing the other function and simply 
>  
>  Apply[Plus, matrix . vector];

>  where matrix has the J1(x)/x values and vector has the other function. In a nut shell, this is what I do for hankel transforms. (NOTE the . means DOT PRODUCT)

In fact, I have done this in the past (at his suggestion) and it does run
in an acceptable length of time. Of course, one must be careful about integrands
that have singularities. Although this is not a very satisfying solution to the 
NIntegrate problem, it does get the job done, and
usually I am dealing with well-behaved functions.

Still another suggestion was to write a C or FORTRAN program. A good idea,
since specialized code in C or FORTRAN will probably run faster in any case.
But it would be nice to have mma do the job, since it would spare me the
time involved to write my own code. After all, that's why I bought mma
in the first place, among other reasons.

Thanks to all who responded.


Paul J. Kane
Eastman Kodak Co.
Photographic Research Labs
Rochester,NY 14650-1717
(716)-477-1895
(pkane at Kodak.COM)


  • Prev by Date: Re: Input accuracy
  • Next by Date: Re: logical expressions
  • Previous by thread: Problems converting clipboard to Illustrator format
  • Next by thread: Re: logical expressions