Numerical integration

Numerical integration#

Numerical integration approximates analytic integration, and is particularly useful because:

  • Analytic integrals may be hard to find if they exist at all!

  • Integration tends to damp experimental noise (in contrast with differentiation which tends to amplify it)

In 1D, integration is simply finding the area under the curve \(s = \int_a^b f(x) \ dx\) in the range [a,b]:

![Integral_as_region_under_curve.svg](data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKCXZlcnNpb249IjEuMCIgd2lkdGg9Ijc1MHB4IiBoZWlnaHQ9IjcwMHB4IiB2aWV3Qm94PSIwIDAgNzUwIDcwMCI+Cgk8ZGVmcz4KCTwvZGVmcz4KCTxnIHN0eWxlPSJzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6NDtzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjptaXRlcjtmaWxsLXJ1bGU6ZXZlbm9kZDsiPgoJCTxwYXRoIHN0eWxlPSJmaWxsOiNkZGRkZGQ7IiBkPSJNIDIzNy42LDE4OC44IEMgMjc5LjUsMjAxLjMgMzM1LjQsMjM1IDM4NiwyNjMuMSA0NjEuNSwzMDUgNTM3LjYsMzM1LjIgNjM2LjksMzAzLjMgTCA2MzgsNTcxLjMgMjM3LjYsNTcwLjIgMjM3LjYsMTg4LjggeiIgLz4KCQk8cGF0aCBzdHlsZT0iZmlsbDojMDAwMDAwOyIgZD0iTSA0Ni44OCw1NzEuMyA2ODcuMyw1NzIuNSIgLz4KCQk8cGF0aCBzdHlsZT0iZmlsbDojMDAwMDAwOyIgZD0iTSAxMDcuMiw2MzYuNyAxMDYsMzcuMzMgMTA2LDU5LjM3IiAvPgoJCTxwYXRoIHN0eWxlPSJmaWxsOm5vbmU7ICAgIiBkPSJNIDYzNi4zLDMwMy4zIEMgNjY4LjEsMjkzLjggNjg2LDI4NyA3MTMuNywyNzQuNiIgLz4KCQk8cGF0aCBzdHlsZT0iZmlsbDpub25lOyAgICIgIGQ9Ik0gMTEuMjIsMjQxLjQgQyA3My4wNywxOTguOCAxMzcuNywxNjEuMyAyMzgsMTg4LjciIC8+CgkJPHBhdGggc3R5bGU9ImZpbGw6IzAwMDAwMDtzdHJva2Utd2lkdGg6MTsiIGQ9Ik0gMTA0LjEsNjMuODEgODYuNzQsODAuNTQgMTA1LjksMTIuMzkgMTI1LjEsNzkuOTIgMTA4LjQsNjMuODEgMTA0LjEsNjMuODEgeiIgLz4KCQk8cGF0aCBzdHlsZT0iZmlsbDojMDAwMDAwO3N0cm9rZS13aWR0aDoxOyIgZD0iTSA2NzguNCw1NzAuNSA2NjEuOCw1NTMgNzI5LjgsNTcyLjcgNjYyLjEsNTkxLjQgNjc4LjQsNTc0LjggNjc4LjQsNTcwLjUgeiIgLz4KCTwvZz4KCTxnIHN0eWxlPSJmb250LXNpemU6NzBweDtmb250LXN0eWxlOml0YWxpYztmb250LXdlaWdodDpib2xkO3RleHQtYW5jaG9yOnN0YXJ0O2ZpbGw6IzAwMDAwMDtzdHJva2U6bm9uZTtmb250LWZhbWlseTpUaW1lcyBOZXcgUm9tYW47Ij4KCQk8dGV4dCB4PSIyMTMiIHk9IjYzMyI+YTwvdGV4dD4KCQk8dGV4dCB4PSI2MDkiIHk9IjYzOCI+YjwvdGV4dD4KCQk8dGV4dCB4PSI2ODIiIHk9IjYzMyI+eDwvdGV4dD4KCQk8dGV4dCB4PSIxNDYiIHk9IjUzIiA+eTwvdGV4dD4KCQk8dGV4dCB4PSI0MzkiIHk9IjI0NyI+Zih4KTwvdGV4dD4KCQk8dGV4dCB4PSI0MTEiIHk9IjQ2MCI+UzwvdGV4dD4KCTwvZz4KPC9zdmc+Cg==)

For definite integrals (i.e.: with finite limits), numerical integration is called numerical quadrature.

Aside: The integral sign \(\int\) looks like an elongated ‘S’ because that ‘summa’ (latin for summation) is exactly what we are doing!

The methods discussed in this section consider 2 cases:

  • The function \(f(x)\) is available

  • The data \(f(x), x\) is known at a set of points.