The GaussLegendre integration is used to numerically calculate the following integral:
I = ∫_{1}^{1} f(x)dx = ∑_{i=0}^{n1} w_{i} f(x_{i})

This case corresponds to the Gauss integration with the weighting function w(x) = 1
From the above equation, the GaussLegendre integration is completely determined by a set of nodes x_{i}
and weights w_{i}. The nodes and weights for the GaussLegendre integration have been
computed with great precision and tabulated in literature. These data can be used without knowing the theory behind them,
since all we need are the values of x_{i} and w_{i}.
In order to test the GaussLegendre integration we will compute the following integral:
I = ∫_{1}^{2} 1/√2π e^{x2/2} dx

Running this example creates the results shown above. It can be seen that the result for n = 3
is already very accurate.
Testing the GaussLegendre Integration Method
In order to test the GaussLegendre method as defined above, a new TestGaussLegendre()
static method has been added and executed. Supporting code and methods are not shown.
static void TestGaussLegendre();
{
ListBox1.Items.Clear();
double result;
for (int n = 1; n < 9; n++)
(
result = Integration.GaussLegendre(f2, 1, 2, n);
ListBox1.Items.Add(" n = " + n + ", result = " + result);
)
}
