# variable outputs and errors from NIntegrate with same values

I’m using NIntegrate to perform numerous integrations with the value L. L is utilized in multiple functions, all of which are called by NIntegrate to run.

``b = 100;  diffusivity = 8.3*10^4; a = 1; L = 10000; kbT = 1.38*10^(-23)*300;  eps = 23.5; sig = 1.3 (*nm *)  Ra[R_] := Sqrt[(R - a)^2 + a^2 - 2 a (R - a)]  greenGaussian[R_] := ((2*Pi*L*b^2)/3)^(-3/2)*Exp[-3 R^2/(2 L b^2)];  \[Beta]FBind[R_] := (-2*eps/kbT)/(1 + Exp[Ra[R]/sig])  \[Beta]FConf[R_] := -Log[R^2*greenGaussian[R]]  \[Beta]FTotal[R_] := \[Beta]FConf[R] + \[Beta]FBind[R] ``

The problem arises when I try and take the following numerical integral with NIntegrate:

``QLooped = NIntegrate[Exp[-\[Beta]FTotal[R]], {R, 2, 150}]    tauLooped = NIntegrate[   Exp[-\[Beta]FTotal[R] + \[Beta]FTotal[R1]  - \[Beta]FTotal[R2]],   {R, 2, 150},   {R1, R, 150},   {R2, 2, 150}   ] ``

Originally, I was getting NIntegrate to yield values for L=10000, and then it stopped working, giving me errors:

``NIntegrate::inumri: The integrand (3  Sqrt[3/2]  E^(1.13527*10^22/(1+E^Times[<<2>>])-(3  R^2)/200000000) R^2)/(2000000000000 \ .  [Pi]^(3/2)) has evaluated to Overflow,  Indeterminate, or Infinity for all sampling  points in the region with boundaries  {{2,20.5}}. ``

Another one was an error with Catch and Throw.

Another one was that the convergence was too slow.

I’ve searched the errors I’ve gotten, and have been unsuccessful with other people’s attempts.

The weird part is that I’m getting convergence for the unlooped function, not the tauLooped function.

``QUnlooped = NIntegrate[Exp[-\  [Beta]FTotal[R]], {R, 150, L}]    tauUnlooped = (1/(diffusivity*QUnlooped))  NIntegrate[    Exp[-\[Beta]FTotal[R] + \     [Beta]FTotal[R1] - \[Beta]FTotal[R2]],    {R, 150, L},    {R1, 150, R},    {R2, R1, L}    ] ``

I’ve tried changing the bounds of integration for tauLooped (e.g. 50 to 150), but the results that I get are pure nonsense (massive orders of magnitude 10^(454337)

I’m unable to rationally diagnose this problem based on the ranging errors I’m getting.

I want to vary L from Table[x,{x,10000,100000,10000}] and then evaluate TLooped and TUnlooped.

Posted on Categories cheapest proxies