Integration points and weights with orthogonal polynomials

We can use Eq. (14) to rewrite the above integral as $$ \begin{equation*} \int_{-1}^1P_{2N-1}(x)dx=\int_{-1}^1(L_N(x)P_{N-1}(x)+Q_{N-1}(x))dx=\int_{-1}^1Q_{N-1}(x)dx, \end{equation*} $$ due to the orthogonality properties of the Legendre polynomials. We see that it suffices to evaluate the integral over \( \int_{-1}^1Q_{N-1}(x)dx \) in order to evaluate \( \int_{-1}^1P_{2N-1}(x)dx \). In addition, at the points \( x_k \) where \( L_N \) is zero, we have $$ \begin{equation*} P_{2N-1}(x_k)=Q_{N-1}(x_k)\hspace{1cm} k=0,1,\dots, N-1, \end{equation*} $$ and we see that through these \( N \) points we can fully define \( Q_{N-1}(x) \) and thereby the integral. Note that we have chosen to let the numbering of the points run from \( 0 \) to \( N-1 \). The reason for this choice is that we wish to have the same numbering as the order of a polynomial of degree \( N-1 \). This numbering will be useful below when we introduce the matrix elements which define the integration weights \( w_i \).