Abstract
We present an implementation of arbitrary-precision numerical integration with rigorous error bounds in the Arb library. Rapid convergence is ensured for piecewise complex analytic integrals by use of the Petras algorithm, which combines adaptive bisection with adaptive Gaussian quadrature where error bounds are determined via complex magnitudes without evaluating derivatives. The code is general, easy to use, and efficient, often outperforming existing non-rigorous software.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Arb (http://arblib.org) is open source (GNU LGPL) software. For documentation and example code related to this paper, see http://arblib.org/acb_calc.html.
- 2.
Clenshaw-Curtis or double exponential quadrature could be used instead of Gaussian quadrature, but typically require more points for equivalent accuracy. We could also use Taylor series, but this makes supplying f more cumbersome for the user, and computing \(f,f'\ldots ,f^{(n)}\) tends to be more costly than n evaluations of f.
- 3.
In benchmark results, we omit the first-time nodes precomputation overhead.
- 4.
For example, mpmath provides quadgl for Gaussian quadrature, which is 2–3 times faster on some examples, but its precomputations are prohibitive at high precision.
- 5.
An exception is when f has an essential singularity inducing oscillation combined with slow decay. Oscillation with exponential decay is not a problem (as in \(E_4\), \(E_5\)), but integrals like \(\smash {\int _0^1\!\sin (1/x) dx \!=\! \int _1^{\infty } \!\sin (x)/x^2}\) (not benchmarked here) require \(\smash {2^{O(p)}\!}\) work, so we can only hope for 5–10 digits without specialized oscillatory algorithms.
- 6.
As a means to improve performance, we note the standard trick of manually changing variables to turn algebraic growth or decay into exponential decay. Indeed, \(x \rightarrow \sinh (x)\) gives \(E_1 = E_3\). Similarly \(x \rightarrow \tanh (x)\) and \(\smash {x \rightarrow e^{-x}}\) can be used in \(E_0\), \(E_2\).
- 7.
This works for integrating |f| when f is real, but since \(|\cdot |\) on \(\mathbb {C}\) is not holomorphic, integrating |f| for nonreal f must use direct enclosures, with \(2^{O(p)}\) cost. In that case, the user should instead construct complex-extensible real and imaginary parts \(f = g\!+\!h i\) (e.g. via Taylor polynomials if no closed forms exist) and integrate \(\sqrt{g^2 + h^2}\).
References
Bailey, D.H., Borwein, J.M.: High-precision numerical integration: progress and challenges. J. Symbolic Comput. 46(7), 741–754 (2011)
Cranley, R., Patterson, T.N.L.: On the automatic numerical evaluation of definite integrals. Comput. J. 14(2), 189–198 (1971)
Hale, N.: Spike integral (2010). http://www.chebfun.org/examples/quad/SpikeIntegral.html
Johansson, F.: Arb: efficient arbitrary-precision midpoint-radius interval arithmetic. IEEE Trans. Comput. 66, 1281–1292 (2017)
Johansson, F.: mpmath version 1.0 (2017). http://mpmath.org/
Johansson, F., Mezzarobba, M.: Fast and rigorous arbitrary-precision computation of Gauss-Legendre quadrature nodes and weights (2018). arXiv:1802.03948
Mahboubi, A., Melquiond, G., Sibut-Pinote, T.: Formally verified approximations of definite integrals. In: Blanchette, J.C., Merz, S. (eds.) ITP 2016. LNCS, vol. 9807, pp. 274–289. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-43144-4_17
Petras, K.: Self-validating integration and approximation of piecewise analytic functions. J. Comp. Appl. Math. 145(2), 345–359 (2002)
Rump, S.M.: Verification methods: rigorous results using floating-point arithmetic. Acta Numerica 19, 287–449 (2010)
The Pari group. Pari/GP version 2.9.4 (2017). http://pari.math.u-bordeaux.fr/
The SageMath developers. SageMath version 8.2 (2018). http://sagemath.org/
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this paper
Cite this paper
Johansson, F. (2018). Numerical Integration in Arbitrary-Precision Ball Arithmetic. In: Davenport, J., Kauers, M., Labahn, G., Urban, J. (eds) Mathematical Software – ICMS 2018. ICMS 2018. Lecture Notes in Computer Science(), vol 10931. Springer, Cham. https://doi.org/10.1007/978-3-319-96418-8_30
Download citation
DOI: https://doi.org/10.1007/978-3-319-96418-8_30
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-96417-1
Online ISBN: 978-3-319-96418-8
eBook Packages: Computer ScienceComputer Science (R0)