MathGroup Archive 2014

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

Search the Archive

NIntegrate and double integral -- very slow

  • To: mathgroup at
  • Subject: [mg132436] NIntegrate and double integral -- very slow
  • From: bluesaturn < at>
  • Date: Sat, 15 Mar 2014 03:46:25 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:

Dear all
I am trying to model something. This involves oscillating function 
(BesselJ0, BesselJ1) over that I have to integrate. An example is shown 
Mathematica is not able to manage to calculate the last three lines, not 
even overnight (12-14h). I don't think there is a simple analytical 
solution that is why I tried the numerical approach.
How can I speed up the calculations, please?  For example the line with 
the Table-Command. Ideally I would like to have more than just 26 points.

Thank you for your feedback.
Kind regards

%%%%%%%%%%%%%%%%%%%%%%% Example code

formfactorrodx[q_, alpha_] :=
   acylinder*BesselJ[1, q*acylinder*Sqrt[1 - alpha^2]]/(q*Sqrt[1 - alpha^2])

nx[rcx_] := ((2*Abs[beta])/(kappanormal*rcx*Cos[beta*Log[rcx/RM]]))^2*

formfactorcounterionx[q_, alpha_, rcx_] :=
    BesselJ[0, q*rcx*Sqrt[1 â?? alpha^2]]*2*Pi*rcx;

intensityRodCounterions[q_?NumericQ] :=
    2*fp*formfactorcounterionx[q, alpha, rcx]*
     formfactorrodx[q, alpha], {rcx, acylinder, router}, {alpha, 0,
     1 - chiint}, Method -> {"MonteCarlo", "MaxPoints" -> 10^10}];

Table[intensityRodCounterions[1*10^(-1)*10^(9)*i], {i, 26}]

  Table[intensityRodCounterions[q], {q, 1*^-1*1*^9, 2.6*1*^9, 26}]]

LogLogPlot[intensityRodCounterions[q], {q, 1*^-1*1*^9, 2.6*1*^9}]

  • Prev by Date: Re: What's in an expression?
  • Next by Date: Help with a function for plotting zeros and poles
  • Previous by thread: Mathematica software engineer sought - USCD - Systems biology
  • Next by thread: Re: NIntegrate and double integral -- very slow