I am doing some program where I must calculate some numerical integral (the involved function is quite complicated to be solved analytically). The function to be integrated have some parameters which are obtained from some random generation.
For example,
NIntegrate[f[a,b,c,x]/.RndArray,{x,0,Infinity}]
where RndArray is some array with replacement rules of the kind
{{a->3,b->4,c->9},{a->1,b->2,c->8},...}
So what I do is to get an array of the kind
Integrals = Array[NIntegrate[f[a,b,c,x]/.RndArray[[#]],{x,0,Infinity}]&,Length[RndArray]];
The point is that sometimes Mathematica has some problems overflow problems when integrating. Then, all the output in Integrals is missing.
My question is, is there anyway to ignore this and show all the other results?
Table[With[{F = f[a, b, c, x] /. rules}, Integrate[F, {x, 0, Infinity}]], {rules, RndArray}]? – rm -rf Jun 28 '13 at 08:19Tablehere. – rm -rf Jun 28 '13 at 08:25Integralsvariable, which information was lost in case there was some overflow. I didn't see the output due to the;. However, this is what I would expect: all the numbers calculated plus some overflow where errors occurred.However, when using
Table, this is no longer a problem, thenIntegralskeeps all the numbers and the overflow, which I can remove by hand to further use this variable through the program.Thansk a lot!
– pablo Jun 28 '13 at 08:42Tableinstead ofArray, which keeps the problematic results in the vector. An alternative is not to add the;at the end, so the output with error is produced and can be further used.However, the problematic parts must be removed by hand, since they are not labelled by
– pablo Jun 29 '13 at 11:51Indeterminaterather thanNIntegrate[...]. However, being rare such cases they don't represent a huge problem