0

Is it possible to display the current evaluation result while NIntegrate[] is running?

Something like this:

Dynamic[c];
NIntegrate[f[x],{x,0,1},EvaluationMonitor :>(*assign current value of NIntegrate[] to c*)]

Let's say NIntegrate calls

f[0]=1
c=1
f[.1]=2
c=1.5
f[.4]=3
c=2
f[.7]=-1
c=1.25
...

Thanks in advance!

lxndr
  • 135
  • 6
  • 1
  • Thanks, but I can't find there what I am looking for - or don't understand it. The method there seems to only give information about every integration region after it is done. But I am looking for the final result of the integration with it's current current uncertainty. – lxndr Dec 17 '21 at 18:24
  • By current uncertainty, do you mean error bound? (That is not what you asked for. Rather you seem to have wanted something like IntegrationMonitor -> ((c = Total@Through[#@"Integral"]) &).) – Michael E2 Dec 17 '21 at 18:26
  • 1
    For the error bound, perhaps this?: https://mathematica.stackexchange.com/a/106170/4999 – Michael E2 Dec 17 '21 at 18:32
  • Thank you very much, I missed Total@Through[#@"Integral"]. That's not exactly what I was looking for, but it's just as good to see what's going on. – lxndr Dec 17 '21 at 18:50

0 Answers0