Abstract
In this chapter we cover different aspects of integration, with the main focus on numerical integration. For historical reasons, numerical integration is also known as quadrature. Integration is significantly more difficult than its inverse operation – differentiation – and while there are many examples of integrals that can be calculated symbolically, in general we have to resort to numerical methods. Depending on the properties of the integrand (the function being integrated) and the integration limits, it can be easy or difficult to numerically compute an integral. Integrals of continuous functions and with finite integration limits can in most cases be computed efficiently in one dimension, but integrable functions with singularities or integrals with infinite integration limits are examples of cases that can be difficult to handle numerically, even in a single dimension. Double integrals and higher-order integrals can be numerically computed with repeated single-dimension integration, or using methods that are multidimensional generalizations of the techniques used to solve single-dimensional integrals. However, the computational complexity grows quickly with the number of dimensions to integrate over, and in practice such methods are only feasible for low-dimensional integrals, such as double integrals or triple integrals. Integrals of higher dimension than that often require completely different techniques, such as Monte Carlo sampling algorithms.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
For more information about the multi-precision (arbitrary precision) math library mpmath, see the project’s web page at http://mpmath.org .
- 2.
Here we deliberately choose to work with an integral that has a known analytical value, so that we can compare the multi-precision quadrature result with the known exact value.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2015 Robert Johansson
About this chapter
Cite this chapter
Johansson, R. (2015). Integration. In: Numerical Python. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0553-2_8
Download citation
DOI: https://doi.org/10.1007/978-1-4842-0553-2_8
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-0554-9
Online ISBN: 978-1-4842-0553-2
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)