# Why am I getting this message " Further output of NIntegrate::inumri will be suppressed during this calculation."

My code is:

p = 0.01;
m = -0.5*Log[2.9];
s = Sqrt[Log[2.9]];
r = 0.5;
tailF[x_] := 1 - CDF[NormalDistribution[0, 1], (Log[x] - m)/s]
t = Quantile[LogNormalDistribution[m, s], p]
g ==
N[(Integrate[(tailF[y]/(1 - p))^(r), {y, t, Infinity}] -
Integrate[tailF[y]/(1 - p), {y, t, Infinity}]) /
(Integrate[ tailF[y]/(1 - p), {y, t, Infinity}])]
v1 ==
-r ΝIntegrate[((tailF[x]/(1 - p))^r) Log[tailF[x]/(1 - p)], {x, t, Infinity}]


NIntegrate::inumri: The integrand 1.00504 (1-1/2 Erfc[-0.484567 (0.532355 +Log[<<1>>])])^0.5 Log[1.0101 (1-1/2 Erfc[-0.484567 Plus[<<2>>]])] has evaluated to Overflow, Indeterminate, or Infinity for all sampling points in the region with boundaries {{0.0532481,5.23043*10^7}}

General::stop: Further output of NIntegrate::inumri will be suppressed during this calculation.

Can you please help why I am getting this message?

• NIntegrate::inumri: The integrand 1.00504 (1-1/2 Erfc[-0.484567 (0.532355 +Log[<<1>>])])^0.5 Log[1.0101 (1-1/2 Erfc[-0.484567 Plus[<<2>>]])] has evaluated to Overflow, Indeterminate, or Infinity for all sampling points in the region with boundaries {{0.0532481,5.23043*10^7}}. Jan 18, 2020 at 20:35
• Please provide the code that generates the message. Jan 18, 2020 at 20:40
• v1 == -0.5 ΝIntegrate[ 1.00504 (1 - 1/2 Erfc[-0.685282 (0.532355 + Log[x])])^0.5 Log[ 1.0101 (1 - 1/2 Erfc[-0.685282 (0.532355 + Log[x])])], {x, 0.0532481, [Infinity]}] my question is how i can computing this result Jan 18, 2020 at 22:09
• Because more than 3 messages of the form NIntegrate::inumri were thrown. That means you are doing something wrong quite often. I guess something bad is going on with your integrand. Jan 18, 2020 at 22:10
• you have right!! thank you! Jan 18, 2020 at 22:12

### Edit

Your numeric problems are induced because you are using machine precision arithmetic. The fix is to define the parameters as exact quantities and do the computations with Mathematica's arbitrary precision arithmetic.

You also have some bad syntax in your code, I will correct those errors in presentation of the making of the computation with arbitrary precision arithmetic.

My solution uses exactly the same approach as Bob Hanlon's, but I also worked out a computation for g. I omit repeating Bob's work, but give the code for computing g.

p = 1/100;
q = 29/10;
m = -Log[q]/2;
s = Sqrt[Log[q]];
r = 1/2;

tailF[x_] := 1 - CDF[NormalDistribution[0, 1], (Log[x] - m)/s]

t = N[Quantile[LogNormalDistribution[m, s], p], 20]


0.053248094037394870890

g =
Module[{int1, int2},
int1 = NIntegrate[tailF[y]/(1 - p), {y, t, ∞}, WorkingPrecision -> 20];
int2 = NIntegrate[(tailF[y]/(1 - p))^(r), {y, t, ∞}, WorkingPrecision -> 20];
(int2 - int1)/int1]


2.0043916495150882408

• Thank you so much!! I have a very short time learning this program. In the future I will have more questions!!! :) You where very helpful!! Jan 18, 2020 at 23:37
• v == Module[{int3, int4}, int3 = -r* NIntegrate[((tailF[y]/(1 - p))^r)*Log[tailF[y]/(1 - p)], {y, t, Infinity}, WorkingPrecision -> 20]; int4 = NIntegrate[(tailF[y]/(1 - p))^r, {y, t, Infinity}, WorkingPrecision -> 20]; int3/int4]... i bult this one with the some thought but it give False for p=0! Jan 19, 2020 at 0:00
• @BobHanlon. I have corrected the error. Jan 19, 2020 at 0:14
• @PolixeniVliora. Why are you using == rather than =? With p =0. the righthand side gives 1.8913582973597114875. Why do expect testing for equality to v, which is what you are doing, would give True, the only other value your expression could have. Jan 19, 2020 at 0:22
• yes i found it after i sent the message. Can i ask you something else..? When i get another distribution its happened numerical problem and the program doesnt compute the intervals.. Jan 19, 2020 at 1:10

Use exact constants so that the numerical integration can be done with a specified level of precision.

p = 1/100;
m = -1/2*Log[29/10];
s = Sqrt[Log[29/10]];
r = 1/2;

tailF[x_] := 1 - CDF[NormalDistribution[0, 1], (Log[x] - m)/s]

t = Quantile[LogNormalDistribution[m, s], p];

v1 = -r*NIntegrate[((tailF[x]/(1 - p))^r)*Log[tailF[x]/(1 - p)],
{x, t, Infinity}, WorkingPrecision -> 20]

(* 5.4205112147940705531 *)


EDIT: regarding the comment,

a = NIntegrate[(tailF[x]/(1 - p))^r, {x, t, Infinity}, WorkingPrecision -> 20]

(* 2.8735704898654341928 *)

v1/a

(* 1.8863331294329607670 *)
`
• so you suggest me to calculate a finite number, ok thank you. But if i want this one v1 = -r*NIntegrate[((tailF[x]/(1 - p))^r)*Log[tailF[x]/(1 - p)], {x, t, Infinity}]/(Integrate[(tailF[x]/(1 - p))^r, {x, t, Infinity}), WorkingPrecision -> 20]??? i'm grateful for helping me!! Jan 18, 2020 at 22:44