Numerical Integration: Introduction
Why numerical integration?
You may of course wonder what numerical integration is actually good for?
The two main reasons are:
- Not every integrable function has a primitive that can be expressed in terms of elementary functions. In other words, you cannot calculate every integral exactly.
- With measurement data you do not have a formula for the function that describes the data. If you then need the area under the curve, you have to use a numerical approximation.
An example of the first case is the function \[f(x)=\frac{2}{\sqrt{\pi}}e^{-x^2}\] The integral function \[F(x)=\int_0^x f(\xi)\,\dd\xi\] cannot be expressed in terms of elementary functions. Because this function is often used, mathematicians have named it the error function erf.
The second case is of course common and there are basically two common methods of action:
- Using a quadrature formula.
- Using a Monte Carlo method.
Unlock full access