1
$\begingroup$

This question already has an answer here:

Sometimes NIntegrate issues a warning stating that the desired accuracy wasn't reached.

NIntegrate[Sin[Cos[100 x]], {x, 0, 5}, MaxRecursion -> 0]

NIntegrate failed to converge to prescribed accuracy after 0 recursive bisections in x near {x} = {4.9602...}. NIntegrate obtained 0.4780... and 0.3486... for the integral and error estimates. >>

How do I reap this error estimate (of 0.3486... in this case) from NIntegrate even when this warning is not issued?

$\endgroup$

marked as duplicate by QuantumDot, m_goldberg, Michael E2, J. M. will be back soon Apr 23 '17 at 2:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    $\begingroup$ Or this: mathematica.stackexchange.com/questions/75426/… $\endgroup$ – Michael E2 Apr 22 '17 at 17:20
  • 3
    $\begingroup$ Using Anton's answer here: Reap[NIntegrate[Sin[Cos[100 x]], {x, 0, 5}, MaxRecursion -> 0, "IntegrationMonitor" :> Function[{iregs}, Sow[Flatten[Map[Thread[# -> Through[iregs[#]]] &, {"Integral", "Error"}]]]]]] $\endgroup$ – J. M. will be back soon Apr 22 '17 at 17:25
  • $\begingroup$ @MichaelE2 Ok, thanks; close as duplicate. $\endgroup$ – QuantumDot Apr 22 '17 at 23:32