Two questions on Gaussian Quadrature



Appreciate answers.

1. An n-point Gaussian quadrature will give an exact answer for
polynomials of order m <= 2*n -1.
I checked this for Gauss-Legendre weights, for n = 3, m = 0, 1, 2, 3,
4
Please confirm that this is true in general.

2. For concreteness, assume Gauss_Legendre integration. For a given n,
this will yield exact answers for polynomials of degree m <= 2n - 1.
say n = 5.

Then, NIntegrate[f(x),(-1,1)]. = Sum[f(x(i), i = -2,-1,0,1,2]

What is the polynomial approximation to f(x) implied by the above?
Equivalently, how do I find the polynomial Poly(x) such that

Poly(x(i)) = f(x(i)), i =
-2,-1,0,1,2
of degree <= m?

Do I fit the
standard polynomial of degree 9, a0 + a1*x + a2*x^2 + ... + a9*x^9 or
is it the Legendre polynomial of degree 9
or
some other polynomial?

Best
Nag

.