Because the first set of parameter values do not cause the integrand to overflow (at the points at which the integrand is evaluated). For example, on the 40th iteration of the loop, the parameter values are as below:
/* 1st try */
a1 = 1;
a2 = 120;
a3 = -40;
a4 = 9;
a5 = 1;
a6 = 1;
/* 2nd try */
/*
a1 = 11;
a2 = 120;
a3 = -30;
a4 = 31;
a5 = 1;
a6 = 1;
*/
e1 = a1 - 1;
e2 = a4-a1-1;
e3 = -a2;
e4 = -a3;
print e1 e2 e3 e4;
u = 0.999;
v=(u##(a1-1) # (1-u)##(a4-a1-1)) # (1-u#a5)##(-a2) # (1-u#a6)##(-a3);
Solving an integral is easier when you know what the integral means and how it was constructed. What does this integral represent? Is it related to a probability distribution? (For example, a beta distribution?) Why are the powers in the integrand so large? Where do the parameter values come from?
In similar problems that I have worked on, the parameters were obtained by fitting a model to data. When the model does not fit the data, the parameter estimates can be extreme and the integral might not converge. In these cases, it is not the integral that requires our attention, it is the modeling process that needs revising.
... View more