from pylab import *
8.1Problem of quadrature¶
The problem is to compute the numerical value of the definite integral
where is a given function. The solution to this problem usually takes the following form: Form a partition or grid

and approximate the integral by a formula of the type
where the are some weights. We may be interested in the following type of questions.
Given the nodes how to find the weights to obtain a good approximation ?
Can we find both the nodes and weights so that the formula is as accurate as possible ?
To measure the accuracy, we may establish a result like
Then the approximations converge fast if is very large and this is algebraic convergence. A still better approximation is one which would converge exponentially
8.2Integration via function approximation¶
Let be a family of approximations to such that
i.e., they converge uniformly an also in a pointwise sense. Define the quadrature rule
Then the error in the integral is
so that
We thus automatically obtain convergence of the integral approximations.