The sum of weights for Gaussian quadrature depends on the dimension of the interval. For example, the sum of the weights over the interval [-1, 1] is 2.
My question is simply why?
The sum of weights for Gaussian quadrature depends on the dimension of the interval. For example, the sum of the weights over the interval [-1, 1] is 2.
My question is simply why?
A simple explanation to this would be to think geometrically. Gaussian Quadrature converts the integral to a sum over the domain of the integrand evaluated at specific quadrature points multiplied by a weighting function. Think of the weighting function as the width of the interval whose area is represented by the height of f(xi). You are essentially adding the areas of a number of rectangular strips.
As a result, the sum of the widths will always equal our domain size for the integral, in this case 2.
Your problem is just a specific case of the general case:
By def of gaussian quadrature
$\int_{a}^{b} f(x) = \sum_{n=1}^{N} w_i f(x_i)$
Suppose we take $f(x)=1$
Then we end up with $\sum_{n=1}^{N} w_i = b-a $
In your case, on the interval [-1,1] we see that the sum of the weights would indeed be 2.