Is there a way to use Mathematica to obtain a guaranteed, rigorous upper bound on the absolute approximation error of an output of NIntegrate (as an approximation to the corresponding unavailable output of Integrate)?
I am aware of this answer, but it is unclear to me if that method gives a rigorous, guaranteed upper bound on the error.
Response to comments: Of course, it is impossible to get such a rigorous error bound based just on the values of the integrand and of any number of its derivatives at the nodes.
However, it is always possible, at least in principle, to get such an error bound when the integrand is (say) an elementary function. This is possible to do e.g. by using monotonicity patterns of the basic terms of the expression of the integrand. (I think this is called the interval method.) For instance, it is clearly possible to find $\int_0^1\exp(-1/((1-x)x))\,dx$ with any degree of accuracy, using monotocity/convexity/etc. patterns of $\exp(-1/((1-x)x)$ and/or Taylor expansions with controlled remainders. I could in principle write such a code myself, but I am not good at coding. So, my problem is to get such a bound quickly and efficiently.
c Piecewise[{{Exp[-1/(x - a)/(b - x)], a < x < b}}]to any functionf[x], as long asaandbare numbers between two successive sampling points, and you'll get the same integral as the integral off[x]. Sincecis arbitrary, the error will be arbitrary. So in principle, no, there isn't a guaranteed, rigorous way to bound the error. – Michael E2 Aug 06 '21 at 21:28NIntegratewill never find. And checking whether such peaks (don't) exist is in general undecidable – Lukas Lang Aug 06 '21 at 21:30