Gaussian Quadrature, win-win situation

Methods based on Taylor series using \( N \) points will integrate exactly a polynomial \( P \) of degree \( N-1 \). If a function \( f(x) \) can be approximated with a polynomial of degree \( N-1 \) $$ \begin{equation*} f(x)\approx P_{N-1}(x), \end{equation*} $$ with \( N \) mesh points we should be able to integrate exactly the polynomial \( P_{N-1} \).

Gaussian quadrature methods promise more than this. We can get a better polynomial approximation with order greater than \( N \) to \( f(x) \) and still get away with only \( N \) mesh points. More precisely, we approximate $$ \begin{equation*} f(x) \approx P_{2N-1}(x), \end{equation*} $$ and with only \( N \) mesh points these methods promise that $$ \begin{equation*} \int f(x)dx \approx \int P_{2N-1}(x)dx=\sum_{i=0}^{N-1} P_{2N-1}(x_i)\omega_i, \end{equation*} $$