Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

NIntegrate and speed

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116780] NIntegrate and speed
  • From: Marco Masi <marco.masi at ymail.com>
  • Date: Sun, 27 Feb 2011 04:35:46 -0500 (EST)

I have the following problems with NIntegrate.

1) I would like to make the following double numerical integral converge without errors

R = 8000; Z = 1; rd = 3500;
NIntegrate[Exp[-k Abs[Z]]/(1 + (k rd)^2)^1.5 (NIntegrate[Cos[k R Sin[\[Theta]]], {\[Theta], 0, \[Pi]}]), {k, 0, \[Infinity]}]

It tells non numerical values present and I don't understand why, since it evaluates finally a numerical value? 0.000424067

2) Isn't the second integrand a cylindrical Bessel function of order 0? So, I expected that
NIntegrate[Exp[-k Abs[Z]]/(1 + (k rd)^2)^1.5 BesselJZero[0, k R], {k, 0, \[Infinity]}] doing the same job. But it fails to converge and gives 0.00185584- i4.96939*10^-18. Trying with WorkingPrecision didn't make things better. How can this be fixed?

3) The above Nintegrals will go into a loop and should be evaluated as fast as possible. How? With Compile, CompilationTarget -> "C", Paralleization, etc.?

Any suggestions?

Marco.


  • Prev by Date: Re: outputting C code
  • Next by Date: Re: Best way to import 3D files and link its objects with metadata?
  • Previous by thread: Coordinates in EventHandler
  • Next by thread: Re: NIntegrate and speed